mIRC Home    About    Download    Register    News    Help

Print Thread
msg like /ame #209894 25/02/09 07:40 PM
Joined: Feb 2007
Posts: 91
S
spermis Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Feb 2007
Posts: 91
Hello. Is it possible, and how to make a command for example "/ame2", that would work like "/ame", but so it wont msg to specified channels. For example: I specify always not to msg to #channel2, and i am in channels - #chan1 #channel2 #channel3 etc. So i use command /ame2 Hello, and it shows /me Hello in every channel except #channel2, because it is specified not to msg there.
Thanks.

Re: msg like /ame [Re: spermis] #209896 25/02/09 08:43 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Code:
alias ame2 {
  ; separate excluded channels with spaces
  var %n = 1, %excluded = #channel1 #channel2 #channelX
  while ($chan(%n)) {
    var %c = $v1
    if ($chan(%c).status == joined) && (!$istok(%excluded,%c,32)) { describe %c $$1- }
    inc %n
  }
}

or (I'd call it "smartass variation"):
Code:
alias ame2 {
  var %chans, %n = 1, %exclude = #channel1 #channel2 #channelX
  while ($chan(%n)) {
    var %c = $v1
    if ($chan(%c).status == joined) && (!$istok(%exclude,%c,32)) {
      var %chans = $addtok(%chans,%c,44)
      echo -tc action %c * $me $$1-
    }
    inc %n
  }
  raw -q PRIVMSG %chans $+(:,$chr(1),ACTION) $$1-
}

Last edited by Horstl; 25/02/09 10:01 PM.