When people type !banlist in the channel, i want to count the bans, and if its greater than 10, tell them to go to the web page, otherwise just show the bans.
I cant discover anything wrong with my code, but somehow it just shows the channel bans in the channel, and doesnt give them a link to the URL...
Here's a piece of code:
Code: Select all
set num_bans [llength [banlist $chan]]
if {$num_bans > 10} {
putserv "NOTICE $nick :I have more than 10 bans in my banlist. You can view the banlist at http://blablabla.com. This banlist is updating every 5 minutes."
return 0
}
set num 1
foreach bans [banlist $chan] {
set ban [lindex $bans 0]
set reason [lindex $bans 1]
..................
..............
..........etc