summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-08-05 20:05:53 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-08-05 20:05:53 +0000
commit70d6af7a0ede5eddcb17a0d1a3b29422238510d1 (patch)
treeb4930a1acd35407f4e27876ded350593a485aa69
parentFixed DCC restore after /upgrade (now order is saved) (diff)
downloadweechat-70d6af7a0ede5eddcb17a0d1a3b29422238510d1.tar.xz
weechat-70d6af7a0ede5eddcb17a0d1a3b29422238510d1.zip
Added missing IRC command 338
-rw-r--r--ChangeLog3
-rw-r--r--src/irc/irc-commands.c2
-rw-r--r--src/irc/irc-recv.c56
-rw-r--r--src/irc/irc.h1
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/irc/irc-commands.c2
-rw-r--r--weechat/src/irc/irc-recv.c56
-rw-r--r--weechat/src/irc/irc.h1
8 files changed, 122 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9ed4fe69..c06e3c792 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,8 @@ WeeChat - Wee Enhanced Environment for Chat
ChangeLog - 2006-08-05
Version 0.2.0 (under dev!):
- * fixed DCC restore after /upgrade (now order is saved)
+ * added missing IRC command 338
+ * fixed DCC restore after /upgrade (order is now correctly saved)
* fixed away after server disconnection (now away is set again when
reconnecting) (bug #16359)
* fixed DCC file connection problem (connection from receiver to sender)
diff --git a/src/irc/irc-commands.c b/src/irc/irc-commands.c
index ddc295f20..fc9a7feca 100644
--- a/src/irc/irc-commands.c
+++ b/src/irc/irc-commands.c
@@ -358,6 +358,8 @@ t_irc_command irc_commands[] =
NULL, 2, 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_332 },
{ "333", N_("infos about topic (nick and date changed)"), "", "",
NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_333 },
+ { "338", N_("whois (host))"), "", "",
+ NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_338 },
{ "341", N_("inviting"), "", "",
NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_341 },
{ "344", N_("channel reop"), "", "",
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index f89c5b288..b9441d6a5 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -4197,6 +4197,62 @@ irc_cmd_recv_333 (t_irc_server *server, char *host, char *nick, char *arguments)
}
/*
+ * irc_cmd_recv_338: '338' command (whois, host)
+ */
+
+int
+irc_cmd_recv_338 (t_irc_server *server, char *host, char *nick, char *arguments)
+{
+ char *pos_nick, *pos_host, *pos_message;
+
+ /* make gcc happy */
+ (void) host;
+ (void) nick;
+
+ if (!command_ignored)
+ {
+ pos_nick = strchr (arguments, ' ');
+ if (pos_nick)
+ {
+ while (pos_nick[0] == ' ')
+ pos_nick++;
+ pos_host = strchr (pos_nick, ' ');
+ if (pos_host)
+ {
+ pos_host[0] = '\0';
+ pos_host++;
+ while (pos_host[0] == ' ')
+ pos_host++;
+ pos_message = strchr (pos_host, ' ');
+ if (pos_message)
+ {
+ pos_message[0] = '\0';
+ pos_message++;
+ while (pos_message[0] == ' ')
+ pos_message++;
+ if (pos_message[0] == ':')
+ pos_message++;
+
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
+ gui_printf (server->buffer, "%s[%s%s%s] %s%s %s%s %s%s\n",
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ pos_nick,
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ pos_nick,
+ GUI_COLOR(COLOR_WIN_CHAT),
+ pos_message,
+ GUI_COLOR(COLOR_WIN_CHAT_HOST),
+ pos_host);
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+/*
* irc_cmd_recv_341: '341' command received (inviting)
*/
diff --git a/src/irc/irc.h b/src/irc/irc.h
index 17822cf1d..62b8364cb 100644
--- a/src/irc/irc.h
+++ b/src/irc/irc.h
@@ -572,6 +572,7 @@ extern int irc_cmd_recv_329 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *, char *);
+extern int irc_cmd_recv_338 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_341 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_344 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_345 (t_irc_server *, char *, char *, char *);
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index f9ed4fe69..c06e3c792 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -4,7 +4,8 @@ WeeChat - Wee Enhanced Environment for Chat
ChangeLog - 2006-08-05
Version 0.2.0 (under dev!):
- * fixed DCC restore after /upgrade (now order is saved)
+ * added missing IRC command 338
+ * fixed DCC restore after /upgrade (order is now correctly saved)
* fixed away after server disconnection (now away is set again when
reconnecting) (bug #16359)
* fixed DCC file connection problem (connection from receiver to sender)
diff --git a/weechat/src/irc/irc-commands.c b/weechat/src/irc/irc-commands.c
index ddc295f20..fc9a7feca 100644
--- a/weechat/src/irc/irc-commands.c
+++ b/weechat/src/irc/irc-commands.c
@@ -358,6 +358,8 @@ t_irc_command irc_commands[] =
NULL, 2, 0, MAX_ARGS, 1, NULL, NULL, irc_cmd_recv_332 },
{ "333", N_("infos about topic (nick and date changed)"), "", "",
NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_333 },
+ { "338", N_("whois (host))"), "", "",
+ NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_338 },
{ "341", N_("inviting"), "", "",
NULL, 0, 0, 0, 1, NULL, NULL, irc_cmd_recv_341 },
{ "344", N_("channel reop"), "", "",
diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c
index f89c5b288..b9441d6a5 100644
--- a/weechat/src/irc/irc-recv.c
+++ b/weechat/src/irc/irc-recv.c
@@ -4197,6 +4197,62 @@ irc_cmd_recv_333 (t_irc_server *server, char *host, char *nick, char *arguments)
}
/*
+ * irc_cmd_recv_338: '338' command (whois, host)
+ */
+
+int
+irc_cmd_recv_338 (t_irc_server *server, char *host, char *nick, char *arguments)
+{
+ char *pos_nick, *pos_host, *pos_message;
+
+ /* make gcc happy */
+ (void) host;
+ (void) nick;
+
+ if (!command_ignored)
+ {
+ pos_nick = strchr (arguments, ' ');
+ if (pos_nick)
+ {
+ while (pos_nick[0] == ' ')
+ pos_nick++;
+ pos_host = strchr (pos_nick, ' ');
+ if (pos_host)
+ {
+ pos_host[0] = '\0';
+ pos_host++;
+ while (pos_host[0] == ' ')
+ pos_host++;
+ pos_message = strchr (pos_host, ' ');
+ if (pos_message)
+ {
+ pos_message[0] = '\0';
+ pos_message++;
+ while (pos_message[0] == ' ')
+ pos_message++;
+ if (pos_message[0] == ':')
+ pos_message++;
+
+ irc_display_prefix (server, server->buffer, PREFIX_SERVER);
+ gui_printf (server->buffer, "%s[%s%s%s] %s%s %s%s %s%s\n",
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ pos_nick,
+ GUI_COLOR(COLOR_WIN_CHAT_DARK),
+ GUI_COLOR(COLOR_WIN_CHAT_NICK),
+ pos_nick,
+ GUI_COLOR(COLOR_WIN_CHAT),
+ pos_message,
+ GUI_COLOR(COLOR_WIN_CHAT_HOST),
+ pos_host);
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+/*
* irc_cmd_recv_341: '341' command received (inviting)
*/
diff --git a/weechat/src/irc/irc.h b/weechat/src/irc/irc.h
index 17822cf1d..62b8364cb 100644
--- a/weechat/src/irc/irc.h
+++ b/weechat/src/irc/irc.h
@@ -572,6 +572,7 @@ extern int irc_cmd_recv_329 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_331 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_332 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_333 (t_irc_server *, char *, char *, char *);
+extern int irc_cmd_recv_338 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_341 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_344 (t_irc_server *, char *, char *, char *);
extern int irc_cmd_recv_345 (t_irc_server *, char *, char *, char *);