From WikiChip
Difference between revisions of "mirc/local identifiers"
< mirc

(Non IRC events)
(Non IRC events)
(4 intermediate revisions by the same user not shown)
Line 66: Line 66:
 
* {{mIRC|ctcp event}}
 
* {{mIRC|ctcp event}}
  
There a few more local identifier related to IRC which exists only in specific events:
+
There a few more local identifier related to IRC which exists only in specific IRC events/case:
  
 
* {{mirc|$banmask}} - used inside {{mIRC|on ban}} and {{mIRC|on unban}}, returns the mask that is being banned/unbanned
 
* {{mirc|$banmask}} - used inside {{mIRC|on ban}} and {{mIRC|on unban}}, returns the mask that is being banned/unbanned
Line 78: Line 78:
 
* {{mirc|$cd}} - used inside the {{mIRC|on chat}} and {{mIRC|on serv}} events, returns the current directory of the connected user
 
* {{mirc|$cd}} - used inside the {{mIRC|on chat}} and {{mIRC|on serv}} events, returns the current directory of the connected user
 
* {{mIRC|$parseline}} {{mIRC|$parsetype}} {{mIRC|$parseutf}} - available in the {{mIRC|on parseline}} event, returns the raw line, the in/out type of direction, and whether or not mIRC is going to decode to utf8 respectively.
 
* {{mIRC|$parseline}} {{mIRC|$parsetype}} {{mIRC|$parseutf}} - available in the {{mIRC|on parseline}} event, returns the raw line, the in/out type of direction, and whether or not mIRC is going to decode to utf8 respectively.
 +
* {{mirc|$msgstamp}} - returns UTC timestamp for a irc server message that has an IRCv3 @time prefix tag
  
 
=== Non IRC events ===
 
=== Non IRC events ===
Line 90: Line 91:
 
* {{mirc|$parsetype}} - used inside {{mIRC|on parseline}}, returns the type of message, in/out
 
* {{mirc|$parsetype}} - used inside {{mIRC|on parseline}}, returns the type of message, in/out
 
* {{mirc|$parseutf}} - used inside {{mIRC|on parseline}}, returns $true if the line is going to be utf8 encoded/decoded after the event
 
* {{mirc|$parseutf}} - used inside {{mIRC|on parseline}}, returns $true if the line is going to be utf8 encoded/decoded after the event
* {{mirc|$signal}} - used inside {{mIRC|on signal}}, returns the name of the signal
 
 
* {{mirc|$target}} - used inside events which accept a window parameter, returns the name of the window
 
* {{mirc|$target}} - used inside events which accept a window parameter, returns the name of the window
 
* {{mIRC|$agentname}} - used inside {{mIRC|on agent}}, returns the name of the agent.
 
* {{mIRC|$agentname}} - used inside {{mIRC|on agent}}, returns the name of the agent.
Line 111: Line 111:
 
* {{mirc|$raddress}} - used inside {{mirc|on dns}}, returns the resolved address
 
* {{mirc|$raddress}} - used inside {{mirc|on dns}}, returns the resolved address
 
* {{mirc|$naddress}} - used inside {{mirc|on dns}}, returns the address being resolved
 
* {{mirc|$naddress}} - used inside {{mirc|on dns}}, returns the address being resolved
* {{mirc|$modefirst}} -
+
* {{mirc|$modefirst}} - used inside any channel specific mode event (on op, on dehelp, but not on rawmode or on mode), returns $true if the mode you're dealing with is the first
* {{mirc|$modelast}} -
+
* {{mirc|$modelast}} - used inside any channel specific mode event (on op, on dehelp, but not on rawmode or on mode), returns $true if the mode you're dealing with is the last
* {{mirc|$mode}}
+
* {{mirc|$mode}} - used typically inside {{mirc|on rawmode}}, returns the Nth nick affected by a mode.
  
 
=== $1- ===
 
=== $1- ===
Line 119: Line 119:
 
Additionally '''$1-''' is filled with a message, applicable in the following events:
 
Additionally '''$1-''' is filled with a message, applicable in the following events:
  
* {{mIRC|on text}}, {{mIRC|on action}}, {{mIRC|on chat}}, {{mIRC|on snotice}}, {{mIRC|on notice}} {{mIRC|on serv}}, {{mIRC|on open}}, {{mIRC|on ctcpreply}}, {{mIRC|ctcp}} returns the text that was sent by the user
+
* {{mIRC|on text}}, {{mIRC|on action}}, {{mIRC|on chat}}, {{mIRC|on snotice}}, {{mIRC|on notice}} {{mIRC|on serv}}, {{mIRC|on open}}, {{mIRC|on ctcpreply}}, {{mIRC|ctcp_events|ctcp}} returns the text that was sent by the user
 
