modules/server/binds.c File Reference

#include "server.h"

Go to the source code of this file.

Functions

void server_binds_destroy ()
void server_binds_init ()

Variables

static const char rcsid [] = "$Id: binds.c,v 1.17 2005-03-03 18:45:26 stdarg Exp $"
bind_table_tBT_wall = NULL
bind_table_tBT_raw = NULL
bind_table_tBT_server_input = NULL
bind_table_tBT_server_output = NULL
bind_table_tBT_notice = NULL
bind_table_tBT_msg = NULL
bind_table_tBT_msgm = NULL
bind_table_tBT_pub = NULL
bind_table_tBT_pubm = NULL
bind_table_tBT_ctcp = NULL
bind_table_tBT_ctcr = NULL
bind_table_tBT_dcc_chat = NULL
bind_table_tBT_dcc_recv = NULL
bind_table_tBT_nick = NULL
bind_table_tBT_join = NULL
bind_table_tBT_part = NULL
bind_table_tBT_quit = NULL
bind_table_tBT_kick = NULL
bind_table_tBT_leave = NULL
bind_table_tBT_mode = NULL
bind_table_tBT_chanset = NULL


Function Documentation

void server_binds_destroy (  ) 

void server_binds_init (  ) 

Definition at line 162 of file binds.c.

References bind_add_list(), BIND_BREAKABLE, BIND_STACKABLE, bind_table_add(), ctcp_dcc_binds, MATCH_EXACT, MATCH_FLAGS, MATCH_FLAGS_OR, MATCH_MASK, and MATCH_NONE.

00163 {
00164   /* Create our bind tables. */
00165   BT_wall = bind_table_add("wall", 2, "ss", MATCH_MASK, BIND_STACKABLE);
00166   BT_raw = bind_table_add("raw", 6, "ssUsiS", MATCH_MASK, BIND_STACKABLE);
00167   BT_server_input = bind_table_add("server_input", 1, "s", MATCH_NONE, BIND_STACKABLE | BIND_BREAKABLE);
00168   BT_server_output = bind_table_add("server_output", 1, "s", MATCH_NONE, BIND_STACKABLE | BIND_BREAKABLE);
00169   BT_notice = bind_table_add("notice", 5, "ssUss", MATCH_MASK | MATCH_FLAGS_OR, BIND_STACKABLE);
00170   BT_msg = bind_table_add("msg", 4, "ssUs", MATCH_EXACT, 0);            /* DDD */
00171   BT_msgm = bind_table_add("msgm", 4, "ssUs", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);      /* DDD */
00172   BT_pub = bind_table_add("pub", 5, "ssUss", MATCH_EXACT, 0);           /* DDD */
00173   BT_pubm = bind_table_add("pubm", 5, "ssUss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);     /* DDD */
00174   BT_ctcr = bind_table_add("ctcr", 6, "ssUsss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);    /* DDD */
00175   BT_ctcp = bind_table_add("ctcp", 6, "ssUsss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);    /* DDD */
00176   BT_dcc_chat = bind_table_add("dcc_chat", 6, "ssUssi", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);  /* DDD */
00177   BT_dcc_recv = bind_table_add("dcc_recv", 7, "ssUssii", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE); /* DDD */
00178   BT_nick = bind_table_add("nick", 4, "ssUs", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);      /* DDD */
00179   BT_join = bind_table_add("join", 4, "ssUs", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);      /* DDD */
00180   BT_part = bind_table_add("part", 5, "ssUss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);     /* DDD */
00181   BT_quit = bind_table_add("quit", 4, "ssUs", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);      /* DDD */
00182   BT_kick = bind_table_add("kick", 5, "ssUss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);     /* DDD */
00183   BT_leave = bind_table_add("leave", 4, "ssUs", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);    /* DDD */
00184   BT_mode = bind_table_add("mode", 6, "ssUsss", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);    /* DDD */
00185 
00186   BT_chanset = bind_table_add("chanset", 4, "ssss", MATCH_MASK, BIND_STACKABLE);
00187 
00188   bind_add_list("ctcp", ctcp_dcc_binds);
00189 }


Variable Documentation

Definition at line 135 of file binds.c.

Definition at line 124 of file binds.c.

Definition at line 125 of file binds.c.

Definition at line 126 of file binds.c.

Definition at line 127 of file binds.c.

Definition at line 129 of file binds.c.

Definition at line 132 of file binds.c.

Definition at line 133 of file binds.c.

Definition at line 134 of file binds.c.

Todo:
test this
shit
Bind:
Triggered whenever the bot receives a privmsg directed at the bot itself instead of a channel.
Return values:
foo 
Name:
msg
Flags:
Matches the flags of the user who sent the privmsg.
Match:
Matches the first word of the privmsg. No wildcards allowed.
Parameters:
string The nick of the source.
string Ident@Host of the source.
user The user account of the source.
string The rest of the line.
Returns:
Returning BIND_RET_LOG will log this command. Returning BIND_RET_BREAK will prevent the BT_msgm event for this line.

Definition at line 120 of file binds.c.

Definition at line 121 of file binds.c.

Definition at line 128 of file binds.c.

Bind:
Triggered whenever the bot receives a notice.
Name:
notice
Flags:
Matches the flags of the user who sent the notice.
Match:
Matches the entire text of the notice.
Parameters:
string The text of the notice.
Note:
This bind is stackable.
Returns:
Any return value will be ignored.

Definition at line 99 of file binds.c.

Definition at line 130 of file binds.c.

Definition at line 122 of file binds.c.

Definition at line 123 of file binds.c.

Definition at line 131 of file binds.c.

Bind:
Triggered whenever the bot receives any kind of input from the server.
Name:
raw
Flags:
Ignored.
Match:
The command.
Parameters:
string The nick of the source.
string Ident@Host of the source.
user The user account of the source.
string The command.
integer The number of parameters.
Array All further parameters.
Note:
This bind is stackable.
Returns:
Any return value will be ignored.

Definition at line 56 of file binds.c.

Bind:
Triggered whenever the bot receives any kind of input from the server before the bot parses it. The text can be altered by setting the server_input_string variable. The bot can be forced to ignore a line by breaking this bind.
Name:
server_input
Flags:
Ignored.
Match:
None.
Parameters:
string The line sent by the server.
Note:
This bind is stackable and breakable.
Returns:
A function can return BIND_RET_BREAK to force the bot to ignore this line.

Definition at line 71 of file binds.c.

Bind:
Triggered whenever the bot is about to send a line to the server. The text can be altered by setting the server_output_string variable. The bot can be forced to drop a line by breaking this bind.
Name:
server_output
Flags:
Ignored.
Match:
None.
Parameters:
string The line to be sent to the server.
Note:
This bind is stackable and breakable.
Returns:
A function can return BIND_RET_BREAK to force the bot to drop this line.

Definition at line 86 of file binds.c.

Bind:
Triggered whenever the bot receives WALLOPS from the server.
Name:
wall
Flags:
Ignored.
Match:
The message.
Parameters:
string The nick of the author.
string The message.
Note:
This bind is stackable.
Returns:
Any return value will be ignored.

Definition at line 38 of file binds.c.

const char rcsid[] = "$Id: binds.c,v 1.17 2005-03-03 18:45:26 stdarg Exp $" [static]

Definition at line 21 of file binds.c.


Generated on Sun Nov 30 18:43:33 2008 for eggdrop1.9 by  doxygen 1.5.6