Fixing Incoming Text Conflicts |
Top Previous Next |
The most common script conflict you will see is a display of 2 lines of displayed text everytime someone types something encrypted in your channel. One will be the decrypted statement as generated by mircryption, and another by another script you have installed. Or, you may find that mircryption does not decrypt certain incoming notices.
IMPORTANT: The first thing to do to correct interactions with other scripts is to adjust the order of script loading to move mircryption sripts to the top of the list. Hit alt-R and select menu item File->Order. Move the mircryption scripts to the top of the list, so that they are executed first among any scripts you have installed.
If after moving the mircryption scripts to the top of the loading order you still see duplicate outputs, you can fix conflicts with other scripts by modifying the code of other scripts to be better behaved.
IMPORTANT !!! BEFORE YOU CHANGE ANY EXISTING SCRIPT FILE, BACK IT UP TO A SAFE PLACE !!!
NOTE: These instructions have been modified since version MircryptionSuite 1.0b6. PLEASE REMEMBER: THESE FIXES WILL ONLY WORK IF MIRCRYPTION.MRC IS THE FIRST SCRIPT IN YOUR SCRIPT ORDER LIST.
After mircryption decrypts a string, it sets a mirc variable called $halted, which other scripts should respect, but often do not. To fix conflicts, insert a line following immediately after the first brace defining an on event procedure of type text,action,chat,notice, or topic, as follows.
Most often the prior line will be either of form on ^*:text:* { or of form on ^*:text:* single_command_here
either way, you change it by inserting if ($halted) return | so they become on ^*:text:* { if ($halted) return | and on ^*:text:* if ($halted) return | single_command_here
So that if the text is encrypted, the procedure returns immediately, and if not, then it executes the pre-existing code.
Note that the start text may be slightly different. you are just looking for the :text: part, and just add the if ... return part after the { brace. This change just tells your other scripts to ignore incoming events which have been handled already by other script.
IMPORTANT: Changing :text: lines will fix conflicts with incoming text on channels. You also need to repeat these replacements for for :action: and :notice: and :chat: to fix other kinds of text, like chat windows and /me actions.
See the next section for step-by-step instructions on finding the files to change and making the appropriate changes.
|