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 

Script to say all nicks from chan

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


Joined: 08 Sep 2008
Posts: 26

PostPosted: Fri Jan 09, 2009 8:29 pm    Post subject: Script to say all nicks from chan Reply with quote

Hello, can someone help me with this?
I need a script to say all the nicks from a channel, when i use some trigger like for example: !nick
and when i use that trigger, he says all the nicks from the channel, from where i used it, and it says something like for example:

me: !nick
eggdrop: ALL NICKS FROM CHANNEL
eggdrop: nick, nick1, nick2, nick3 ....etc


Can someone help me out please?

Thank you in advance
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Jan 09, 2009 8:57 pm    Post subject: Reply with quote

Code:
# add your channels this is to work in below. Must be at least one, but can be any amount.
# remember to add them between the double-quotes (" ")
set channelz [split [string tolower "#channel1 #channel2 #etc"]]

bind pub -|- !nick spam:nicklist

proc spam:nicklist {nick uhost hand chan text} {
   if {![string length $text]} {
      set text $chan
   } elseif {![validchan $text]} {
      putserv "privmsg $chan :Invalid channel name ($text)."
      return
   }
   if {[lsearch -exact $::channelz [string tolower $text]]} {
      putserv "privmsg $chan :ALL NICKS FROM CHANNEL ($text):"
      putserv "privmsg $chan :[join [chanlist $chan] ", "]"
   }
}

If you type "!nick" it will give you the nicklist of the channel it is typed in. If you type "!nick #channel" you will get the nicklist of that channel instead.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
unb0rn
Voice


Joined: 08 Sep 2008
Posts: 26

PostPosted: Sat Jan 10, 2009 6:50 am    Post subject: Reply with quote

works like a charm, thank you very much Wink
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 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