on_action
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | on_action [2012/07/04 06:30] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: on_action.txt, | ||
+ | ======Synopsis: | ||
+ | [[on]] action | ||
+ | |||
+ | ======Summary: | ||
+ | Triggered by other people' | ||
+ | |||
+ | ======Description: | ||
+ | This event is thrown whenever someone sends a [[ctcp action]] to you | ||
+ | or to a channel you are on. [[Ctcp actions]] are generated by the [[me]] | ||
+ | and [[describe]] commands. | ||
+ | |||
+ | ======Parameters: | ||
+ | |$0 |Who sent the action | | ||
+ | |$1 |Who the action was sent to (your nickname, or a channel) | | ||
+ | |$2- |Message body | | ||
+ | |||
+ | ======Default Behavior: | ||
+ | If you don't supress this event, the client will format the message and | ||
+ | output it to the channel' | ||
+ | |||
+ | ======Examples: | ||
+ | To distinguish personal actions from those sent to a channel: | ||
+ | on ^action * (sender, recvr, body) { | ||
+ | if (recvr == servernick()) { | ||
+ | echo *> $sender $body; | ||
+ | } else if (iscurchan($recvr)) { | ||
+ | echo * $sender $body; | ||
+ | } else { | ||
+ | echo * $sender/ | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | ======History: | ||
+ | This already existed in ircII. | ||
+ | |||
on_action.txt · Last modified: 2012/07/04 06:30 by 127.0.0.1