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.

a little help please...

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
mavericku
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 11:32 pm
Location: somewhere in the world
Contact:

a little help please...

Post by mavericku »

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 :

Code: Select all

 .listbanners 
to show

Code: Select all

$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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

This would sum all bans on all channels, providing a summary similar to your request...

Code: Select all

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
User avatar
mavericku
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 11:32 pm
Location: somewhere in the world
Contact:

Post by mavericku »

thank you very much nml375 .
thanks to rosc2112 as well for the tips.

Cheers mates
mavericku
Post Reply