Custom Amsg and Ame Alias

From Scriptwiki
Revision as of 09:54, 11 September 2005 by BlackShroud (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.

You will have to paste this script into the 'Aliases' section of mIRC's script editor.

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