on public_other
Synopsis
/on [<noise>]public_other "<pattern>" [(<argument list>)] { <commands> }
Description
Triggered for ordinary incoming message text to a joined channel that is not current in its owning window, when the message takes the regular public-message path. Currentness is tested against the channel's owning window, not only the globally selected input window. A channel current in another window normally uses on public instead.
A sender absent from cached channel membership takes on public_msg first when cached mode +n is absent. With +n present, that outsider check is skipped, so an absent sender can still reach public_other. These classifications use the receiving server's local channel cache rather than independently verifying membership.
Use standard on matching and noise controls. The pattern matches sender, original destination, and message together. There are no event-specific options.
Parameters
| Parameter | Meaning |
|---|---|
$0 |
Sender's nickname. |
$1 |
Original channel destination supplied by the server. |
$2- |
Message text remaining after CTCP processing. |
A status prefix advertised by the server, such as @ in @#channel, can be stripped internally to recognize a joined channel, but $1 retains the original prefix.
Ordering and default behavior
CTCP processing occurs first; a message consisting only of consumed CTCP payloads can bypass ordinary message hooks. On general_privmsg then runs before this event. Suppression by that hook prevents public_other from running.
EPIC records the sender as the receiving server's most recent public sender before either ordinary hook. Suppressing display does not undo that state update.
If this hook permits default handling, EPIC displays <sender:destination> message. A suppressing hook, such as a serial-zero ^public_other hook, prevents that line and can supply replacement output. It does not retract the message, undo CTCP processing, or alter channel membership.
The output context uses the normalized channel at the public message level. The hook does not automatically send a response; any request generated by a script depends on the current connection and server policy.
Example
Replace display for non-current joined channels:
on ^public_other "*" (sender, channel, message) {
echo [$channel] <$sender> $message;
};
This does not replace public or public_msg display. Use general_privmsg when a common interception point is needed across message classifications.
Source references
source/parse.c:p_privmsgperforms CTCP handling, classification, sender-state updates, hook dispatch, and default formatting;is_target_channel_wallrecognizes status prefixes.source/names.c:is_current_channelchecks the owning window,is_channel_nomsgschecks cached+n, andis_on_channelchecks cached membership.source/hook.c: event registration anddo_hookimplement matching and suppression.