This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

ban counts

Help for those learning Tcl or writing their own scripts.
Post Reply
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

ban counts

Post by ap »

Hi, i'm trying to count and display the sticky bans only from the global banlist but no luck. i'm trying this. Can someone help me pls. thx
code snip..

Code: Select all

set count 0
foreach b [banlist]{
    if {[string match -nocase "*stick*" $b]} {
      incr count
   }
}
putlog "Number of sticky bans: $count" 
###
Also I've tried the following as well but it doesn't work

Code: Select all

foreach b [banlist]{
   if {[isbansticky $b]} { 
       putlog "Sticky bans: $b"
   }
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set count 0
foreach b [banlist]{
    if {[isbansticky [lindex $b 0]]} {
      incr count
   }
}
putlog "Number of sticky bans: $count"
a
ap
Halfop
Posts: 44
Joined: Fri Jun 09, 2006 12:20 am

Post by ap »

thank you, Sir_Fz
Post Reply