All you need is an on text script to do that.

Code:
on *:text:!admin:#channel: {
  var %admins = admin_nick_1 admin_nick_2 admin_nick_3
  var %c = 1, %t = $numtok(%admins,32)
  while (%c <= %t) {
    if ($gettok(%admins,%c,32) ison $chan) { var %admins.online = $addtok(%admins.online,$gettok(%admins,%c,32),44) }
    inc %c
  }
  msg %admins.online $nick needs help in $chan $+ .
}


Just repeat and change each admin_nick_* and #channel. You can add as many nicks as you want to the var %admins line. Separate them with spaces as shown.

How it works... when someone types !admin, the script will loop through and check each nick on your %admins line to see if they are in the channel. If so, it will add them to a list of online admins (separated by commas), then message them as /msg nick1,nick2,nick3 Message here. This prevents you from possibly being flooded offline for sending individual messages to too many people at once. You are limited to the number of nicks you can have (the length of the number of nicks), but you'd need at least 40-50 nicks to hit the limit, so that's not likely to be a problem for you.

You could make the script smaller by not having it check if the person is in the channel, but then you'll just get errors if one or more of the nicks are offline. This at least prevents the error messages.

Also, note that if you're just sending message to ops, you can skip having nicks and just send a message to all of the ops instead. On many networks, this can be done with wallops. For others, you can loop through the ops in the channel the same way this loops through your list of nicks and then send it out in the same way.

Here is how it works if you want everyone with op status to get the message:

Code:
on *:text:!admin:#channel: {
  var %c = 1, %t = $nick($chan,0,o)
  while (%c <= %t) {
    var %ops = $addtok(%ops,$nick($chan,%c,o),44) }
    inc %c
  }
  msg %ops $nick needs help in $chan $+ .
}


Remember to replace #channel with the channel name.

Last edited by Riamus2; 04/03/10 02:31 PM.