egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

join part

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
eggi
Voice


Joined: 15 Sep 2005
Posts: 11

PostPosted: Tue Jan 31, 2006 2:41 pm    Post subject: join part Reply with quote

my oper bot dont ban j/p when it s deoped. i use this code
Code:

setudef flag joinpart
bind part - * ban:jp

proc ban:jp {nick uhost hand chan arg} {
  global jp botnick jpchan
  if {[isbotnick $nick] || ![botisop $chan] || ![channel get $chan joinpart]} {
    return
  }
  if {![info exists jpchan($chan)]} {
    set jpchan($chan) 0
  }
  if {($chan == $botnick) || [matchattr $hand b] || [matchattr $hand fom|fom $chan]} {
    return
  }
  if {[getchanjoin $nick $chan] >= [expr {[clock seconds]-$jp(part)}]} {
    set banmask [jp:banmask $uhost $nick]
    putquick "MODE $chan +$jp(lock_modes)b $banmask"
    putserv "KICK $chan $nick :$jp(reason)"
    utimer $jp(unlock) [list putquick "MODE $chan -$jp(lock_modes)"]
  }
}
Back to top
View user's profile Send private message
CrazyEgg
Halfop


Joined: 28 Jul 2005
Posts: 47

PostPosted: Tue Jan 31, 2006 3:47 pm    Post subject: Reply with quote

Code:
putquick "MODE $chan +$jp(lock_modes)b $banmask"
putserv "KICK $chan $nick :$jp(reason)"


how to make kick or ban?

change that with
privmsg to chanserver(if is undernet then X)
example for undernet:

putserv "PRIVMSG X : ban $chan $banmask <hours> <access> <reason>"

command on undernet is
/msg x ban #chanell <hours> <access level> <reason>
/msg x kick #channel nick

resume:
if bot is deoped ONLY via chanserv commands you can give.
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Jan 31, 2006 6:40 pm    Post subject: Reply with quote

eggi said oper bot which I presume (for whatever silly reason is an IRCOp).

Change:
Code:
  if {[isbotnick $nick] || ![botisop $chan] || ![channel get $chan joinpart]} {
    return
  }

to:
Code:
  if {[isbotnick $nick] || ![channel get $chan joinpart]} {
    return
  }

_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber