summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-19 22:34:50 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-19 22:34:50 +0000
commit1efdf062c6529871c4fe3bc497138f91a72ada02 (patch)
tree82ce7694ab4a3bed698d4841f39caea357117387 /src/irc/core
parent725a66df7f45cea5cea518a1a05d610688f718ad (diff)
downloadirssi-1efdf062c6529871c4fe3bc497138f91a72ada02.zip
Removed whois_coming-flag which was used to figure out if 301 event
should be printed as whois-message or normal "nick is away" message. Server redirections are used for that now. Some servers also send 301 event in /WHOWAS reply, this works now as well. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2104 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-commands.c2
-rw-r--r--src/irc/core/irc-nicklist.c9
-rw-r--r--src/irc/core/irc-servers.h1
3 files changed, 2 insertions, 10 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 9bc20ea4..d9a74d49 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -388,6 +388,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server,
NULL,
"event 318", "whois end",
"event 402", event_402,
+ "event 301", "whois away", /* 301 can come as a reply to /MSG, /WHOIS or /WHOWAS */
"event 401", "whois not found",
"event 311", "whois event", NULL);
g_free(str);
@@ -453,6 +454,7 @@ static void cmd_whowas(const char *data, IRC_SERVER_REC *server)
nicks_redir = get_redirect_nicklist(nicks, &free_nick);
server_redirect_event(server, "whowas", 1, nicks_redir, -1, NULL,
+ "event 301", "whowas away", /* 301 can come as a reply to /MSG, /WHOIS or /WHOWAS */
"event 314", "whowas event", NULL);
if (free_nick) g_free(nicks_redir);
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 31b072ba..5614c7d0 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -196,8 +196,6 @@ static void event_whois(IRC_SERVER_REC *server, const char *data)
g_return_if_fail(data != NULL);
- server->whois_coming = TRUE;
-
/* first remove the gone-flag, if user is gone
it will be set later.. */
params = event_get_params(data, 6, NULL, &nick, NULL,
@@ -242,11 +240,6 @@ static void event_whois_ircop(SERVER_REC *server, const char *data)
g_free(params);
}
-static void event_end_of_whois(IRC_SERVER_REC *server, const char *data)
-{
- server->whois_coming = FALSE;
-}
-
static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)
{
char *str;
@@ -373,7 +366,6 @@ void irc_nicklist_init(void)
signal_add_first("event 311", (SIGNAL_FUNC) event_whois);
signal_add_first("event 301", (SIGNAL_FUNC) event_whois_away);
signal_add_first("event 313", (SIGNAL_FUNC) event_whois_ircop);
- signal_add("event 318", (SIGNAL_FUNC) event_end_of_whois);
signal_add("event 353", (SIGNAL_FUNC) event_names_list);
signal_add("event 366", (SIGNAL_FUNC) event_end_of_names);
signal_add("event 433", (SIGNAL_FUNC) event_nick_in_use);
@@ -393,7 +385,6 @@ void irc_nicklist_deinit(void)
signal_remove("event 311", (SIGNAL_FUNC) event_whois);
signal_remove("event 301", (SIGNAL_FUNC) event_whois_away);
signal_remove("event 313", (SIGNAL_FUNC) event_whois_ircop);
- signal_remove("event 318", (SIGNAL_FUNC) event_end_of_whois);
signal_remove("event 353", (SIGNAL_FUNC) event_names_list);
signal_remove("event 366", (SIGNAL_FUNC) event_end_of_names);
signal_remove("event 433", (SIGNAL_FUNC) event_nick_in_use);
diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h
index a7322f09..957a3022 100644
--- a/src/irc/core/irc-servers.h
+++ b/src/irc/core/irc-servers.h
@@ -48,7 +48,6 @@ struct _IRC_SERVER_REC {
char *userhost; /* /USERHOST <nick> - set when joined to first channel */
int channels_formed; /* channels formed in irc network */
- unsigned int whois_coming:1; /* Mostly just to display away message right.. */
unsigned int whois_found:1; /* Did WHOIS return any entries? */
unsigned int whowas_found:1; /* Did WHOWAS return any entries? */