Previous: irc variables, Up: irc Analyzer


7.20.3 irc event handlers

The standard script handles the following events:

`irc_privmsg_message (c: connection, source: string, target: string, message: string)'
A user sent a message to another user or channel.

IRC command: PRIVMSG

The source is the user who sent the message to the target user/channel. Message contains the data sent to the target.

`irc_notice_message (c: connection, source: string, target: string, message: string)'
This is very similar to the irc_privmsg_message. It is typically used by services or client scripts to send status messages.

IRC command: NOTICE

The source is the user who sent the message to the target user/channel. Message contains the data sent to the target.

`irc_squery_message (c: connection, source: string, target: string, message: string)'
This event is activated if somebody sends a message to an IRC service.

IRC command: SQUERY

The source is the user who sent the message to the target service. Message contains the data sent to the target.

`irc_enter_message (c: connection, nick: string, realname: string)'
Every time a user enters the IRC network this event occurs.

IRC command: USER

Nick contains the selected nick name of the user and realname the user's name in real life.

`irc_quit_message (c: connection, nick: string, message: string)'
Every time a user quits the IRC network this event occurs.

IRC command: QUIT

Nick contains the nick name of the sender. An optional quit message is included in message.

`irc_join_message (c: connection, infoList: irc_join_list)'
If a user joins one or more IRC channels this event occurs.

IRC command: JOIN

The infoList contains a list of joined channel names and - if provided by user - the passwords for them.

`irc_part_message (c: connection, nick: string, channels: string_set, message: string)'
If a user exits one or more IRC channels this event occurs.

IRC command: PART

Nick contains the nick name of the user. Channels is a set of channel names. If the user supplies a quit message it is included in message.

`irc_nick_message (c: connection, who: string, newnick: string)'
This event occurs when users change their nick names.

IRC command: NICK

Who contains the IRC message prefix which includes the user nick and host. Newnick is the new nick name of this user.

`irc_invalid_nick (c: connection)'
This event occurs when users change their nick names and the name was invalid.

IRC response to: NICK

`irc_network_info (c: connection, users: count, services: count, servers: count)'
This a summary of the status of the whole IRC network.

IRC response to: LUSERS

Users, services and servers are the total number of users, services and IRC servers connected to the IRC network.

`irc_server_info (c: connection, users: count, services: count, servers: count)'
This a summary of an IRC server status.

IRC response to: LUSERS

Users, services and servers are the total number of users, services and IRC servers connected with this IRC server.

`irc_channel_info (c: connection, channels: count)'
Displays the total number of channels.

IRC response to: LUSERS

Channels is the number of IRC channels formed on this server (local + global).

`irc_who_message (c: connection, mask: string, oper: bool)'
The event occurs if an IRC user sent the WHO command to get information about an IRC user or channel.

IRC command: WHO

Mask is the target of the search. This can be a channel or user name, wildcards are allowed. If oper is true then the user asks only for operator user results.

`irc_who_line (c: connection, target_nick: string, channel:
string, user: string, host: string, server: string, nick: string, params: string, hops: count, realname: string)'

This includes several information about an IRC user.

IRC response to: WHO

Target_nick is the nick name of the IRC user who sent the WHO request. The username of the returned IRC user is included in user, his nick name in nick and real name in realname. The client DNS/IP address is host. Params includes the channel parameters for this user (e.g. "@" for channel operators). The user is connected to IRC server server and the number of servers between him and the requester is hops. Channel includes the channel name which was target for the request.

`irc_whois_message (c: connection, server: string, users: string)'
The event occurs if an IRC user sent the WHOIS command to get information about one or more IRC users.

IRC command: WHOIS

If server is given then the user wants this specific server to answer. Users is comma separated list of nick names for which information is requested.

`irc_whois_user_line (c: connection, nick: string, user: string, host: string, realName: string)'
This includes several information about an IRC user.

IRC response to: WHOIS

The user with nick name nick has the user name user and his real name is realname. The IRC client runs on host.

`irc_whois_operator_line (c: connection, nick: string)'
This response to an WHOIS command gives information if an IRC user is operator.

IRC response to: WHOIS

The IRC user with nick name nick has operator status.

`irc_whois_channel_line (c: connection, nick: string, channels: string_set)'
This response to an WHOIS command gives information on the channels of an IRC user.

IRC response to: WHOIS

The IRC user with nick name nick is member in all IRC channels of the variable channels.

`irc_oper_message (c: connection, user: string, password: string)'
This means that an IRC user requested operator status.

IRC command: OPER

The user and password parameters are used to authenticate the possible operator. They must fit to the IRCD server settings.

`irc_oper_response (c: connection, got_oper: bool)'
This is the answer to an operator request.

IRC response to: OPER

If the IRC user got operator status the got_oper variable is true.

`irc_kick_message (c: connection, prefix: string, channels: string, users: string, comment: string)'
An user requested to remove somebody from a channel.

IRC command: KICK

Prefix includes the requesters nick name and host. The user requested to remove the users (comma separated list) from the channels (comma separated list). If the requester provided an optional kick message it is included in comment.

`irc_error_message (c: connection, prefix: string, message: string)'
An IRC server sent an error message to one or more clients.

IRC command: ERROR

Prefix includes the server name and message contains the error message.

`irc_invite_message (c: connection, prefix: string, nickname: string, channel: string)'
An IRC user sent an invitation for a closed channel to another user.

IRC command: INVITE

Prefix includes the senders nick and host. The IRC user with the nick name nickname is invited to the channel with name channel.

`irc_mode_message (c: connection, prefix: string, params: string)'
An IRC user sent an user or channel mode message.

IRC command: MODE

`irc_squit_message (c: connection, prefix: string, server: string, message: string)'
This means that the disconnection of a server link was requested. This command is only available to operators.

IRC command: SQUIT

Prefix includes the requesters nick and host. Server is the host name of the server to disconnect and message contains an optional comment.

`irc_names_info (c: connection, c_type: string, channel: string, users: string_set)'
This reply to a NAMES command gives information what users are on what channels.

IRC response to: NAMES

C_type is "@" for secret, "*" for private and "=" for public channels. Channel contains the channel name. Users is a list of nick names that are member of this channel.

`irc_dcc_message (c: connection, prefix: string, target: string, dcc_type: string,
argument: string, address: addr, dest_port: count, size: count)'

An user sent a DCC request to another user to setup a direct connection between these users.

IRC command: PRIVMSG DCC

Prefix contains the requesters nick and host. Target contains the target user's nick name. Dcc_type can be "CHAT" for chat connections or "SEND" for file transfers. Argument contains the file name for file transfers or "chat" for chat connections. Address and dest_port specify where the target user should connect. Size is only given for file transfers and contains the file size in bytes.

`irc_request (c: connection, prefix: string, command: string, arguments: string)'
All client messages that do not fit to the other events are handled here.

Prefix is usually formated like this: <nickname>!<user>@<hostname>. Command contains the command string which was sent and arguments the corresponding argument values.

`irc_message (c: connection, prefix: string, command: string, message: string)'
All server messages that do not fit to the other events are handled here.

Prefix is usually the server name. Command contains the command string which was sent and message contains additional parameters.

`irc_response (c: connection, prefix: string, code: count, params: string)'
All server response messages that do not fit to the other events are handled here.

Prefix is usually the server name. Code is the numeric reply code and params contains any additional parameters.