# Ban Counter by BarkerJr
#
# Usage: .bans [channel]
# If channel is not specified, the current channel is assumed.
# Set this to the prefix you use for commands ("" if you don't want a prefix)
#set cmdchar "."
bind pub - ${cmdchar}bans pub:bans
proc pub:bans {nick uhost hand chan arg} {
set ctr 0
if {![validchan $arg]} {
if {$arg != ""} {
puthelp "PRIVMSG $chan :Bans: Invalid channel, assuming current channel"
}
set arg $chan
}
set bans [banlist $arg]
while {[lindex $bans $ctr] != ""} {
set ctr [expr $ctr + 1]
}
set banctr $ctr
set bans [banlist]
while {[lindex $bans $ctr] != ""} {
set ctr [expr $ctr + 1]
}
puthelp "PRIVMSG $chan :Bans: [expr $banctr + $ctr]"
return 1
}
EEggy wrote:Hi, i found this ban counter script at egghelp.org, but script counts doesn't match with bot's dcc commands .bans all's output , not even close
# Ban Counter by BarkerJr
#
# Usage: .bans [channel]
# If channel is not specified, the current channel is assumed.
# Set this to the prefix you use for commands ("" if you don't want a prefix)
#set cmdchar "."
bind pub - ${cmdchar}bans pub:bans
[snip]
the public .bans command will show you how many bans have been set in the channel, the dcc .bans all command shows you all global bans in this channel and other channels.