I have a problem with this script again )
CODE
Code: Select all
proc daddy_ban_warn {nick host hand ban chan victims} {
global daddy botnick
set ban *!*[string range $host [string first "@" $host] end]
if {![botisop $chan] || [strlwr $hand] == [string trimright [strlwr $victims] " "] || $daddy(ban_protect) == 0} {return 0}
if {$hand == "*"} {
if {[string first +userbans [channel info $chan]] != -1} {
if {$nick == $botnick} {return 0}
putserv "MODE $chan -o+b $nick $ban"
putserv "KICK $chan $nick :Don't ban my friends, bud"
newchanban $chan $ban Friendprotection "Friend was banned off $chan"
adduser $nick $nick!*@*
chattr $nick +d
return 0
}
return 0
}
Before i edit the tcl, this script bans the bad guy on his nick.
But i wanted the script to ban on the address of the bad guy, and i aded
the line
set ban *!*[string range $host [string first "@" $host] end]
and raplace
putserv "MODE $chan -o+b $nick $nick"
With
putserv "MODE $chan -o+b $nick $ban"
and also edit {nick hand ban chan victims} to {nick host hand ban chan victims}, i only added the "host"
I and after all this i hoped the bot to ban the bad guy to his *!*@adress )
But when i test the script , There was this error
TCL error [daddy_watch_mode]: no value given for parameter "victims" to "daddy_ban_warn"
why??
I only added the "host" !
Pls help me and tell me how to prevent this error in this script and future scripts )