Top

Msg halt script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  2.0 (of 1 scores)
Date Added  Nov 20, 2008
Last Updated  Nov 20, 2008
Tags  diamond  halt  mirc  msg  script 

Introduction

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.

Grab the Code

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

  (6)  RSS
mountaindew
Comments: 1,826
 
mIRC Snippet:  Msg halt script
Posted on Nov 20, 2008 2:24 pm
I'd use $istok for the channels, so it's easier to add more.
Code:

alias msg if ($istok(#mSL #mIRC #IRChelp #BNC,$chan,32)) halt
RusselB
Comments: 151
 
mIRC Snippet:  Msg halt script
Posted on Nov 21, 2008 4:08 am
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.

Code:
 alias msg { if !$istok(#mSL #mIRC #IRChelp #BNC,$chan,32) {   /!msg $chan $$1-  } }
Diamond
Comments: 8
 
mIRC Snippet:  Msg halt script
Posted on Nov 25, 2008 8:34 am
Ooo... What does $istok?
jonesy44
Comments: 1,856
 
mIRC Snippet:  Msg halt script
Posted on Nov 25, 2008 2:39 pm
/help $istok

istok = is token, if it's a token within xx
napa182
Comments: 1,454
 
mIRC Snippet:  Msg halt script
Posted on Nov 25, 2008 4:03 pm
$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
Diamond
Comments: 8
 
mIRC Snippet:  Msg halt script
Posted on Nov 29, 2008 10:42 am
O :D

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom