|
Using Mircryption Signals in Scripts
|
Previous Top Next |
| ; Here is a sample signal trap for catching text BEFORE it is displayed on screen.
|
| ; you can implement this signal in your other scripts if you want to detect
|
| ; and act on text BEFORE it is displayed. check $1 for the type of event.
|
| ; The most common use of this signal is to issue the /mchalt or /mchaltdef commands, which will BLOCK
|
| ; mircryption (or mircryption and mirc) from displaying the text when you return from the signal!
|
| ; DONT add your code to this procedure(!!) because it will be overwritten
|
| ; if you upgrade - instead, make your own script file with this code.
|
| on *:SIGNAL:MircryptionSignalAll: {
|
| ; trigger signal for other scripts that want to handle decrypted text, only trigger for text that was received encrypted or outgoing crypted
|
| ; this allows other scripts to be written to trigger on incoming encrypted text, without having to modify mircryption.
|
| ; note, this signal is triggered on your OWN text too(!), just detect the case where $1==input.
|
| ; $1 = event type (input,text,query,notice,action,join,topic,part,kick,quit,nick,mode)
|
| ; $2 = target ($chan)
|
| ; $3 = speaker ($nick)
|
| ; $4 = is $true if text was encrypted or $false if plaintext
|
| ; $5- = decrypted text
|
|
|
| ;uncomment to test this
|
| ;/echo TRAPPED MircryptionSignalAll: event: $1 , target: $2 , speaker: $3 , encrypted: $4, firstword = $5, text: $5-
|
| ;if ($5 == hidethis) {
|
| ; ; this test hides all lines (incoming, actions, outgoing, everything - which starts with the word hidethis)
|
| ; echo 4 MircryptionSignalAll test, hiding your statement.
|
| ; /mchaltdef
|
| ;}
|
| }
|