Global ame and amsg (for multi servers)

By IzNoGuD on Mar 07, 2008

I was quite bored because my mp3 announce system didn't want to send info on all servers I'm on, but just on the currently active one.

So I've got an idea, how to extend usage of ame command.

Later on, I've added global amsg option too, it can be handy too.

usage is simmilar as ame and amsg commands, I named new ones as gme and gmsg to keep the analogy and g instead of a to point it's global :D

So,

/gme Beware I is in da house !!!

should result something like this

  • sioux Beware, I is in da house !!!
  • @IzNoGuD Beware, I is in da house !!!
  • @KaiserSouze Beware, I is in da house !!!

Those are three my nicks on three different servers.

alias gme {
  set %scid $scid(0)
 while ( %scid > 0 ) {
  if ($network != $null) { scon %scid ame $1- }
    dec %scid
  }
}

alias gmsg {
  set %scid $scid(0)
  while ( %scid > 0 ) {
  if ($network != $null) { scon %scid amsg $1- }
    dec %scid
  }
}

Comments

Sign in to comment.
Resinator   -  Apr 29, 2016

Nice, this is useful. I adapted this to a /gecho command for an alert system but had to add a $cid check.

alias gecho {
  set %scid $scid(0)
  while ( %scid > 0 ) {
    if ($network != $null && $cid !isin %gecho) { set %gecho $addtok(%gecho,$cid,32) | scon %scid echo 4 -a Alert Stuff Here! }
    dec %scid
  }
  unset %gecho
}
raccoon  -  May 07, 2016

/scon with /echo -a is mostly pointless. Your active window is active.

Resinator  -  Sep 17, 2016

That's what you would logically think. However in practice the script would always echo the output into the last active channel on the network in which the script would activate. In this case used as a highlight script for a torrent tracker announce channel, it would never echo into the active channel of the active network in which i was chatting.

Sign in to comment

Roy911   -  Mar 07, 2008

Actually, I personally use the following, feel free to post:

alias gmsg { scon -at1 amsg $1- }
alias gme { scon -at1 ame $1- }

(Test it btw, I just typed it up on a whim.)

 Respond  
IzNoGuD   -  Mar 07, 2008

Thanks on suggestion Roy911, haven\'t notice that problem .
I\'ve added network check and tested it, works good even with opened, not connected server windows :D

 Respond  
Roy911   -  Mar 07, 2008

Okay, but just note that since $scid(0) counts only opened serv er windows, any server windows you have open that aren\'t connected result in an error and halts the script. I know that since I used to use a similar method to what you have.

Therefore, I recommend you add some sort of checking to the script like if ($network != $null) { amsg } or something of that sort.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.