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.

Script to say all nicks from chan

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
u
unb0rn
Voice
Posts: 26
Joined: Mon Sep 08, 2008 8:14 am

Script to say all nicks from chan

Post by unb0rn »

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
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

# 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.
u
unb0rn
Voice
Posts: 26
Joined: Mon Sep 08, 2008 8:14 am

Post by unb0rn »

works like a charm, thank you very much ;)
Post Reply