SHARE
TWEET

AMSG Channel Exempt

Seb May 20th, 2010 (edited) 279 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. alias amsg {
  2.   /*
  3.   Make sure you are connected to a server and
  4.   that the command isn't used as an identifier
  5.   */
  6.   if ($server) {
  7.     if (!$isid) {
  8.       ; Get the total amount of channels you are in on this server
  9.       var %x = $comchan($me,0)
  10.  
  11.       /*
  12.       List of all unwanted amsg channels:
  13.       You can add other channels if you want,
  14.       has to be separated by a space
  15.       */
  16.       var %y = #cservice #Fatalzone
  17.  
  18.       ; Loop through them
  19.       while (%x) {
  20.         ; If the channel in this iteration is not one of those in the $istok, msg the input
  21.         if (!$istok(%y, $comchan($me,%x), 32)) {
  22.           msg $comchan($me, %x) $1-
  23.         }
  24.         dec %x
  25.       }
  26.     }
  27.     else echo $color(info) -a * /amsg: Improper usage; Command Only!
  28.   }
  29.   else echo $color(info) -a * /amsg: not connected to server
  30. }
RAW Paste Data
Top