egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

a little help please...

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
mavericku
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: somewhere in the world

PostPosted: Sat Dec 16, 2006 9:26 pm    Post subject: a little help please... Reply with quote

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:
 .listbanners


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
View user's profile Send private message Visit poster's website MSN Messenger
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Dec 16, 2006 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Dec 17, 2006 10:50 am    Post subject: Reply with quote

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
View user's profile Send private message
mavericku
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: somewhere in the world

PostPosted: Sun Dec 17, 2006 8:30 pm    Post subject: Reply with quote

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

Cheers mates
_________________
mavericku
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber