Msg halt script

By Diamond on Nov 20, 2008

How to halt scripts in a channel.

Block you from messaging in a channel that you wont msg.

Used by /msg.

You may also type it to msg chan, but dont /msg.

Like:

On $*:Text:/^[!.]msg/Si:#: {
msg # - $+ $nick $+ - Wanted me to say: $2- $+ .
}

This script will be blocked.

Alias msg {
  if ($chan == #Channel || $chan == #Channel) {
    halt
  }
  else {
    msg $$1- 
  } 
}

You can also change "#Channel" with the channel you want to block.
Channel that is needed to block if you are on them:
#mSL #mIRC #IRChelp #BNC

Comments

Sign in to comment.
Diamond   -  Nov 29, 2008

O :D

 Respond  
napa182   -  Nov 25, 2008

$istok if token exists within text true if not false $istok(text,token,C) The C parameter is the ascii value of the character separating the tokens.

so useing $istok(#chan1 #chan2 #chan3,$chan,32) 32 = space
$istok(#chan1.#chan2.chan3,$chan,46) 46 = period

 Respond  
Jonesy44   -  Nov 25, 2008

/help $istok

istok = is token, if it's a token within xx

 Respond  
Diamond   -  Nov 25, 2008

Ooo... What does $istok?

 Respond  
RusselB   -  Nov 21, 2008

Aside from using $istok for the channels, your current code would not work properly, as mIRC doesn't allow internal recursion of commands, yet the msg in the else section would call the alias again.

To force mIRC to use the built-in coding for the /msg command, prefix the command with an !

ie: /!msg

Also, you don't specify where the final message is to be sent to.

 alias msg { if !$istok(#mSL #mIRC #IRChelp #BNC,$chan,32) {   /!msg $chan $$1-  } }
 Respond  
guest598594   -  Nov 20, 2008

I'd use $istok for the channels, so it's easier to add more.

alias msg if ($istok(#mSL #mIRC #IRChelp #BNC,$chan,32)) halt
 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.