* {{mIRC|on input}} - returns the text in the editbox
 
* {{mIRC|on input}} - returns the text in the editbox
 
* {{mIRC|on kick}} - returns the kick message
 
* {{mIRC|on kick}} - returns the kick message

Revision as of 17:21, 27 April 2019

Local identifiers are identifiers which only function inside specific events. Attempting to call such identifiers from outside of their designed scope might have undesired results or might simply return $null.

Below is a list of all the local identifiers for all events.

All events

  • $event - returns the name of the event
  • $halted - returns $true if the default actions for this event has been halted
  • $eventid - returns an ID so that dll can evaluate local identifiers during events.
  • $eventparms - if the event has a matchtext, returns the value of the matchtext with spacee preserved
  • $matchkey - if the event has a matchtext, returns the value of the matchtext, with spaces lost.

IRC related events which involve an user

  • $address - returns the address of the user triggering the event in the format user@host
  • $maddress - returns the address of the user for that event, as provided by the server
  • $fulladdress - returns the full address of the user triggering the event in the format nick!user@host
  • $nick - returns the nickname of the user triggering the event
  • $rawmsg - returns the raw server line message
  • $rawbytes - returns the undecoded raw line message.
  • $site - return the part after the @ in $address
  • $wildsite - returns the address of the user triggering the event in the format *!*@host
  • $ulevel - returns the level of the user that was matched for the triggered event.
  • $clevel - returns the matching event level for a triggered event


They apply to:

There a few more local identifier related to IRC which exists only in specific IRC events/case:

Non IRC events

Here is a list for non IRC events:

  • $filename - used inside on filesent, on getfail, on midiend, on waveend, on songend, on nosound, on playend, on mp3end, returns the filename that was involved
  • $hotline - used inside on hotlink, returns the full line containing the word which made the event triggers.
  • $hotlink - used inside on hotlink, returns informations about the context in which the on hotlink event triggered
  • $hotlinepos - used inside on hotlink, returns line number and word position of the matched word
  • $parseline - used inside on parseline, returns the line being parsed
  • $parsetype - used inside on parseline, returns the type of message, in/out
  • $parseutf - used inside on parseline, returns $true if the line is going to be utf8 encoded/decoded after the event
  • $target - used inside events which accept a window parameter, returns the name of the window
  • $agentname - used inside on agent, returns the name of the agent.
  • $window - returns the name of the window that was left in a 'leave' menu {} event, whereas $leftwin is not a local identifier
  • $ctrlenter - used inside on input, returns $true if keys control+enter have been used to trigger the event.
  • $inpaste - used inside on input, returns $true if the event is triggering because you are pasting (multiple lines usually), not because you pressed enter.
  • $did - used inside on dialog, returns the ID of the control that is triggering the event
  • $dname - used inside on dialog, returns the name of the dialog that is triggering the event
  • $devent - used inside on dialog, returns the name of the event that is triggering the on dialog event.
  • $keyval - used inside on keydown and on keyup, returns the value of the keypress, always a number.
  • $keychar - used inside on keydown and on keyup, returns the character of the keypress.
  • $keyrpt - used inside on keydown, returns $true if the event triggers because the key is held down.
  • $menu - used inside menu { } event, returns the name of the menu
  • $menutype - used inside menu { } event, returns the type of the menu
  • $menucontext - used inside menu { } event, returns the context in which the popup was created
  • $sockbr - used inside socket events where /sockread is allowed, returns the number of bytes read
  • $sockname - used inside socket events, returns the name of the socket
  • $signal - used inside on signal event, returns the name of the signal.
  • $iaddress - used inside on dns, returns the ip address, if available
  • $raddress - used inside on dns, returns the resolved address
  • $naddress - used inside on dns, returns the address being resolved
  • $modefirst - used inside any channel specific mode event (on op, on dehelp, but not on rawmode or on mode), returns $true if the mode you're dealing with is the first
  • $modelast - used inside any channel specific mode event (on op, on dehelp, but not on rawmode or on mode), returns $true if the mode you're dealing with is the last
  • $mode - used typically inside on rawmode, returns the Nth nick affected by a mode.

$1-

Additionally $1- is filled with a message, applicable in the following events: