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 

!userlist script by Tosser^^

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
nsrafk
Halfop


Joined: 11 May 2007
Posts: 73

PostPosted: Thu Mar 20, 2008 11:57 am    Post subject: !userlist script by Tosser^^ Reply with quote

Code:
#############################################################################################################################################################################################
## Userlist Version 1.01 By Tosser^^ ########################################################################################################################################################
## Contact: IRC: Nickname: Tosser^^ Channels: #ShoVe & #bots.net & #CupCentrum & #SLuiP @ Quakenet.org Email: chris@cs-room.com #############################################################
## Useage: !userlist in channel, need atleast global +o or channel +f flags to dump userlist ################################################################################################
## Output: (( Handle: Users handle on the bot || Nickname: offline or nickname displayed || Host(s): The hostnames added to the bot for this user || Channel Flags: Users channel flags )) ##
#############################################################################################################################################################################################

# Bind(s)

bind pub m|m !userlist user_list

#----------------------------------------------------------------------------

# The Script                                                                 
# Do not edit anything beyond this line unless you know what you are doing!!
 
#----------------------------------------------------------------------------

proc user_list {nick uhost hand chan text} {
if { [userlist |amnovf $chan] == "" } {
putserv "NOTICE $nick :No users found in my userlist for $chan"
} else {
putquick "NOTICE $nick :Userlist for $chan"
foreach user [userlist |amnovf $chan] {
set usersnick [hand2nick $user]
if { $usersnick == "" } {
putquick "NOTICE $nick :(( Handle: $user || Nickname: Offline, or not in any of the bots channels. || Host(s): [getuser $user HOSTS] || Channel Flags: +[lindex [split [chattr $user $chan] |] 1] ))"
} else {
putquick "NOTICE $nick :(( Handle: $user || Nickname: $usersnick || Host(s): [getuser $user HOSTS] || Channel Flags: +[lindex [split [chattr $user $chan] |] 1] ))"
}
}
putquick "NOTICE $nick :End of list."
}
}

putlog "Userlist Version 1.01 By Tosser^^ Loaded!!, Use !userlist in channel to dump the userlist"



Im wondering if anybody could add a bit of code to make it work this way:

Lets say i have 21 bots divided up in 5 groups (4 bots in each group + a hub bot). A main channel like #mainchan where all the bots is in would then be the headquarters. So, if i load "this" !userlist script, i'd then have
to do like;

!userlist #chan1 (a chan where 1 of the bot groups is in)
!userlist #chan2 ( ... )
etc

Atm ive loaded the userlist.tcl script in 5 bots (1 bot for each group) so i can do !userlist in any channel one of my groups is in, to get a response, hehe. Would love to make it work like the way i described above Smile

Does it make any sense? Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu Mar 20, 2008 12:13 pm    Post subject: Reply with quote

I'm quite sure he could, try emailing chris@cs-room.com.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Thu Mar 20, 2008 1:02 pm    Post subject: Reply with quote

That email address is not used anymore, this is also a very old script (one of my first scripts!).

Code:
bind pub -|- !userlist pub:userlist

proc pub:userlist {nickname hostname handle channel text} {
    if {![matchattr $handle nmovf|nmovf $channel]} {
        putserv "NOTICE $nickname :You have no access to this command!"
    } else {
        if {$text != ""} {
            if {![string index [set channel [lindex [split $text] 0]] 0] != "#"} {
                set channel "#$channel"
            }
            if {![validchan $channel]} {
                putserv "NOTICE $nickname :You specified an invalid channel. Usage: $lastbind ?#channel? (where channel is optional)."
                return
            }
        }
        if {[userlist |nmovf $channel] == ""} {
            putserv "NOTICE $nickname :No users for $channel."
        } else {
            putserv "NOTICE $nickname :Userlist for $channel."
            foreach user [userlist |nmovf $channel] {
                if {$user == ""} { continue }
                putserv "NOTICE $nickname :(( Handle: $user || Nickname: [expr {[hand2nick $user] == "" ? "Offline" : "[hand2nick $user]"}] || Hosts: [join [getuser $user HOSTS] ", "] || Channel flags: +[lindex [split [chattr $user $channel] |] 1] ))"
                }
            }
            putserv "NOTICE $nickname :End of list."
        }
    }
}


Not tested!
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
nsrafk
Halfop


Joined: 11 May 2007
Posts: 73

PostPosted: Thu Mar 20, 2008 5:12 pm    Post subject: Reply with quote

Woo, thanks. Let me test it out and see if it works good Smile
Back to top
View user's profile Send private message
nsrafk
Halfop


Joined: 11 May 2007
Posts: 73

PostPosted: Thu Mar 20, 2008 5:27 pm    Post subject: Reply with quote

Hehe, first i needed to remove a "}" Smile

Then on !userlist #channel i get this in partyline:

[22:26] Tcl error [::bc::onEncryptedText]: can't use non-numeric string as operand of "!"


... dont mind the ::bc:: stuff, its because im using blowcrypt Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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