summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2007-06-08 18:49:24 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-06-08 18:49:24 +0000
commit9d6335735bf1adaf5219c932cd8d3cb31553ca6a (patch)
tree6d3efcf6a7390adb1688e2dcf31288558fccf954 /src/irc
parent10ae40c3688388ef40cf2fb272258bb75970d2cc (diff)
downloadirssi-9d6335735bf1adaf5219c932cd8d3cb31553ca6a.zip
Add support for the ACCEPT command, which is part of the
CALLERID server side ignore system in hybrid7 and derived ircds. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4546 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-commands.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 45fb0090..7f31b59d 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -940,6 +940,17 @@ static void cmd_oper(const char *data, IRC_SERVER_REC *server)
cmd_params_free(free_arg);
}
+/* SYNTAX: ACCEPT [[-]nick,...] */
+static void cmd_accept(const char *data, IRC_SERVER_REC *server)
+{
+ CMD_IRC_SERVER(server);
+
+ if (*data == '\0')
+ irc_send_cmd(server, "ACCEPT *");
+ else
+ irc_send_cmdv(server, "ACCEPT %s", data);
+}
+
/* SYNTAX: UNSILENCE <nick!user@host> */
static void cmd_unsilence(const char *data, IRC_SERVER_REC *server)
{
@@ -1015,6 +1026,7 @@ void irc_commands_init(void)
command_bind_irc("away", NULL, (SIGNAL_FUNC) cmd_away);
/* SYNTAX: ISON <nicks> */
command_bind_irc("ison", NULL, (SIGNAL_FUNC) command_1self);
+ command_bind_irc("accept", NULL, (SIGNAL_FUNC) cmd_accept);
/* SYNTAX: ADMIN [<server>|<nickname>] */
command_bind_irc("admin", NULL, (SIGNAL_FUNC) command_self);
/* SYNTAX: INFO [<server>] */
@@ -1110,6 +1122,7 @@ void irc_commands_deinit(void)
command_unbind("kill", (SIGNAL_FUNC) command_2self);
command_unbind("away", (SIGNAL_FUNC) cmd_away);
command_unbind("ison", (SIGNAL_FUNC) command_1self);
+ command_unbind("accept", (SIGNAL_FUNC) cmd_accept);
command_unbind("admin", (SIGNAL_FUNC) command_self);
command_unbind("info", (SIGNAL_FUNC) command_self);
command_unbind("knock", (SIGNAL_FUNC) command_self);