Common Channel Message

By RusselB on May 31, 2007

A little code that allows you to send a message to just the channels that you and another nick share. Sort of like a common channel /amsg command.

Usage: /cmsg
or /cmsg ,

NOTE: The , must be between the list of nicks and the message.
If a parameter is missing, it will be prompted for.

The message parameter will be prompted for on a nick by nick basis, but the first message (or the most recently entered message) will automatically be filled in in the prompt window.

NOTE: This has been briefly tested, but I do not guarantee full compatability, in addition there's no checking to ensure that the maxtargets as specified by the server.

alias cmsg {
  var %cmsg.nicks = $iif($gettok($1-,1,44),$v1,$$input(Space or Comma separated,e,Matching nicks))
  %cmsg.nicks = $replace(%cmsg.nicks,$chr(44),$chr(32))
  var %a = 1, %b = $numtok(%cmsg.nicks,32)
  while %a <= %b {
    var %cmsg.msg = $iif($gettok($1-,2,44),$gettok($1-,2,44),$$input(Common message,e,,$iif(%cmsg.msg,$v1)))
    var %cmsg.nick = $gettok(%cmsg.nicks,%a,32), %c = 1, %d = $comchan(%cmsg.nick,0)
    while %c <= %d {
      var %cmsg.chans = $addtok(%cmsg.chans,$comchan(%cmsg.nick,%c),44)
      inc %c
    msg %cmsg.chans %cmsg.msg
    inc %a


Sign in to comment.
Zeroodemon   -  May 31, 2007

Thats pretty kewl.

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.