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.
Help for those learning Tcl or writing their own scripts.
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sat Dec 23, 2006 3:09 pm
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"
}
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Dec 23, 2006 10:00 pm
Code: Select all
set count 0
foreach b [banlist]{
if {[isbansticky [lindex $b 0]]} {
incr count
}
}
putlog "Number of sticky bans: $count"
ap
Halfop
Posts: 44 Joined: Fri Jun 09, 2006 12:20 am
Post
by ap » Sat Dec 23, 2006 10:16 pm
thank you, Sir_Fz