summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-08-17 09:47:44 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-08-17 09:47:44 +0000
commit5a0461ac6938ea3aab57826b94021fde54b30541 (patch)
tree046ae836ea5fcd1f6cd65c9e54ad8b785bb72c44 /src
parent48deeb9e77c48e8b7d222320462bd15e39ca1730 (diff)
downloadweechat-5a0461ac6938ea3aab57826b94021fde54b30541.zip
Fixed "wallops" command when received, now displayed by WeeChat (bug #17441)
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-commands.c2
-rw-r--r--src/irc/irc-recv.c28
-rw-r--r--src/irc/irc.h1
3 files changed, 27 insertions, 4 deletions
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c
index 98e88b84c..f9975acb3 100644
--- a/src/irc/irc-commands.c
+++ b/src/irc/irc-commands.c
@@ -288,7 +288,7 @@ t_irc_command irc_commands[] =
"set the 'w' user mode for themselves"),
N_("text"),
N_("text to send"),
- NULL, 1, MAX_ARGS, 1, 1, NULL, irc_cmd_send_wallops, NULL },
+ NULL, 1, MAX_ARGS, 1, 1, NULL, irc_cmd_send_wallops, irc_cmd_recv_wallops },
{ "who", N_("generate a query which returns a list of information"),
N_("[mask [\"o\"]]"),
N_("mask: only information which match this mask\n"
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index a25b3696b..cfded7e10 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -2226,9 +2226,6 @@ irc_cmd_recv_topic (t_irc_server *server, char *host, char *nick, char *argument
t_irc_channel *ptr_channel;
t_gui_buffer *buffer;
- /* make gcc happy */
- (void) nick;
-
if (!string_is_channel (arguments))
{
irc_display_prefix (server, server->buffer, PREFIX_ERROR);
@@ -2296,6 +2293,31 @@ irc_cmd_recv_topic (t_irc_server *server, char *host, char *nick, char *argument
}
/*
+ * irc_cmd_recv_wallops: 'wallops' command received
+ */
+
+int
+irc_cmd_recv_wallops (t_irc_server *server, char *host, char *nick, char *arguments)
+{
+ command_ignored |= ignore_check (host, "wallops", arguments, server->name);
+
+ if (!command_ignored)
+ {
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
+ if (arguments[0] == ':')
+ arguments++;
+ gui_printf (server->buffer,
+ _("WALLOPS from %s%s%s: %s\n"),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ nick,
+ GUI_COLOR(COLOR_WIN_CHAT),
+ arguments);
+ }
+
+ return 0;
+}
+
+/*
* irc_cmd_recv_001: '001' command (connected to irc server)
*/
diff --git a/src/irc/irc.h b/src/irc/irc.h
index 3b130a89c..328d4a5b6 100644
--- a/src/irc/irc.h
+++ b/src/irc/irc.h
@@ -523,6 +523,7 @@ extern int irc_cmd_recv_server_mode_reason (t_irc_server *, char *, char *, char
extern int irc_cmd_recv_server_msg (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_server_reply (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_topic (t_irc_server *, char *, char *, char *);
+extern int irc_cmd_recv_wallops (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_001 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_221 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_301 (t_irc_server *, char *, char *, char *);