Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
25
bitchx-docs/5_Programming/on/action
Normal file
25
bitchx-docs/5_Programming/on/action
Normal file
@@ -0,0 +1,25 @@
|
||||
Synopsis:
|
||||
on [<modes>]action [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes a CTCP ACTION. It
|
||||
will hook when the recipient is either the user or a channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of the ACTION sender
|
||||
$1 target of the ACTION (user's nickname or a channel)
|
||||
$2- message body of the ACTION
|
||||
|
||||
Examples:
|
||||
To distinguish personal actions from those sent to a channel:
|
||||
on ^action "*" {
|
||||
switch ( $1 ) {
|
||||
( $N ) { echo *> $0 $2- }
|
||||
( $C ) { echo * $0 $2- }
|
||||
( * ) { echo * $0/$1 $2- }
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1) action; describe(1); me(1); on(5) send_action
|
||||
|
||||
39
bitchx-docs/5_Programming/on/channel_nick
Normal file
39
bitchx-docs/5_Programming/on/channel_nick
Normal file
@@ -0,0 +1,39 @@
|
||||
Synopsis:
|
||||
on [<modes>]channel_nick [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever anyone on a channel common to the client
|
||||
changes nicknames. It is triggered for any nickname change, including
|
||||
the client's.
|
||||
|
||||
Parameters:
|
||||
$0 the channel on which the nick change was observed
|
||||
$1 the person's old nickname
|
||||
$2 the person's new nickname
|
||||
|
||||
Examples:
|
||||
To make a distinction between the client changing nicks and other people:
|
||||
on ^channel_nick "*" {
|
||||
if ( [$0] == C ) {
|
||||
if ( [$1] == N ) {
|
||||
echo *** You have changed nicks to $2
|
||||
} {
|
||||
echo *** $1 has changed nicks to $2
|
||||
}
|
||||
} {
|
||||
if ( [$1] == N ) {
|
||||
echo *** You have changed nicks to $2 on $0
|
||||
} {
|
||||
echo *** $1 has changed nicks to $2 on $0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
nick(1); on(5) nickname
|
||||
|
||||
Other Notes:
|
||||
This hook differs from the NICKNAME hook in that it is triggered once per
|
||||
nick change per channel, whereas NICKNAME is only triggered once per nick
|
||||
change.
|
||||
|
||||
30
bitchx-docs/5_Programming/on/channel_signoff
Normal file
30
bitchx-docs/5_Programming/on/channel_signoff
Normal file
@@ -0,0 +1,30 @@
|
||||
Synopsis:
|
||||
on [<modes>]channel_signoff [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes someone signoff from
|
||||
irc. It is not hooked when the client itself signs off.
|
||||
|
||||
Parameters:
|
||||
$0 the channel the signoff was observed on
|
||||
$1 the nickname of the person leaving irc
|
||||
$2- signoff message
|
||||
|
||||
Examples:
|
||||
To distinguish signoffs from one channel to another:
|
||||
on ^channel_nick "*" {
|
||||
if ( [$0] == C ) {
|
||||
echo *** Signoff by $1 \($2-\)
|
||||
} {
|
||||
echo *** Signoff by $1 from $0 \($2-\)
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
on(5) quit, signoff; quit(1)
|
||||
|
||||
Other Notes:
|
||||
This hook is not triggered by the client exiting irc. Use the QUIT hook
|
||||
to perform an action when the client quits. This hook differs from the
|
||||
SIGNOFF hook in that this is triggered for every channel on which the
|
||||
person is observed signing off.
|
||||
21
bitchx-docs/5_Programming/on/connect
Normal file
21
bitchx-docs/5_Programming/on/connect
Normal file
@@ -0,0 +1,21 @@
|
||||
Synopsis:
|
||||
on [<modes>]connect [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client establishes a connection with
|
||||
a server.
|
||||
|
||||
Parameters:
|
||||
$0 the server connected to
|
||||
$1 the port number of the server connected to
|
||||
$2 server name as reported by the server
|
||||
|
||||
Examples:
|
||||
To display where the client has connected:
|
||||
on ^connect "*" {
|
||||
echo *** Connected to $0 ($2) on port $1
|
||||
}
|
||||
|
||||
See Also:
|
||||
server(1)
|
||||
|
||||
38
bitchx-docs/5_Programming/on/ctcp
Normal file
38
bitchx-docs/5_Programming/on/ctcp
Normal file
@@ -0,0 +1,38 @@
|
||||
Synopsis:
|
||||
on [<modes>]ctcp [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a CTCP message,
|
||||
whether directly or one sent to a channel it is on.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of CTCP message sender
|
||||
$1 target of CTCP (client's nickname or channel name)
|
||||
$2 type of CTCP
|
||||
$3- arguments to CTCP command, if any
|
||||
|
||||
Examples:
|
||||
To customize the normal CTCP message:
|
||||
on ^ctcp * "*" {
|
||||
if ( [$1] == C ) {
|
||||
echo *** $0 sent a CTCP $2 to $1${[$3] ? [: $3-] : []}
|
||||
} {
|
||||
echo *** $0 sent you a CTCP $2${[$3] ? [: $3-] : []}
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1); on(5) ctcp_reply
|
||||
|
||||
Restrictions:
|
||||
Automatic replies from within this hook are limited by the irc protocol.
|
||||
Since a CTCP is really just a PRIVMSG, the client may only automatically
|
||||
reply with NOTICEs, not MSGs. Any attempt to send a MSG or CTCP from
|
||||
within this hook will result in it automatically being converted to a
|
||||
NOTICE (or CTCP REPLY).
|
||||
|
||||
Other Notes:
|
||||
The client's default behavior of automatically responding to certain CTCP
|
||||
messages cannot be suppressed with this hook. To prevent the client from
|
||||
replying to CTCPs, use IGNORE.
|
||||
|
||||
34
bitchx-docs/5_Programming/on/ctcp_reply
Normal file
34
bitchx-docs/5_Programming/on/ctcp_reply
Normal file
@@ -0,0 +1,34 @@
|
||||
Synopsis:
|
||||
on [<modes>]ctcp_reply [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a CTCP reply from
|
||||
another client. Note that the client doesn't necessarily need to send
|
||||
any CTCP messages to receive a "reply".
|
||||
|
||||
Parameters:
|
||||
$0 nickname of user sending reply
|
||||
$1 CTCP command being replied to
|
||||
$2- actual reply to CTCP command (varies, depends on $1)
|
||||
|
||||
Examples:
|
||||
To customize the appearance of CTCP reply strings:
|
||||
on ^ctcp_reply "*" {
|
||||
echo *** Reply from $0 for CTCP $1 request: $2-
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1); on(5) ctcp
|
||||
|
||||
Restrictions:
|
||||
Automatic replies (MSGs, CTCPs, NOTICEs, etc.) to the sender with this
|
||||
hook are explicitly prohibited. The protocol disallows it, and the
|
||||
client will do everything in its power to prevent it. Any attempt will
|
||||
result in an error message.
|
||||
|
||||
Bugs:
|
||||
There is no way (from within this hook) to know who the actual target
|
||||
of the reply is. This could be a problem, since it is trivial to send
|
||||
bogus replies, and there is no way to tell if the client, or a channel,
|
||||
was the target.
|
||||
|
||||
19
bitchx-docs/5_Programming/on/dcc_chat
Normal file
19
bitchx-docs/5_Programming/on/dcc_chat
Normal file
@@ -0,0 +1,19 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_chat [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a message across a
|
||||
DCC CHAT connection.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of the message sender
|
||||
$1- message received
|
||||
|
||||
See Also:
|
||||
dcc(1) chat; msg(1); on(5) send_dcc_chat
|
||||
|
||||
Other Notes:
|
||||
DCC falls outside of the irc protocol, and as such there are no
|
||||
restrictions on automated replies. This creates the potential for
|
||||
uncontrolled looping, so caution is advised.
|
||||
|
||||
33
bitchx-docs/5_Programming/on/dcc_connect
Normal file
33
bitchx-docs/5_Programming/on/dcc_connect
Normal file
@@ -0,0 +1,33 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_connect [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client successfully establishes a
|
||||
DCC connection with another client. Currently, this is either a CHAT
|
||||
or a SEND connection.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of remote client
|
||||
$1 type of DCC connection
|
||||
$2 ip address of remote client
|
||||
$3 port on the ip address the client is connected to
|
||||
$4 file name (SEND only)
|
||||
$5 file size (SEND only)
|
||||
|
||||
Examples:
|
||||
To customize the connection message:
|
||||
on ^dcc_connect "*" {
|
||||
echo *** DCC $1 connection with $0[$2:$3] established
|
||||
if ( [$1] == [send] ) echo *** Transferring $4 \($5 bytes\)
|
||||
}
|
||||
|
||||
See Also:
|
||||
dcc(1); on(5) dcc_lost, dcc_request
|
||||
|
||||
Other Notes:
|
||||
Note that establishing a DCC connection does not involve the irc network.
|
||||
Thus, the $userhost() function will not work inside this hook.
|
||||
|
||||
For a DCC SEND connection, this will be hooked twice. Once with $1 being
|
||||
SEND, and again being GET. This is for compatibility with bitchx.
|
||||
|
||||
27
bitchx-docs/5_Programming/on/dcc_list
Normal file
27
bitchx-docs/5_Programming/on/dcc_list
Normal file
@@ -0,0 +1,27 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_list [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a /dcc or /dcc list command is issued.
|
||||
The 'banner' of the list can be determined when $0 is "Start", and the
|
||||
end of the list is determined when $0 is "end".
|
||||
|
||||
Parameters:
|
||||
$0 - The type of DCC connection
|
||||
$1 - "1" if encryption is on, "0" if its not (future exp)
|
||||
$2 - Nickname of the peer
|
||||
$3 - Status of connection
|
||||
$4 - $time() when connection established, 0 if not connected.
|
||||
$5 - Size of the file transfer, 0 if not applicable
|
||||
$6 - Number of bytes transfered, 0 if not connected
|
||||
$7 - Description field (usually the full filename)
|
||||
|
||||
Examples:
|
||||
To display some extra info about dcc:
|
||||
on -dcc_list "*" {
|
||||
if (([$6]/[$5]*100)>90) { echo File $7 from $2 is almost done! }
|
||||
}
|
||||
|
||||
See Also:
|
||||
dcc(1)
|
||||
|
||||
21
bitchx-docs/5_Programming/on/dcc_lost
Normal file
21
bitchx-docs/5_Programming/on/dcc_lost
Normal file
@@ -0,0 +1,21 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_lost [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a DCC CHAT or SEND connection is lost.
|
||||
In the case of SEND, it is triggered only when a connection is lost
|
||||
before the file transfer is complete.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of the dcc connection
|
||||
$1- disconnection message (varies)
|
||||
|
||||
Examples:
|
||||
To indicate that dcc connection was terminated:
|
||||
on ^dcc_lost "*" {
|
||||
echo *** DCC connection with $0 lost${[$1] ? [: $1-] : []
|
||||
}
|
||||
|
||||
See Also:
|
||||
dcc(1)
|
||||
|
||||
23
bitchx-docs/5_Programming/on/dcc_offer
Normal file
23
bitchx-docs/5_Programming/on/dcc_offer
Normal file
@@ -0,0 +1,23 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_offer [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client offers an outbound DCC. This
|
||||
could be either a DCC CHAT or a file transfer.
|
||||
|
||||
Parameters:
|
||||
$0 person who is being offered the DCC
|
||||
$1 type of DCC being offered
|
||||
$2 filename being offered (if type of DCC is 'SEND')
|
||||
$3- size of file being offered (if type of DCC is 'SEND')
|
||||
|
||||
Examples:
|
||||
To alert user of bad DCC's:
|
||||
on ^dcc_offer "#*" {
|
||||
echo *** Offering a DCC to an entire channel will not work as
|
||||
echo expected. Please direct DCC offers to one person.
|
||||
}
|
||||
|
||||
See Also:
|
||||
dcc(1)
|
||||
|
||||
32
bitchx-docs/5_Programming/on/dcc_raw
Normal file
32
bitchx-docs/5_Programming/on/dcc_raw
Normal file
@@ -0,0 +1,32 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_raw [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a raw message about
|
||||
a tcp connection established, or a connection attempt, with $connect().
|
||||
Raw messages are sent across established tcp connections with DCC RAW.
|
||||
|
||||
Scripts that use sockets should always set a non-zero serial number for
|
||||
it. Otherwise, it is very easy to set confusing or conflicting hooks.
|
||||
Each specific instance of a socket application should use a separate
|
||||
serial number, to prevent conflicts.
|
||||
|
||||
Parameters:
|
||||
$0 file descriptor for connection (returned by $connect())
|
||||
$1 host connected to (hostname or ip address)
|
||||
$2 code for connection type:
|
||||
c - socket was closed
|
||||
d - incoming data
|
||||
e - issued when $connect() returns successfully
|
||||
n - connection accepted on a port the client is listening to
|
||||
$3- data for type 'd', port number for types 'e' and 'n', none for 'c'
|
||||
|
||||
Examples:
|
||||
To display all successful socket connections:
|
||||
on #-dcc_raw 10 "% % e %" {
|
||||
echo *** Connection with $1 on port $3 \(fd: $0\)
|
||||
}
|
||||
|
||||
See Also:
|
||||
connect(6); dcc(1) raw; listen(6)
|
||||
|
||||
26
bitchx-docs/5_Programming/on/dcc_request
Normal file
26
bitchx-docs/5_Programming/on/dcc_request
Normal file
@@ -0,0 +1,26 @@
|
||||
Synopsis:
|
||||
on [<modes>]dcc_request [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a DCC request of some
|
||||
sort (currently CHAT or SEND).
|
||||
|
||||
Parameters:
|
||||
$0 nickname of remote client
|
||||
$1 type of DCC connection
|
||||
$2 description of dcc connection (currently same as $1)
|
||||
$3 ip address of remote client
|
||||
$4 port on the ip address the client is connected to
|
||||
$5 file name (SEND only)
|
||||
$6 file size (SEND only)
|
||||
|
||||
Examples:
|
||||
To customize the dcc request message:
|
||||
on ^dcc_request "*" {
|
||||
echo *** DCC $1 requested by $0!$userhost() [$3:$4]
|
||||
if ( [$1] == [send] ) echo *** File offered: $4 \($5 bytes\)
|
||||
}
|
||||
|
||||
See Also:
|
||||
dcc(1) chat, send; on(5) dcc_connect, dcc_lost
|
||||
|
||||
23
bitchx-docs/5_Programming/on/disconnect
Normal file
23
bitchx-docs/5_Programming/on/disconnect
Normal file
@@ -0,0 +1,23 @@
|
||||
Synopsis:
|
||||
on [<modes>]disconnect [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the ckient is disconnected from a server,
|
||||
and it is unable to reconnect to the server itself (assuming the
|
||||
AUTO_RECONNECT setting is turned on). This would be any situation in
|
||||
which the client would normally print the following message:
|
||||
|
||||
*** Use /SERVER to connect to a server
|
||||
|
||||
Parameters:
|
||||
$0 server disconnected from
|
||||
|
||||
Examples:
|
||||
To customize the disconnection message:
|
||||
on ^disconnect "*" {
|
||||
echo *** Disconnected from $0 at $Z
|
||||
}
|
||||
|
||||
See Also:
|
||||
disconnect(1); set(5) auto_reconnect
|
||||
|
||||
29
bitchx-docs/5_Programming/on/encrypted_notice
Normal file
29
bitchx-docs/5_Programming/on/encrypted_notice
Normal file
@@ -0,0 +1,29 @@
|
||||
Synopsis:
|
||||
on [<modes>]encrypted_notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a NOTICE encrypted
|
||||
with CTCP SED. This is how the ENCRYPT command normally works.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1- message received
|
||||
|
||||
Examples:
|
||||
To clearly distinguish encrypted NOTICEs from unencrypted ones:
|
||||
on ^encrypted_notice '% $N *' {
|
||||
echo -${[$0]}- [ENCRYPTED] $1-
|
||||
}
|
||||
|
||||
See Also:
|
||||
encrypt(4); notice(1); on(5) encrypted_privmsg, notice
|
||||
|
||||
Restrictions:
|
||||
This hook is subject to the same protocol restrictions as the NOTICE
|
||||
hook.
|
||||
|
||||
Other Notes:
|
||||
When used with the silent or quiet modes, this hook will suppress the
|
||||
normal output for NOTICEs. Care should be used, as it can jumble
|
||||
public hooks.
|
||||
|
||||
29
bitchx-docs/5_Programming/on/encrypted_privmsg
Normal file
29
bitchx-docs/5_Programming/on/encrypted_privmsg
Normal file
@@ -0,0 +1,29 @@
|
||||
Synopsis:
|
||||
on [<modes>]encrypted_privmsg [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a MSG encrypted with
|
||||
CTCP SED. This is how the ENCRYPT command normally works.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1- message received
|
||||
|
||||
Examples:
|
||||
To clearly distinguish encrypted MSGs from unencrypted ones:
|
||||
on ^encrypted_privmsg '% $N *' {
|
||||
echo *$0* V[CRYPT]V $2-
|
||||
}
|
||||
|
||||
See Also:
|
||||
encrypt(4); msg(1); on(5) encrypted_notice, msg
|
||||
|
||||
Restrictions:
|
||||
This hook is subject to the same protocol restrictions as the MSG
|
||||
hook.
|
||||
|
||||
Other Notes:
|
||||
When used with the silent or quiet modes, this hook will suppress the
|
||||
normal output for MSGs. Care should be used, as it can also jumble
|
||||
public hooks.
|
||||
|
||||
22
bitchx-docs/5_Programming/on/exec
Normal file
22
bitchx-docs/5_Programming/on/exec
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [<modes>]exec [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever an EXECed process generates output to
|
||||
standard output.
|
||||
|
||||
Parameters:
|
||||
$0 the pid of the EXECed process that triggered the hook (an internal
|
||||
| number, not the system pid); if the process was started with the
|
||||
| -name switch, the name specified is returned instead
|
||||
$1- a line of the process's output stderr
|
||||
|
||||
Examples:
|
||||
To distinguish process output from other window output:
|
||||
on ^exec "*" {
|
||||
echo [$0] $1-
|
||||
}
|
||||
|
||||
See Also:
|
||||
exec(5); on(5) exec_errors, exec_exit, exec_prompt
|
||||
|
||||
20
bitchx-docs/5_Programming/on/exec_errors
Normal file
20
bitchx-docs/5_Programming/on/exec_errors
Normal file
@@ -0,0 +1,20 @@
|
||||
Synopsis:
|
||||
on [<modes>]exec_errors [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever an EXECed process produces output to
|
||||
standard error.
|
||||
|
||||
Parameters:
|
||||
$0 process number or name of the EXECed process
|
||||
$1- a line of the process's output to stderr
|
||||
|
||||
Examples:
|
||||
To distinguish process errors from other window output:
|
||||
on ^exec_errors "*" {
|
||||
echo [$0 ERR] $1-
|
||||
}
|
||||
|
||||
See Also:
|
||||
exec(5); on(5) exec, exec_exit, exec_prompt
|
||||
|
||||
28
bitchx-docs/5_Programming/on/exec_exit
Normal file
28
bitchx-docs/5_Programming/on/exec_exit
Normal file
@@ -0,0 +1,28 @@
|
||||
Synopsis:
|
||||
on [<modes>]exec_exit [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever an EXECed process exits.
|
||||
|
||||
Parameters:
|
||||
$0 process number or name of the EXECed process
|
||||
$1 signal that killed the process, or 0 (zero) if it exited normally
|
||||
$2 exit code (usually zero, unless $1 is non-zero)
|
||||
|
||||
Examples:
|
||||
To display when a process exits:
|
||||
on ^exec_exit "*" {
|
||||
if ( [$2] ) {
|
||||
echo *** Process '$0' exited with code $2 \(signal $1\)
|
||||
} {
|
||||
echo *** Process '$0' exited normally
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
exec(5); on(5) exec, exec_errors, exec_prompt
|
||||
|
||||
Other Notes:
|
||||
The available signals that may be sent to a process will vary from system
|
||||
to system.
|
||||
|
||||
25
bitchx-docs/5_Programming/on/exec_prompt
Normal file
25
bitchx-docs/5_Programming/on/exec_prompt
Normal file
@@ -0,0 +1,25 @@
|
||||
Synopsis:
|
||||
on [<modes>]exec_prompt [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever an EXECed process displays a "prompt".
|
||||
More precisely, it is triggered when the process returns any line of
|
||||
output that is not terminated by a newline. This is generally the case
|
||||
with interactive commands, such as nslookup(1).
|
||||
|
||||
Parameters:
|
||||
$0 process number of name of the EXECed process
|
||||
$1 prompt string to look for
|
||||
|
||||
Examples:
|
||||
To hook the prompt when using nslookup interactively:
|
||||
on ^exec_prompt "% >" {
|
||||
assign foo $0
|
||||
input "nslookup> " {
|
||||
msg %${foo} $*
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
exec(5); input(5); on(5) exec, exec_errors, exec_exit
|
||||
|
||||
23
bitchx-docs/5_Programming/on/exit
Normal file
23
bitchx-docs/5_Programming/on/exit
Normal file
@@ -0,0 +1,23 @@
|
||||
Synopsis:
|
||||
on [<modes>]exit [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered when the client is about to exit normally (from
|
||||
the QUIT command, etc.). It is mostly useful for doing cleanup before
|
||||
exiting, such as saving any current settings. It cannot be used to
|
||||
trap the QUIT command; the client will exit immediately after this
|
||||
hook is triggered..
|
||||
|
||||
Parameters:
|
||||
$0 always the string "Exiting"
|
||||
|
||||
Examples:
|
||||
Save current settings before exiting:
|
||||
on ^exit "*" {
|
||||
save all
|
||||
echo Now exiting ircII-${J}...
|
||||
}
|
||||
|
||||
See Also:
|
||||
exec(5); quit(1)
|
||||
|
||||
34
bitchx-docs/5_Programming/on/flood
Normal file
34
bitchx-docs/5_Programming/on/flood
Normal file
@@ -0,0 +1,34 @@
|
||||
Synopsis:
|
||||
on [<modes>]flood [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client's internal flood detection
|
||||
code is activated. The client is "flooded" when it receives a large
|
||||
number of messages (of any sort) in a relatively short period of time.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of the flooder
|
||||
$1 type of flood detected
|
||||
$2 the channel (if any) they're flooding
|
||||
$3- content of the flood message
|
||||
|
||||
Examples:
|
||||
To automatically ignore flooders:
|
||||
on ^flood "*" {
|
||||
echo *** $1 flooding detected by $0
|
||||
ignore $0 $1
|
||||
}
|
||||
|
||||
To disable flood protection for network services:
|
||||
on flood ^'\\[X W NickServ ChanServ\\] *'
|
||||
|
||||
See Also:
|
||||
set(4) flood_after, flood_rate, flood_users, flood_warning
|
||||
|
||||
Other Notes:
|
||||
It isn't uncommon for network problems to cause a great deal of data to
|
||||
be sent to the client at once by the server. Suspending the client for
|
||||
awhile and then bringing it back can produce similar results. Thus, it
|
||||
it recommended that KICK or KILL be avoided as automated responses to
|
||||
possible flooding.
|
||||
|
||||
19
bitchx-docs/5_Programming/on/help
Normal file
19
bitchx-docs/5_Programming/on/help
Normal file
@@ -0,0 +1,19 @@
|
||||
Synopsis:
|
||||
on [<modes>]help [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered for each line of output generated by the HELP
|
||||
command.
|
||||
|
||||
Parameters:
|
||||
$0- a line of text from a helpfile
|
||||
|
||||
Examples:
|
||||
Customizing the HELP output:
|
||||
on ^help "*" {
|
||||
echo *?* $*
|
||||
}
|
||||
|
||||
See Also:
|
||||
help(1)
|
||||
|
||||
11
bitchx-docs/5_Programming/on/hook
Normal file
11
bitchx-docs/5_Programming/on/hook
Normal file
@@ -0,0 +1,11 @@
|
||||
Synopsis:
|
||||
on [<modes>]hook [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the HOOK command is issued with the
|
||||
appropriate arguments. Its sole purpose is to be hooked by HOOK. It
|
||||
is useful for avoiding alias recursion.
|
||||
|
||||
Parameters:
|
||||
$0- text to hook
|
||||
|
||||
22
bitchx-docs/5_Programming/on/idle
Normal file
22
bitchx-docs/5_Programming/on/idle
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [<modes>]idle [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client's idle time reaches the given
|
||||
value, in minutes. The idle time is reset when the client is given a
|
||||
command.
|
||||
|
||||
Parameters:
|
||||
$0 minutes idle
|
||||
|
||||
Examples:
|
||||
To automatically set the client away after being idle for 5 minutes:
|
||||
on ^idle "5" {
|
||||
away I'm not paying attention again...
|
||||
}
|
||||
|
||||
Other Notes:
|
||||
Irc servers don't have the same notion of "idle" as the client does. To
|
||||
most servers, the client only becomes unidle by sending a message to a
|
||||
channel or a person.
|
||||
|
||||
27
bitchx-docs/5_Programming/on/input
Normal file
27
bitchx-docs/5_Programming/on/input
Normal file
@@ -0,0 +1,27 @@
|
||||
Synopsis:
|
||||
on [<modes>]input [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a command is entered on the input line,
|
||||
or when text is sent to a channel or query.
|
||||
|
||||
This is a very powerful mechanism of the client. Used intelligently,
|
||||
it permits a very fine degree of control over the text entered on the
|
||||
input line. Used carelessly, and it can easily disable the client.
|
||||
Use with caution.
|
||||
|
||||
If a silent hook is set, one can use a loaded script to do preprocessing
|
||||
of the input line.
|
||||
|
||||
Parameters:
|
||||
$0- text of input line entered
|
||||
|
||||
Examples:
|
||||
To emulate the INPUT_ALIASES setting:
|
||||
on ^input "*" {
|
||||
eval $*
|
||||
}
|
||||
|
||||
See Also:
|
||||
set(4) input_protection
|
||||
|
||||
20
bitchx-docs/5_Programming/on/invite
Normal file
20
bitchx-docs/5_Programming/on/invite
Normal file
@@ -0,0 +1,20 @@
|
||||
Synopsis:
|
||||
on [<modes>]invite [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives an invitation to a
|
||||
channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname inviting the client to a channel
|
||||
$1 channel invited to
|
||||
|
||||
Examples:
|
||||
Customizing the appearance of the invitation:
|
||||
on ^invite "*" {
|
||||
echo *** $0 cordially invites you to $1
|
||||
}
|
||||
|
||||
See Also:
|
||||
invite(1)
|
||||
|
||||
27
bitchx-docs/5_Programming/on/join
Normal file
27
bitchx-docs/5_Programming/on/join
Normal file
@@ -0,0 +1,27 @@
|
||||
Synopsis:
|
||||
on [<modes>]join [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client joins a channel, or whenever
|
||||
it observes another client joining a common channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of person joining channel
|
||||
$1 channel joined
|
||||
$2 address of person joining channel (same as $userhost())
|
||||
$3 person joining's channel status (on avalon 2.9 servers),
|
||||
could be either (+o) or (+v)
|
||||
|
||||
Examples:
|
||||
To distinguish between the client and other users joining the channel:
|
||||
on ^join "*" {
|
||||
if ( [$0] == N ) {
|
||||
echo *** You have joined channel $1
|
||||
} {
|
||||
echo *** $0 \($2\) has joined channel $1
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
join(1); userhost(6)
|
||||
|
||||
26
bitchx-docs/5_Programming/on/kick
Normal file
26
bitchx-docs/5_Programming/on/kick
Normal file
@@ -0,0 +1,26 @@
|
||||
Synopsis:
|
||||
on [<modes>]kick [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes another client (or
|
||||
itself!) being kicked from a channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of user kicked from channel
|
||||
$1 nickname of user kicking $0 from channel
|
||||
$2 channel kick observed on
|
||||
$3- kick message
|
||||
|
||||
Examples:
|
||||
To distinguish who is being kicked on a channel:
|
||||
on ^kick "*" {
|
||||
if ( [$0] == N ) {
|
||||
echo *** You have been kicked from $2 by $1 \($3-\)
|
||||
} {
|
||||
echo *** $0 has been kicked from $2 by $1 \($3-\)
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
kick(1)
|
||||
|
||||
22
bitchx-docs/5_Programming/on/kill
Normal file
22
bitchx-docs/5_Programming/on/kill
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [<modes>]kill [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever someone is kill(3)ed by an oper.
|
||||
|
||||
Parameters:
|
||||
$0 server who sent the message (your server)
|
||||
$1 the victim being killed
|
||||
$2 the oper who issued the kill
|
||||
$3 server path to the oper
|
||||
$4- reason for the kill
|
||||
|
||||
Examples:
|
||||
To display kills in a more sane manner:
|
||||
on ^kill "*" {
|
||||
echo $banner $1 was killed by $2: ($4-)
|
||||
}
|
||||
|
||||
See Also:
|
||||
kill(3)
|
||||
|
||||
24
bitchx-docs/5_Programming/on/leave
Normal file
24
bitchx-docs/5_Programming/on/leave
Normal file
@@ -0,0 +1,24 @@
|
||||
Synopsis:
|
||||
on [<modes>]leave [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a client (the user's or any other) is
|
||||
observed leaving a channel (but not signing off from irc).
|
||||
|
||||
Parameters:
|
||||
$0 the nickname of the person leaving the channel
|
||||
$1 the channel left by the person
|
||||
|
||||
Examples:
|
||||
To distinguish the client from other users leaving a channel:
|
||||
on ^leave "*" {
|
||||
if ( [$0] == N ) {
|
||||
echo *** You have left channel $1
|
||||
} {
|
||||
echo *** $0 \($userhost()\) has left channel $1
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
part(1); userhost(6)
|
||||
|
||||
21
bitchx-docs/5_Programming/on/list
Normal file
21
bitchx-docs/5_Programming/on/list
Normal file
@@ -0,0 +1,21 @@
|
||||
Synopsis:
|
||||
on [<modes>]list [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives server output from
|
||||
the LIST command. Any individual line of output can trigger the hook.
|
||||
|
||||
Parameters:
|
||||
$0 channel name
|
||||
$1 number of users on the channel
|
||||
$2- channel topic (if any)
|
||||
|
||||
Examples:
|
||||
To limit output to channels with a topic:
|
||||
on ^list "*" {
|
||||
if ( [$2] ) echo *** $[$CHANNEL_NAME_WIDTH]0 $[-2]1 $2-
|
||||
}
|
||||
|
||||
See Also:
|
||||
list(2); on(5) widelist
|
||||
|
||||
24
bitchx-docs/5_Programming/on/mail
Normal file
24
bitchx-docs/5_Programming/on/mail
Normal file
@@ -0,0 +1,24 @@
|
||||
Synopsis:
|
||||
on [<modes>]mail [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client detects that the user has new
|
||||
email locally. It relies on MAIL being non-zero.
|
||||
|
||||
Parameters:
|
||||
$0 number of new email messages
|
||||
$1 total number of email messages in user's mailbox
|
||||
|
||||
Examples:
|
||||
To keep the new mail message grammatically correct:
|
||||
on ^mail "*" {
|
||||
echo *** You have $0 new message${[$0] > 1 ? [s] : []}, $1 total
|
||||
}
|
||||
|
||||
See Also:
|
||||
set(4) mail
|
||||
|
||||
Other Notes:
|
||||
This hook has no control over the extended output given when MAIL is set
|
||||
to 2.
|
||||
|
||||
26
bitchx-docs/5_Programming/on/mode
Normal file
26
bitchx-docs/5_Programming/on/mode
Normal file
@@ -0,0 +1,26 @@
|
||||
Synopsis:
|
||||
on [<modes>]mode [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes a mode change on a
|
||||
channel, or whenever the client changes its modes.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of person issuing mode change
|
||||
$1 channel or nickname affected by mode change
|
||||
$2 modes changed
|
||||
$3- arguments to modes (if any)
|
||||
|
||||
Examples:
|
||||
To distinguish between user modes and channel modes:
|
||||
on ^mode "*" {
|
||||
if ( [$1] == N ) {
|
||||
echo *** User mode change for $1: $2-
|
||||
} {
|
||||
echo *** Mode change for $1 by $0: $2-
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
mode(1); on(5) mode_stripped
|
||||
|
||||
22
bitchx-docs/5_Programming/on/mode_stripped
Normal file
22
bitchx-docs/5_Programming/on/mode_stripped
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [#][<mode>]mode_stripped [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is similar to the MODE hook, except it only hooks a single
|
||||
mode change at a time. This hook relies on MODE_STRIPPER being turned
|
||||
on. It is mostly useful in scripts that wish to evaluate each
|
||||
individual mode change.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of person issuing mode change
|
||||
$1 channel or nickname affected by mode change
|
||||
$2 mode changed
|
||||
$3 argument to the mode (does not apply to all modes)
|
||||
|
||||
See Also:
|
||||
mode(1); on(5) mode; set(4) mode_stripper
|
||||
|
||||
Other Notes:
|
||||
This hook does not override the MODE hook; rather, they compliment each
|
||||
other.
|
||||
|
||||
20
bitchx-docs/5_Programming/on/msg
Normal file
20
bitchx-docs/5_Programming/on/msg
Normal file
@@ -0,0 +1,20 @@
|
||||
Synopsis:
|
||||
on [<modes>]msg [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a MSG from another
|
||||
client.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1- text of message
|
||||
|
||||
See Also:
|
||||
msg(1); on(5) encrypted_privmsg, notice, send_msg
|
||||
|
||||
Restrictions:
|
||||
The client does not permit automated responses to a MSG with another MSG.
|
||||
Such replies may use NOTICE instead. Any attempt to use MSG within this
|
||||
hook will be automatically converted to a NOTICE. The whole point of
|
||||
this is to prevent loops between clients.
|
||||
|
||||
19
bitchx-docs/5_Programming/on/msg_group
Normal file
19
bitchx-docs/5_Programming/on/msg_group
Normal file
@@ -0,0 +1,19 @@
|
||||
Synopsis:
|
||||
on [<modes>]msg_group [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is similar to the MSG hook, except it applies to messages sent
|
||||
to an undetermined group of people. Typically, this is a server mask or
|
||||
hostmask, and is sent by an irc operator.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1 group message was sent to
|
||||
$2- text of message
|
||||
|
||||
See Also:
|
||||
msg(1)
|
||||
|
||||
Restrictions:
|
||||
This hook has the same limitations on automated replies as the MSG hook.
|
||||
|
||||
18
bitchx-docs/5_Programming/on/names
Normal file
18
bitchx-docs/5_Programming/on/names
Normal file
@@ -0,0 +1,18 @@
|
||||
Synopsis:
|
||||
on [<modes>]names [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives server output from
|
||||
the NAMES command.
|
||||
|
||||
Parameters:
|
||||
$0 channel name
|
||||
$1- nicknames of (visible) users on the channel
|
||||
|
||||
See Also:
|
||||
names(2); on(5) 353, 366
|
||||
|
||||
Other Notes:
|
||||
This hook is not triggered by the implicit NAMES done when the client
|
||||
joins a channel. Hook the 353 numeric instead.
|
||||
|
||||
24
bitchx-docs/5_Programming/on/nickname
Normal file
24
bitchx-docs/5_Programming/on/nickname
Normal file
@@ -0,0 +1,24 @@
|
||||
Synopsis:
|
||||
on [<modes>]nickname [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes a nickname change.
|
||||
It only hooks once per nick change, not once per channel.
|
||||
|
||||
Parameters:
|
||||
$0 old nickname
|
||||
$1 new nickname
|
||||
|
||||
Examples:
|
||||
To distinguish the client from another user:
|
||||
on ^nickname "*" {
|
||||
if ( [$0] == N ) {
|
||||
echo *** Your nickname is now $1
|
||||
} {
|
||||
echo *** $0 has changed nicks to $1
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
nick(1); on(5) channel_nick
|
||||
|
||||
20
bitchx-docs/5_Programming/on/note
Normal file
20
bitchx-docs/5_Programming/on/note
Normal file
@@ -0,0 +1,20 @@
|
||||
Synopsis:
|
||||
on [<modes>]note [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a NOTE.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1 time the message was send (accurate +/- 60 seconds)
|
||||
$2- text of message
|
||||
|
||||
Examples:
|
||||
To customize the display of irc NOTEs:
|
||||
on ^note "*" {
|
||||
echo V%$0%V $2- \($1\)
|
||||
}
|
||||
|
||||
See Also:
|
||||
note(4)
|
||||
|
||||
19
bitchx-docs/5_Programming/on/notice
Normal file
19
bitchx-docs/5_Programming/on/notice
Normal file
@@ -0,0 +1,19 @@
|
||||
Synopsis:
|
||||
on [<modes>]notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a NOTICE from another
|
||||
client.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of message sender
|
||||
$1- text of message
|
||||
|
||||
See Also:
|
||||
notice(1); on(5) encrypted_notice, msg, send_notice
|
||||
|
||||
Restrictions:
|
||||
The client does not permit any automated messages to be sent in response
|
||||
to a NOTICE. Any attempt will result in an error. The whole point of
|
||||
this is to prevent loops between clients.
|
||||
|
||||
13
bitchx-docs/5_Programming/on/notify_signoff
Normal file
13
bitchx-docs/5_Programming/on/notify_signoff
Normal file
@@ -0,0 +1,13 @@
|
||||
Synopsis:
|
||||
on [<modes>]notify_signoff [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client detects that a nickname on its
|
||||
internal NOTIFY list has signed off from irc.
|
||||
|
||||
Parameters:
|
||||
$0 nickname that signoff was detected for
|
||||
|
||||
See Also:
|
||||
notify(1); on(5) notify_signon
|
||||
|
||||
15
bitchx-docs/5_Programming/on/notify_signon
Normal file
15
bitchx-docs/5_Programming/on/notify_signon
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]notify_signon [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client detects that a nickname on its
|
||||
internal NOTIFY list has signed on to irc.
|
||||
|
||||
Parameters:
|
||||
$0 nickname that signon was detected for
|
||||
$1 user@host of person signing on (if set(4) notify_userhost_automatic
|
||||
is ON)
|
||||
|
||||
See Also:
|
||||
notify(1); set(4) notify_userhost_automatic; on(5) notify_signoff
|
||||
|
||||
17
bitchx-docs/5_Programming/on/odd_server_stuff
Normal file
17
bitchx-docs/5_Programming/on/odd_server_stuff
Normal file
@@ -0,0 +1,17 @@
|
||||
Synopsis:
|
||||
on [<modes>]odd_server_stuff [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This is easily the most flexible hook available in the client. It allows
|
||||
any arbitrary string to be hooked from the server's raw output. It is
|
||||
useful for overriding the client's default behavior when it otherwise
|
||||
wouldn't permit it, or for hooking information when the available named
|
||||
hooks won't do.
|
||||
|
||||
Parameters:
|
||||
$0 server that sent it, '*' if unknown
|
||||
$1- unrecognized command and its arguments
|
||||
|
||||
See Also:
|
||||
quote(5) on(5) raw_irc
|
||||
|
||||
129
bitchx-docs/5_Programming/on/on
Normal file
129
bitchx-docs/5_Programming/on/on
Normal file
@@ -0,0 +1,129 @@
|
||||
Synopsis:
|
||||
on [<modes>]<hook> [<serial#>] [-|^]<match> [{ <action> }]
|
||||
|
||||
Description:
|
||||
The ON command is what truly gives ircII-EPIC its versatility. It sets
|
||||
a hook that allows any arbitrary type of message be acted upon. This
|
||||
allows for a high degree of automation with the client, as well as a
|
||||
high degree of customization.
|
||||
|
||||
Each hook can have a set of modes associated with it. There are 6
|
||||
(six) types of modes, and each one has a specific, unique purpose. The
|
||||
hook name is prefixed with these modes. The first 3 (three) control
|
||||
the output of the hook.
|
||||
|
||||
+ The noisy mode. This causes the client to display everything
|
||||
| the hook is doing. It will display what event has been hooked,
|
||||
| and by what specific data. This mode is really only useful for
|
||||
| script debugging.
|
||||
- The quiet hook. This suppresses display of the gory details of
|
||||
| the event hooked.
|
||||
^ The silent mode. This works similarly to '-', except it will
|
||||
| completely suppress the default output of the event. Only ECHO
|
||||
| (and XECHO) will cause it to display anything. This is most
|
||||
| often used to redefine how an event message looks.
|
||||
? The ambiguous mode. This mode is special because the override level
|
||||
| is not determined when the on is registered, but is determined
|
||||
| separately each time the on is executed. When you use this noise
|
||||
| level, the "noise" level is always the same as the SILENT level
|
||||
| (as if you had used '^'), but it will not automatically suppress the
|
||||
| client's default action as using '^' would. The action of the on is
|
||||
| taken as an anonymous function: it may return a value with the
|
||||
| /return command. If the return value of the action is 1 (one), then
|
||||
| the default action WILL be suppressed (as though you had used ^),
|
||||
| but if the return value is 0 (zero) then the default action will NOT
|
||||
| be suppressed (as though you had used -).
|
||||
|
||||
Only one of the above three modes may be used per hook. If none are
|
||||
used, the client defaults to a setting somewhere between noisy and quiet.
|
||||
It will display what it has hooked, but nothing else unless specifically
|
||||
coded to do so.
|
||||
|
||||
& The local mode. Hooks with this mode will only be triggered for
|
||||
| events originating on the current server. If the event is not
|
||||
| local, the client will fall back to other set hooks, or failing
|
||||
| that, the default behavior.
|
||||
@ The exclusively local hook. This is the same as '&', except the
|
||||
| client will not fall back on other hooks if the event is not
|
||||
| local.
|
||||
|
||||
Only one of the above two modes may be used per hook. The last mode
|
||||
controls the order in which like hooks are triggered.
|
||||
|
||||
# The serial hook. This allows the given hook to be assigned a
|
||||
| unique serial number (see Synopsis). Thus, if multiple hooks of
|
||||
| the same type are defined, the order in which they are triggered
|
||||
| can be defined. Refer to Serial_Numbers for more information.
|
||||
|
||||
Each of the above sets of modes may be combined with the others (though
|
||||
only one from each set may be used per hook).
|
||||
|
||||
The text matched for the hook is also rather versatile. In the match
|
||||
string, any wildcard may be used. The match must be surrounded by
|
||||
quotation marks (unless it is a single word). If double quotes (") are
|
||||
used, the match string is evaluated when the hook is defined. If single
|
||||
quotes (') are used, the match string is taken literally and evaluated
|
||||
each time the event is hooked. This allows for variable matches to be
|
||||
used. Additionally, the match string may be prepended with its own
|
||||
mode.
|
||||
|
||||
- This isn't really a mode, per se. Rather, it is used to remove
|
||||
| any hook with the same match string. If no match string is
|
||||
| given, all hooks for th given event are removed.
|
||||
^ The exclusion mode. This causes the client to do nothing when
|
||||
| the hook is triggered with the given match. It is effectively
|
||||
| the same as only using a COMMENT in the action, or some other
|
||||
| noop command.
|
||||
|
||||
The last part of a hook is the action. This defines what the client is
|
||||
supposed to do when a hook is triggered. The action can be just about
|
||||
anything the user wishes. The syntax works basically the same as with
|
||||
ALIAS. Braces are only required for multiline actions. Also, as with
|
||||
aliases, hook actions can receive and use numeric expandos (representing
|
||||
the full event arguments hooked). Also a special "return next" in the
|
||||
action will cause the next hook of the type to be executed or if it's the
|
||||
last/only hook executing, the default action will run.
|
||||
|
||||
Also, if this command is given with either none or a single argument, it
|
||||
will list all currently defined hooks matching the argument.
|
||||
|
||||
Examples:
|
||||
To redefine the default JOIN message:
|
||||
on ^join "*" {
|
||||
echo B*>*B $0 \($2\) has joined $1 [$Z]
|
||||
}
|
||||
on ^channel_synch "#bitchx *" {
|
||||
echo this and next hook will exec, but the default will not. $*
|
||||
return next
|
||||
}
|
||||
on ^channel_synch "*" {echo 2 $*;return}
|
||||
|
||||
|
||||
|
||||
To show a special message (quietly) for local users joining a channel:
|
||||
on -&join "*" {
|
||||
echo B*>*B VLOCALV $0 \($2\) has joined $1 [$Z]
|
||||
}
|
||||
|
||||
To suppress channel messages from users from certain sites:
|
||||
assign ignore_em *@*.msn.com *@*.aol.com *@*.goodnet.com
|
||||
on -join ^'% % $ignore_em'
|
||||
|
||||
To remove all hooks for a particular event:
|
||||
on join -
|
||||
|
||||
To show an additional message for a certain site, after the default:
|
||||
on #-join 10 "% #blah %" {
|
||||
echo V***V Oh great, yet another person has joined $1
|
||||
}
|
||||
|
||||
See Also:
|
||||
Etiquette(7); Expressions(7); Programming(7); Serial_Numbers(7);
|
||||
Server_Numerics(7); alias(5); echo(5); hook(5); xecho(5)
|
||||
|
||||
Other Notes:
|
||||
ON allows for a great deal of automation of client activities. This can
|
||||
be a bad thing if abused. For instance, using it to automatically send
|
||||
a greeting to anyone joining a channel is usually considered bad form.
|
||||
Let common sense dictate when an automated response is appropriate.
|
||||
|
||||
20
bitchx-docs/5_Programming/on/oper_notice
Normal file
20
bitchx-docs/5_Programming/on/oper_notice
Normal file
@@ -0,0 +1,20 @@
|
||||
Synopsis:
|
||||
on [<modes>]oper_notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This is triggered whenever a global oper notice is received.
|
||||
|
||||
Parameters:
|
||||
$0 server the notice came from
|
||||
$1- body of the message
|
||||
|
||||
Examples:
|
||||
To alert the user of global oper notices:
|
||||
on ^oper_notice "*" {
|
||||
beep
|
||||
echo --global notice-- $1-
|
||||
}
|
||||
|
||||
See Also:
|
||||
on(5) notice
|
||||
|
||||
23
bitchx-docs/5_Programming/on/pong
Normal file
23
bitchx-docs/5_Programming/on/pong
Normal file
@@ -0,0 +1,23 @@
|
||||
Synopsis:
|
||||
on [<modes>]pong [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a protocol PONG
|
||||
message. Under normal circumstances, the sender will be a server.
|
||||
However, clients are also allowed to send PONG messages to each other.
|
||||
Since there is never any reason for a client to send a PONG to another
|
||||
client, this hook can be useful for blocking PONG floods.
|
||||
|
||||
Parameters:
|
||||
$0 nickname sending the PONG
|
||||
$1- argument to PONG (usually the same as $0, but not necessarily)
|
||||
|
||||
Examples:
|
||||
To filter PONG messages from other clients:
|
||||
on ^pong "*" {
|
||||
if ( rmatch($0 %.%) ) echo *** Received protocol PONG from $0: $1-
|
||||
}
|
||||
|
||||
See Also:
|
||||
quote(5)
|
||||
|
||||
15
bitchx-docs/5_Programming/on/public
Normal file
15
bitchx-docs/5_Programming/on/public
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]public [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a regular public message is sent to the
|
||||
client's current channel by someone else also on the channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname sending message
|
||||
$1 channel sent to
|
||||
$2- text of message
|
||||
|
||||
See Also:
|
||||
on(5) public_msg, public_notice, public_other, send_public; say(1)
|
||||
|
||||
25
bitchx-docs/5_Programming/on/public_msg
Normal file
25
bitchx-docs/5_Programming/on/public_msg
Normal file
@@ -0,0 +1,25 @@
|
||||
Synopsis:
|
||||
on [<mode>]public_msg [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a public message in
|
||||
a channel from someone not actually in the channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname sending message
|
||||
$1 channel sent to
|
||||
$2- text of message
|
||||
|
||||
Examples:
|
||||
To customize how these messages are displayed:
|
||||
on ^public_msg "*" {
|
||||
if ( [$1] == C ) {
|
||||
echo *** \($0\) $2-
|
||||
} {
|
||||
echo *** \($0:$1\) $2-
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
on(5) public, public_notice, public_notice; msg(1)
|
||||
|
||||
25
bitchx-docs/5_Programming/on/public_notice
Normal file
25
bitchx-docs/5_Programming/on/public_notice
Normal file
@@ -0,0 +1,25 @@
|
||||
Synopsis:
|
||||
on [<modes>]public_notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a NOTICE is sent to any channel the
|
||||
client is on from someone not actually on that channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname sending message
|
||||
$1 channel sent to
|
||||
$2- text of message
|
||||
|
||||
Examples:
|
||||
To distinguish NOTICEs sent to the current channel vs. other channels:
|
||||
on ^public_notice "*" {
|
||||
if ( [$1] == C ) {
|
||||
echo +$0+ $2-
|
||||
} {
|
||||
echo +$0:$1+ $2-
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
notice(1); on(5) notice
|
||||
|
||||
16
bitchx-docs/5_Programming/on/public_other
Normal file
16
bitchx-docs/5_Programming/on/public_other
Normal file
@@ -0,0 +1,16 @@
|
||||
Synopsis:
|
||||
on [<modes>]public_other [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes a message sent to
|
||||
any channel it is on that isn't its current channel, from someone else
|
||||
on that channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname sending message
|
||||
$1 channel sent to
|
||||
$2- text of message
|
||||
|
||||
See Also:
|
||||
msg(1); on(5) public, public_msg, public_notice
|
||||
|
||||
18
bitchx-docs/5_Programming/on/raw_irc
Normal file
18
bitchx-docs/5_Programming/on/raw_irc
Normal file
@@ -0,0 +1,18 @@
|
||||
Synopsis:
|
||||
on [<modes>]raw_irc [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This is easily the most flexible hook available in the client. It allows
|
||||
any arbitrary string to be hooked from the server's raw output. It is
|
||||
useful for overriding the client's default behavior when it otherwise
|
||||
wouldn't permit it, or for hooking information when the available named
|
||||
hooks won't do.
|
||||
|
||||
Parameters:
|
||||
$0 server sending message (usually the client's current server)
|
||||
$1 protocol command used
|
||||
$2- arguments, if any, to $1
|
||||
|
||||
See Also:
|
||||
quote(5)
|
||||
|
||||
13
bitchx-docs/5_Programming/on/redirect
Normal file
13
bitchx-docs/5_Programming/on/redirect
Normal file
@@ -0,0 +1,13 @@
|
||||
Synopsis:
|
||||
on [<modes>]redirect [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever something is /redirect'd.
|
||||
|
||||
Parameters:
|
||||
$0 Target to which the text is about to be sent
|
||||
$1- The actual text to be sent
|
||||
|
||||
See Also:
|
||||
redirect(5)
|
||||
|
||||
24
bitchx-docs/5_Programming/on/send_action
Normal file
24
bitchx-docs/5_Programming/on/send_action
Normal file
@@ -0,0 +1,24 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_action [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a CTCP ACTION to a
|
||||
channel or to another person.
|
||||
|
||||
Parameters:
|
||||
$0 target of the ACTION (nickname or channel)
|
||||
$1- text of message sent
|
||||
|
||||
Examples:
|
||||
To display separate messages for public and private actions:
|
||||
on ^send_action "*" {
|
||||
if ( rmatch($0 #* &* +*) ) {
|
||||
echo * $0: $N $1-
|
||||
} {
|
||||
echo *> $0: $N $1-
|
||||
}
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1) action; describe(1); me(1); on(5) action
|
||||
|
||||
22
bitchx-docs/5_Programming/on/send_ctcp
Normal file
22
bitchx-docs/5_Programming/on/send_ctcp
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_ctcp [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a CTCP request or
|
||||
reply to another client.
|
||||
|
||||
Parameters:
|
||||
$0 "PRIVMSG" for requests, "NOTICE" for replies
|
||||
$1 nick the CTCP is being sent to
|
||||
$2 type of CTCP being sent
|
||||
$3- optional arguments to the CTCP being sent
|
||||
|
||||
Examples:
|
||||
To show the user when a CTCP request is sent:
|
||||
on -send_ctcp "PRIVMSG *" {
|
||||
echo *** Requesting a CTCP $2 from $1: $3-
|
||||
}
|
||||
|
||||
See Also:
|
||||
ctcp(1); on(5) send_msg
|
||||
|
||||
14
bitchx-docs/5_Programming/on/send_dcc_chat
Normal file
14
bitchx-docs/5_Programming/on/send_dcc_chat
Normal file
@@ -0,0 +1,14 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_dcc_chat [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a message to another
|
||||
client across a DCC CHAT connection.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of recipient of message sent
|
||||
$1- text of message sent
|
||||
|
||||
See Also:
|
||||
dcc(1) chat; msg(1); on(5) dcc_chat
|
||||
|
||||
15
bitchx-docs/5_Programming/on/send_msg
Normal file
15
bitchx-docs/5_Programming/on/send_msg
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_msg [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a MSG to another user.
|
||||
It is only triggered when sending messages to individual clients, not
|
||||
to channels.
|
||||
|
||||
Parameters:
|
||||
$0 nickname message is sent to
|
||||
$1- text of message sent
|
||||
|
||||
See Also:
|
||||
msg(1); on(5) msg
|
||||
|
||||
14
bitchx-docs/5_Programming/on/send_notice
Normal file
14
bitchx-docs/5_Programming/on/send_notice
Normal file
@@ -0,0 +1,14 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a NOTICE message to a
|
||||
channel or another client.
|
||||
|
||||
Parameters:
|
||||
$0 nickname or channel the NOTICE is sent to
|
||||
$1- text of message sent
|
||||
|
||||
See Also:
|
||||
notice(1); on(5) notice
|
||||
|
||||
14
bitchx-docs/5_Programming/on/send_public
Normal file
14
bitchx-docs/5_Programming/on/send_public
Normal file
@@ -0,0 +1,14 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_public [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client sends a regular, public
|
||||
message to any channel it is on.
|
||||
|
||||
Parameters:
|
||||
$0 the channel the message is sent to
|
||||
$1- text of message sent
|
||||
|
||||
See Also:
|
||||
on(5) public; say(1)
|
||||
|
||||
30
bitchx-docs/5_Programming/on/send_to_server
Normal file
30
bitchx-docs/5_Programming/on/send_to_server
Normal file
@@ -0,0 +1,30 @@
|
||||
Synopsis:
|
||||
on [<modes>]send_to_server [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook, when set, is triggered whenever the client sends data to the
|
||||
server that matches the hook. It is useful for catching raw messages
|
||||
destined for the server and redefining them. One such use is with DCC,
|
||||
as it offers no convenient way to send a raw request. By using the
|
||||
silent mode, the default action (sending data to the server) is
|
||||
suppressed, allowing any arbitrary command to be replaced.
|
||||
|
||||
When this hook is defined, it causes the client to monitor all traffic
|
||||
to the server, making it somewhat resource intensive. It is recommended
|
||||
that it be used sparingly. Caution should be used, as it is easy to
|
||||
put the client into an infinite loop with this hook.
|
||||
|
||||
Parameters:
|
||||
$0 reference number of the target server
|
||||
$1 Unix file descriptor of the server connection
|
||||
$2- text to be sent to the server
|
||||
|
||||
Examples:
|
||||
To change how a DCC handshake is made (on the sending side):
|
||||
on ^send_to_server "% % % PRIVMSG % :$chr(1)DCC*" {
|
||||
quote PRIVMSG $4 :$chr(1)SECRET_DCC $6-
|
||||
}
|
||||
|
||||
See Also:
|
||||
fake-dcc(8); on(5) raw_irc; quote(5)
|
||||
|
||||
12
bitchx-docs/5_Programming/on/server_lost
Normal file
12
bitchx-docs/5_Programming/on/server_lost
Normal file
@@ -0,0 +1,12 @@
|
||||
Synopsis:
|
||||
on [<modes>]server_lost [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client is disconnected from any server
|
||||
for any reason.
|
||||
|
||||
Parameters:
|
||||
$0 server refnum
|
||||
$1 server name
|
||||
$2- reason for disconnect. usually the same as your QUIT(1) message
|
||||
|
||||
16
bitchx-docs/5_Programming/on/server_notice
Normal file
16
bitchx-docs/5_Programming/on/server_notice
Normal file
@@ -0,0 +1,16 @@
|
||||
Synopsis:
|
||||
on [<modes>]server_notice [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a server sends the client a NOTICE. This
|
||||
is generally any message that does not have its own unique name or
|
||||
numeric code, and usually begins with "***"..
|
||||
|
||||
Parameters:
|
||||
$0 server sending the message
|
||||
$1 first word of the actual message (usually "***")
|
||||
$2- remainder of message
|
||||
|
||||
See Also:
|
||||
notice(1)
|
||||
|
||||
27
bitchx-docs/5_Programming/on/set
Normal file
27
bitchx-docs/5_Programming/on/set
Normal file
@@ -0,0 +1,27 @@
|
||||
Synopsis:
|
||||
on [<modes>]set [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a /set is issued.
|
||||
|
||||
Parameters:
|
||||
$0 name of variable to be set.
|
||||
will be "set-error" if an invalid SET variable was specified
|
||||
$1- value the variable will be set to.
|
||||
will be "No such variable "FOO"", where FOO is the invalid SET
|
||||
variable if $0 is "set-error"
|
||||
|
||||
Examples:
|
||||
To make sure EXEC_PROTECTION stays on:
|
||||
on ^set "exec_protection off" {
|
||||
echo *** You cannot set EXEC_PROTECTION off!
|
||||
set exec_protection on
|
||||
}
|
||||
|
||||
To warn of all invalid /SET attempts:
|
||||
on ^set "set-error *" {
|
||||
echo *** $1-. Please try again
|
||||
}
|
||||
See Also:
|
||||
set(4)
|
||||
|
||||
19
bitchx-docs/5_Programming/on/signoff
Normal file
19
bitchx-docs/5_Programming/on/signoff
Normal file
@@ -0,0 +1,19 @@
|
||||
Synopsis:
|
||||
on [<modes>]signoff [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client observes another client on
|
||||
a common channel signing off from irc. It only hooks once per user,
|
||||
not once per channel.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of person signing off
|
||||
$1- signoff message
|
||||
|
||||
See Also:
|
||||
on(5) channel_signoff, exit; quit(1)
|
||||
|
||||
Other Notes:
|
||||
This hook is only triggered for other users. To hook your own signoff,
|
||||
use the EXIT hook.
|
||||
|
||||
14
bitchx-docs/5_Programming/on/silence
Normal file
14
bitchx-docs/5_Programming/on/silence
Normal file
@@ -0,0 +1,14 @@
|
||||
Synopsis:
|
||||
on [<modes>]silence [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a reply from the
|
||||
server from a SILENCE command.
|
||||
|
||||
Parameters:
|
||||
$0 a '+' if a pattern was added, '-' if one was removed
|
||||
$1 the pattern silenced (or unsilenced)
|
||||
|
||||
See Also:
|
||||
silence(1)
|
||||
|
||||
15
bitchx-docs/5_Programming/on/status_update
Normal file
15
bitchx-docs/5_Programming/on/status_update
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]status_update [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the status bar of a visible window
|
||||
**in dumb mode** is updated.
|
||||
|
||||
Parameters:
|
||||
$0 Refnum of the window whose status bar was updated
|
||||
$1 Which status bar has changed, 0 or 1
|
||||
$2- The actual status bar that has been updated
|
||||
|
||||
See Also:
|
||||
set(5) status_double; set(5) status_format.
|
||||
|
||||
24
bitchx-docs/5_Programming/on/timer
Normal file
24
bitchx-docs/5_Programming/on/timer
Normal file
@@ -0,0 +1,24 @@
|
||||
Synopsis:
|
||||
on [#][<mode>]timer [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the specified time (or time glob pattern)
|
||||
matches the current time. The time may be in one of two formats:
|
||||
|
||||
Format Description
|
||||
hh:mm<am|pm> 0 <= hh <= 12, 0 <= mm <= 59, am or pm set accordingly
|
||||
hh:mm 0 <= hh <= 23, 0 <= mm <= 59
|
||||
|
||||
Parameters:
|
||||
$0 current time (format depends on CLOCK_24HOUR setting)
|
||||
|
||||
Examples:
|
||||
To inform the user of the time once per hour on the hour:
|
||||
on ^timer "%:00*" {
|
||||
echo *** The time is not $Z
|
||||
beep
|
||||
}
|
||||
|
||||
See Also:
|
||||
set(4) clock_24hour
|
||||
|
||||
15
bitchx-docs/5_Programming/on/topic
Normal file
15
bitchx-docs/5_Programming/on/topic
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]topic [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered when the topic is changed on any channel the
|
||||
client is on.
|
||||
|
||||
Parameters:
|
||||
$0 nickname of person changing topic
|
||||
$1 channel topic was changed on
|
||||
$2- new topic
|
||||
|
||||
See Also:
|
||||
on(5) 331, 332; topic(1)
|
||||
|
||||
21
bitchx-docs/5_Programming/on/unload
Normal file
21
bitchx-docs/5_Programming/on/unload
Normal file
@@ -0,0 +1,21 @@
|
||||
Synopsis:
|
||||
on [<modes>]unload [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the unload(5) command is issued to unload
|
||||
a packaged script.
|
||||
|
||||
Parameters:
|
||||
$0- the parameters passed to the /package command
|
||||
(NOTE that passing more than one argument to /package may cause
|
||||
future incompatibilities, and should be avoided at all costs)
|
||||
|
||||
Examples:
|
||||
To inform the user that a script is exiting:
|
||||
on ^unload "superscript *" {
|
||||
echo *** SuperScript exiting. To infinity, and lots farther!
|
||||
}
|
||||
|
||||
See Also:
|
||||
package(5); unload(5)
|
||||
|
||||
11
bitchx-docs/5_Programming/on/wall
Normal file
11
bitchx-docs/5_Programming/on/wall
Normal file
@@ -0,0 +1,11 @@
|
||||
Synopsis:
|
||||
on [#][<mode>]wall [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook used to be triggered whenever the client received a WALL
|
||||
message. WALL is no longer in use on any known irc network, and this
|
||||
hook is but a relic of days long gone.
|
||||
|
||||
See Also:
|
||||
on(5) wallop; wallops(3)
|
||||
|
||||
15
bitchx-docs/5_Programming/on/wallop
Normal file
15
bitchx-docs/5_Programming/on/wallop
Normal file
@@ -0,0 +1,15 @@
|
||||
Synopsis:
|
||||
on [<modes>]wallop [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever the client receives a WALLOPS message
|
||||
(a message sent to all irc operators).
|
||||
|
||||
Parameters:
|
||||
$0 nickname of the message sender
|
||||
$1 a '+' if the sender is an operator, '-' if not, 'S' if a server
|
||||
$2- text of message
|
||||
|
||||
See Also:
|
||||
wallops(3)
|
||||
|
||||
22
bitchx-docs/5_Programming/on/who
Normal file
22
bitchx-docs/5_Programming/on/who
Normal file
@@ -0,0 +1,22 @@
|
||||
Synopsis:
|
||||
on [#][<mode>]who [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered when the client receives server output from the
|
||||
WHO command. Each line received can trigger the hook.
|
||||
|
||||
Parameters:
|
||||
$0 channel the user is on, of '*' if none or if it is private
|
||||
$1 nickname of user
|
||||
$2 status of user: <G|H>[*][@|+]
|
||||
| 'G' for gone (away), 'H' for here (not away), '*' for irc
|
||||
| operator, '@' for channel operator, '+' for voice status
|
||||
$3 username portion of user's address
|
||||
$4 hostname portion of user's address
|
||||
$5 user's server
|
||||
$6 server hopcount from user
|
||||
$7- user's IRCNAME
|
||||
|
||||
See Also:
|
||||
who(2)
|
||||
|
||||
14
bitchx-docs/5_Programming/on/widelist
Normal file
14
bitchx-docs/5_Programming/on/widelist
Normal file
@@ -0,0 +1,14 @@
|
||||
Synopsis:
|
||||
on [<modes>]widelist [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered when the client receives server output from a
|
||||
LIST command, when given with the -wide switch.
|
||||
|
||||
Parameters:
|
||||
$0- channel list, of format #channel(n), where 'n' is the number of
|
||||
users on the channel
|
||||
|
||||
See Also:
|
||||
list(2); on(5) list
|
||||
|
||||
16
bitchx-docs/5_Programming/on/window
Normal file
16
bitchx-docs/5_Programming/on/window
Normal file
@@ -0,0 +1,16 @@
|
||||
Synopsis:
|
||||
on [<modes>]window [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever output to any window matches any
|
||||
existing WINDOW hook. Extreme care should be taken when using this hook
|
||||
to redefine messages, as an ECHO command inside it will also be hooked
|
||||
by it.
|
||||
|
||||
Parameters:
|
||||
$0 reference number of name of the window
|
||||
$1- text printed to the window
|
||||
|
||||
See Also:
|
||||
window(4)
|
||||
|
||||
17
bitchx-docs/5_Programming/on/window_create
Normal file
17
bitchx-docs/5_Programming/on/window_create
Normal file
@@ -0,0 +1,17 @@
|
||||
Synopsis:
|
||||
on [<modes>]window_create [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a new window is created. This enables
|
||||
defaults to be given to each window.
|
||||
|
||||
Parameters:
|
||||
$0 reference number or name of created window
|
||||
|
||||
Examples
|
||||
on -window_create "*" window double on
|
||||
/* doubles the status bar for each new window */
|
||||
|
||||
See Also:
|
||||
window(4) new
|
||||
|
||||
12
bitchx-docs/5_Programming/on/window_kill
Normal file
12
bitchx-docs/5_Programming/on/window_kill
Normal file
@@ -0,0 +1,12 @@
|
||||
Synopsis:
|
||||
on [<modes>]window_kill [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This hook is triggered whenever a client window is killed.
|
||||
|
||||
Parameters:
|
||||
$0 reference number or name of killed window
|
||||
|
||||
See Also:
|
||||
window(4) kill
|
||||
|
||||
11
bitchx-docs/5_Programming/on/yell
Normal file
11
bitchx-docs/5_Programming/on/yell
Normal file
@@ -0,0 +1,11 @@
|
||||
Synopsis:
|
||||
on [<modes>]yell [<serial#>] [-|^]<match> { <action> }
|
||||
|
||||
Description:
|
||||
This is hooked by fairly useless but necessary in beta yell()s. They
|
||||
are present in the client for debugging purposes, and scripters may not
|
||||
want them to appear. ON ^yell will suppress their output.
|
||||
|
||||
Parameters:
|
||||
$0- text of the yell()
|
||||
|
||||
Reference in New Issue
Block a user