I have a public command script for users with +o in the bot.
Problem is when executing !kick (botnick) & !ban (botnick); the bot kicks and bans itself.
Can someone please go through it and see where the error is? I thank you in advance, cause' it would really help our channel.
Best regards. (script follows)
Code: Select all
# Process Kick
proc proc_kick { nick uhost hand chan text } {
global botnick
if {[onchan $text]} {
if {$text != $botnick} {
putquick "KICK $chan $text :Requested"
}
} else { putserv "PRIVMSG $chan :\002$text\002 Not In Channel: \002$chan\002" }
}
# Ban Process
proc proc_ban { nick uhost hand chan text } {
global botnick
if {[onchan $text]} {
if {$text == $botnick} { return 0 }
set banmask [maskhost [getchanhost $text $chan]]
putquick "MODE $chan +b $banmask"
putkick $chan $text :Requested
} else { putserv "PRIVMSG $chan :$text Is Not In The Channel" }
}