Code: Select all
bind kick - "*" kick_remove
proc kick_remove {nick host hand chan target args} {
global botnick
if {$target == $botnick} {
putserv "PRIVMSG X :remuser $chan =$nick"
putlog "Removed $nick's username from X's $chan access list."
}
}
Code: Select all
bind mode - "* kick" kick_remove
proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG X :verify $nick"
##here we should find a way so the bot will catch the access of the nick##
putserv "PRIVMSG X :remuser #channel $verifiednick
}
}
Code: Select all
bind mode - "* kick" kick_remove
proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG X :verify $nick"
}
}
#I use bind notice since I don't know how X replies
bind notc - "bla bla bla *" check_verify
proc check_verify {nick host hand arg dest} {
if {[string equal $dest $::botnick]} {
#the index must probably be changed to match where in the line the verified nick is
putserv "PRIVMSG X :remuser #channel [lindex [split $arg] end]"
}
}
Papillon wrote:I'm not familiar with the undernet services, but you will need a second proc to catch the reply from the verify command.I hope this will give you an idea of what you need to do..Code: Select all
bind mode - "* kick" kick_remove proc kick_remove {nick uhost hand chan mc victim} { if {$victim == $::botnick} { putserv "PRIVMSG X :verify $nick" } } #I use bind notice since I don't know how X replies bind notc - "bla bla bla *" check_verify proc check_verify {nick host hand arg dest} { if {[string equal $dest $::botnick]} { #the index must probably be changed to match where in the line the verified nick is putserv "PRIVMSG X :remuser #channel [lindex [split $arg] end]" } }
Code: Select all
set thechannel "#channel"
bind mode - "* kick" kick_remove
proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG X :verify $nick"
}
}
bind notc - "* logged in as *" check_verify
proc check_verify {nick host hand arg dest} {
if {[string equal $dest $::botnick]} {
putserv "PRIVMSG X :remuser $::thechannel [lindex [split $arg] end]"
}
}
Code: Select all
bind kick - * kick:remove
proc kick:remove { nick uhost hand chan targ rsn } {
if {$targ == $::botnick} {
putserv "PRIVMSG X :verify $nick"
}
}