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.

Message everyone in a channel

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Message everyone in a channel

Post by vigilant »

Once i type a command, and there are 7 users in the channel. It excludes chanserv and the bot itself, but messages the rest of the people with a privmsg.. i want to do this. After that once it's messaged, then if someone leaves the channel, it does something... i'll define that later.. lets say ban the person from another chan...
Thanks a whole bunch
Anser Quraishi
Website: http://www.anserq.com
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pub - !msg msg:all

proc msg:all {nick uhost hand chan arg} {
 foreach n [chanlist $chan] {
  if {[isbotnick $nick] || [string equal -nocase "chanserv" $n]} {continue}
  puthelp "privmsg $n :$arg"
 }
}
!msg <message> will msg all users except the bot and chanserv (public command).
v
vigilant
Halfop
Posts: 48
Joined: Thu Jan 05, 2006 12:06 am

Post by vigilant »

Thank you 8)
Anser Quraishi
Website: http://www.anserq.com
Post Reply