multiway notice system

By Cheiron on Aug 05, 2010

This is a more advanced way of sending a mass message in channel for mirc.

it loads into a clean new remotes window on your mirc

unlike onotice or /notice %#channel for example, that messages anything from that rank and higher.... this script allows you to send a oneway notice to "only" the ranks you specifiy in the alias.

the level of receipiants is totally customisable direct on alias..

eg sop and halfop only recieve .. aop and voice only receive .. etc etc

the command is /oneway (rank) message
eg /oneway @+ testing
eg /oneway &@% testing

initial coding credit goes to Alliterative with re-worked coding by myself as a few bugs found that needed correcting/adding.

from channel test.. i have oa in channel ( & ) and PinkLady has o ( @ )

Cheiron oneway message for all @% - testing direct level message system
-Cheiron- [viewable only by channel rank @%] testing direct level message system

(-07:50:32-) -Cheiron- [viewable only by channel rank @%] testing direct level message system ok thankies :)

bugs..

before anyone says ... there is a bug i know of still... it will echo x times to you depending on how many users of that level there are in the channel.. ie if you do /oneway % message .. and there are 4 % in channel .. it wil echo 4 times.

Updates....

bug fixed and code edited. Thanks to WorldDMT for his assistance with that annoying feature.

alias oneway {
  var %i 1
  while $nick(#,%i,$1) {
    .notice $v1 [ $+ viewable only by channel rank $1] $2-
    inc %i
  }
  echo -a $me oneway message for all  $1 - $2-
}

Comments

Sign in to comment.
Cheiron   -  Aug 07, 2010

many thanks for the insight there Jethro_ and appreciate the time, you the more expereinced coders take to show better ways or to help us less experienced coders fix issues :)
hope you liked the script though and welcome any comments to its workings :)

 Respond  
Jethro   -  Aug 05, 2010

I think you should make sure the $1 is entered with the user prefixes, not something else. The $1 and $2 should be made with double $$ to ensure that the message is supplied before the snippet triggers:

alias oneway {
  var %i 1, %rank $iif($regex($$1,/([ $+ $prefix $+ ])/),$regml(1))
  while $nick(#,%i,%rank) {
    .notice $v1 [ $+ viewable only by channel rank %rank] $$2-
    inc %i
  }
  echo -ta $me oneway message for all %rank - $$2-
}

I know it's just an alias for your own use, but an alias can be made to work with an event. If triggered from an event, some people do mistype or tamper with a snippet.

 Respond  
Cheiron   -  Aug 05, 2010

ah!

many kind thanks WorldDMT, much appreciated :)

thats got it

 Respond  
WorldDMT   -  Aug 05, 2010

ie if you do /oneway % message .. and there are 4 % in channel .. it wil echo 4 times. i havent been able to fix this yet despite my efforts. if anyone can help please.
just remove your echo from loop and put it befor the last "}"

alias oneway {
  var %i 1
  while $nick(#,%i,$1) {
    .notice $v1 [ $+ viewable only by channel rank $1] $2-
    inc %i
  }
  echo -a $me oneway message for all  $1 - $2-
}
 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.