My bots are on chatnet. The channel guardian (like X on undernet) is called k9. You can command k9 with public commands starting with "K9 command" (eg: k9 op nick). You can command k9 by private messages too (.msg k9 command #channel ...)
I would like to block my bots commands .msg and .say if k9 is the first word in the sentence.
eg:
.say #mychan k9 op bad-nick (blocked !)
.say #mychan hello all (ok)
Can someone help me about that ? I don't want a "made" script, but I need some help to start coding that (what do you think I should look at to have an idea about what to do ?)
proc notice:dcc:msg {hand idx arg} {
if { [llength $arg] < 1 } {
putdcc $idx "Usage: msg <nick> <message>"
return 0
}
set sarg [string first " " $arg]
set nick [string range $arg 0 [expr $sarg - 1]]
set msg [string range $arg [expr $sarg + 1] end]
### protection X/W
if {$nick == "X" || $nick == "x" || $nick == "W" || $nick == "w" } {
putdcc $idx "You don't have permission to private X or W by using the bot !"
return 0
}