From WikiChip
Difference between revisions of "mirc/on events/on parseline"
< mirc‎ | on events

Line 4: Line 4:
 
== Synopsis ==
 
== Synopsis ==
 
<source lang="mIRC">
 
<source lang="mIRC">
on <level>:parseline:in|out:<matchtext>:<commands>
+
on <level>:parseline:in|out|*:<matchtext>:<commands>
 
</source>
 
</source>
  

Revision as of 11:53, 4 October 2018

The on parseline event triggers before incoming/outgoing IRC server lines are received/sent and allows a script to modify them

Synopsis

on <level>:parseline:in|out|*:<matchtext>:<commands>

Level

Matchtext

See the on text event page for a definition of the <matchtext> parameter

/parseline

Inside this event, you can use /parseline without the -q switch to change the line.

Local identifiers

The on parseline event expose 3 local identifiers

$parsetype

Return the type of line, "in" or "out"

$parseline

Return the line being sent/received.

Note: For out lines, $parseline is terminated with a $LF character that is not visible when viewed in mIRC. You may wish to remove this with:

var %pl $parseline
if ($asc($right(%pl,1)) == 10) %pl = $right(%pl,-1)

$parseutf

Return $true if mIRC is going to decode/encode utf8 the message after the on parseline event

See also