1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

Added missing IRC command 338

This commit is contained in:
Sebastien Helleu
2006-08-05 20:05:53 +00:00
parent fb607cb4ab
commit 70d6af7a0e
8 changed files with 122 additions and 2 deletions
+2 -1
View File
@@ -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)
+2
View File
@@ -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"), "", "",
+56
View File
@@ -4196,6 +4196,62 @@ irc_cmd_recv_333 (t_irc_server *server, char *host, char *nick, char *arguments)
return 0;
}
/*
* 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)
*/
+1
View File
@@ -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 *);
+2 -1
View File
@@ -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)
+2
View File
@@ -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"), "", "",
+56
View File
@@ -4196,6 +4196,62 @@ irc_cmd_recv_333 (t_irc_server *server, char *host, char *nick, char *arguments)
return 0;
}
/*
* 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)
*/
+1
View File
@@ -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 *);