| View previous topic :: View next topic |
| Author |
Message |
mavericku Halfop

Joined: 12 Jun 2005 Posts: 62 Location: somewhere in the world
|
Posted: Sat Dec 16, 2006 9:26 pm Post subject: a little help please... |
|
|
Cheers guys,
i have another problem on which i need your help, if possible.
I`m in need of a script that will show this :
at the command of :
to show
| Code: |
$hand1 = 1231 bans
$hand2 = 21 bans
$hand3 = 12 bans
|
accordingly to the bots banlist for a specific channel ...
it is a script that shows the users who banned more.
hope i was explicit with my request _________________ mavericku |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Dec 16, 2006 9:59 pm Post subject: |
|
|
banlist [channel]
Returns: a list of global bans, or, if a channel is specified, a
list of channel-specific bans. Each entry is a sublist containing:
hostmask, comment, expiration timestamp, time added, last time
active, and creator. The three timestamps are in unixtime format.
Module: channels
Easy to make, just use [lindex] to extract the creator's name field, then count the number of matches. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Dec 17, 2006 10:50 am Post subject: |
|
|
This would sum all bans on all channels, providing a summary similar to your request...
| Code: | bind dcc - listbanners list_banners
proc list_banners {hand idx txt} {
array set b_tmp {}
foreach ban [banlist] {
set banner [lindex $ban 5]
if {![info exists b_tmp($banner)]} {
set b_tmp($banner) 1
} {
incr b_tmp($banner)
}
}
foreach channel [channels] {
foreach ban [banlist $channel] {
set banner [lindex $ban 5]
if {![info exists b_tmp($banner)]} {
set b_tmp($banner) 1
} {
incr b_tmp($banner)
}
}
}
foreach {banner bans} [array get b_tmp] {
putidx $idx "$banner = $bans bans"
}
} |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
mavericku Halfop

Joined: 12 Jun 2005 Posts: 62 Location: somewhere in the world
|
Posted: Sun Dec 17, 2006 8:30 pm Post subject: |
|
|
thank you very much nml375 .
thanks to rosc2112 as well for the tips.
Cheers mates _________________ mavericku |
|
| Back to top |
|
 |
|