Custom Amsg and Ame Alias

From Scriptwiki
Revision as of 07:48, 9 September 2005 by Doomie (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

With these custom amsg and ame aliases, you are able to exclude certain channels from your amsg and ame commands, since many people conceive them as annoying.

nochannels {
;add channels where you don't want your /ame and /amsg to go to.
 return #help.script,#feds,#help,#other_channels 
}
amsg { 
 var %a = 1, %t 
 while (%a <= $chan(0)) {
  if (!$istok($nochannels,$chan(%a),44)) { 
   var %t = %t $+ $chr(44) $+ $chan(%a) 
   echo $color(own text) -t $chan(%a) < $+ $nick($chan(%a),$me).pnick $+ > $1- 
  } 
  inc %a 
 } 
 .raw PRIVMSG $right(%t,-1) $+(:,$chr(32),$1-) 
} 
ame { 
 var %a = 1, %t 
 while (%a <= $chan(0)) {
  if (!$istok($nochannels,$chan(%a),44)) {
   var %t = %t $+ $chr(44) $+ $chan(%a) 
   echo $color(action text) -t $chan(%a) * $nick($chan(%a),$me).pnick $1- 
  } 
  inc %a
 } 
 .raw PRIVMSG $right(%t,-1) $+(:,$chr(1),ACTION,$chr(32),$1-,$chr(1)) 
}
Contributed by Kr3L1S