bind pub f kick, kick
proc kick {nick host hand chan arg} {
set who [lindex [split $arg] 0]
set reason [lrange $arg 1 end]
if {![onchan $who $chan]} {
putchan $chan "$who is not in the channel"
} else {
if {[botisop $chan]} {putkick $chan $who $reason}
}
return 0
}
this code is working for all nicks accept ones with the {}'s in them
bind pub f kick, kick
proc kick {nick host hand chan arg} {
set who [lindex [split $arg] 0]
set who [string map {\{ \\\{ \} \\\}} $who]
set reason [lrange $arg 1 end]
if {![onchan $who $chan]} {
putchan $chan "$who is not in the channel"
} else {
if {[botisop $chan]} {putkick $chan $who $reason}
}
return 0
}
and error message again:
[17:55] Tcl error [kick]: list element in braces followed by "B" instead of space
# Comment these two lines if you wish to enable the .tcl and .set commands.
# If you select your owners wisely, you should be okay enabling these.
unbind dcc n tcl *dcc:tcl
unbind dcc n set *dcc:set
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM
ok, I shut the bot down completely and restarted it, went to test it again, and now I'm not getting a tcl error, but I'm getting this in the channel as the bots output:
bind pub f kick, kick
proc kick {nick host hand chan arg} {
set who [lindex [split $arg] 0]
set who [string map {\{ \\\{ \} \\\}} $who]
set reason [join [lrange [split $arg] 1 end]]
if {![onchan $who $chan]} {
putchan $chan "$who is not in the channel"
} else {
if {[botisop $chan]} {putkick $chan $who $reason}
}
return 0
}