Difference between revisions of "Haltdef"
(no need to redirect to the same article, somehow) |
(you -> use) |
||
Line 2: | Line 2: | ||
/haltdef | /haltdef | ||
− | To stop mIRCs default text, you need to use the ^ event prefix in the specific event. So you can either | + | To stop mIRCs default text, you need to use the ^ event prefix in the specific event. So you can either use haltdef, that only halts the default text without halting the entire script, or halt, that stops the entire script. |
'''Note''' that the ^ event doesn't replace your existing event. Your normal event is independent and is still processed whether there is a ^ event in a script or not. | '''Note''' that the ^ event doesn't replace your existing event. Your normal event is independent and is still processed whether there is a ^ event in a script or not. |
Revision as of 23:02, 26 November 2005
Stops mIRCs default text for various types of IRC Server events.
/haltdef
To stop mIRCs default text, you need to use the ^ event prefix in the specific event. So you can either use haltdef, that only halts the default text without halting the entire script, or halt, that stops the entire script.
Note that the ^ event doesn't replace your existing event. Your normal event is independent and is still processed whether there is a ^ event in a script or not.
You can check if a script has already halted the default text by using the $halted identifier; it returns $true if a user has used /halt or /haltdef in a ^ event, and $false if not.
The ^ event prefix currently works only on the following types of events: [[On_action|ACTION], BAN, CHAT, DEHELP, DEOP, DEVOICE, HELP, INVITE, JOIN, KICK, MODE, NICK, NOTICE, OP, OPEN, PART, PING, TEXT, UNBAN, USERMODE, VOICE, QUIT, SERV, SERVERMODE, SNOTICE, TOPIC, WALLOPS.
Though, you can use haltdef for raws too, stopping their default output.
Note that halting the default text for an event affects how mIRC displays the most basic information about IRC events to a user, so it should be used carefully.
Example
On ^*:Text:*fuck*:*: { haltdef }
This would stop mIRC showing a sentence containing the word "fuck", both in a channel or in private.
on ^1:OPEN:?:*: { if ($istok(Spam1 Spam2 eriowj,$nick,32)) { halt } }
This example would pretend mIRC opening a chat window if someone called "Spam1", "Spam2" or "eriowj" queries you.