i set in my eggdrop tcl command like every body with none flag - can control bot only when they type !join #chan .. i need small
example:
KellyWAG: !join #sucker
mynot: sorry, chan on my bad list
Code: Select all
set dont_join "#foo #MoO #BaR"
bind pub - !join all:pub:join
proc all:pub:join {nick uhost handle channel text} {
global dont_join
if {![llength [set chan [lindex [split $text] 0]]]} {
putserv "NOTICE $nick :Usage: !join #channel"
return
}
if {[validchan $chan]} {
set msg "Sorry, the $chan channel is already a known channel to me."
if {![botonchan $chan] || [channel get $chan inactive]} {
append msg " Currently I'm not on the $chan channel, possible reasons: limit, invite only, banned or channel is se to +inactive."
} else {
append msg " Currently I'm on the $chan channel."
}
putserv "NOTICE $nick :$msg"
return
}
if {[regexp -nocase $chan $dont_join]} {
putserv "NOTICE $nick :Sorry, $chan channel is on my bad list."
return
}
putserv "NOTICE $nick :Allright, I'll join $chan channel."
channel add $chan
}
Code: Select all
[regexp -nocase {$chan} $dont_join]