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
This commit is contained in:
Timo Sirainen 2001-11-19 22:34:50 +00:00 committed by cras
commit 1efdf062c6
4 changed files with 36 additions and 29 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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? */