Hey guys,can somebody write me tcl which will reacts when I type "!banlist" in some channel,and then he will say all bans in that channel..also public..I tried to edit code that I find in manager.tcl :
# Usage: !banlist
proc pub:banlist {nick host hand chan arg} {
global botnick
putserv PRIVMSG $chan "\002Global bans:\002"
if {[banlist] == ""} {
putserv "PRIVMSG $chan :None."
} else {
foreach ig [banlist] {
set what [lindex $ig 0]
set by [lindex $ig 5]
set comment [lindex $ig 1]
putserv "PRIVMSG $chan : "$what - by $by, Reason: $comment"
}
}
putserv "PRIVMSG $chan : Bans for $chan:"
if {[banlist $chan] == ""} {
putserv "PRIVMSG $chan :None."
} else {
foreach b [banlist $chan] {
set what [lindex $b 0]
set by [lindex $b 5]
set comment [lindex $b 1]
putserv "PRIVMSG $chan : $what - by #4$by#, Reason: $comment"
}
}
putserv "PRIVMSG $chan : End Of Banlist."
putcmdlog "<<$nick>> !$hand! banlist $chan"
}
And second tcl..I need script that will ban anyone who writes *#* in channel #bla..And I wanna to add more channels,2 or 3 ,but not all channels bot is on..
bind pubm -* "*#*" badchar:pub
# Define the channel where u want the kickbans to work:
set bchan "#botchan"
proc badchar:pub {nick uhost hand chan arg} {
global bchan
if {$chan == "#botchan"} {
if {[botisop $bchan]} {
putquick "MODE $bchan +b *!*@[lindex [split $uhost @] 1]"
putserv "KICK $bchan $nick :Bad Character"
}
}
}
Now..I need to have an option that will protect channel ops (will not kick @'s even if they say # on some channel) ..But I need to can put 1 ( protect @'s) ,and 2 (don't protect ops)..And I wanna to can add more channels..