1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Manually asking /MOTD didn't work if we had skip_motd setting enabled

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@259 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-01 16:55:15 +00:00 committed by cras
parent 9bbd284721
commit 1b297770a0

View File

@ -603,12 +603,15 @@ static void event_received(gchar *data, IRC_SERVER_REC *server, gchar *nick, gch
g_free(params); g_free(params);
} }
static void event_motd(gchar *data, SERVER_REC *server, gchar *nick, gchar *addr) static void event_motd(const char *data, IRC_SERVER_REC *server)
{ {
/* numeric event. */ /* numeric event. */
gchar *params, *args, *ptr; char *params, *args, *ptr;
if (settings_get_bool("skip_motd")) /* don't ignore motd anymore after 3 seconds of connection time -
we might have called /MOTD */
if (settings_get_bool("skip_motd") &&
time(NULL)-3 <= server->real_connect_time)
return; return;
params = event_get_params(data, 2 | PARAM_FLAG_GETREST, NULL, &args); params = event_get_params(data, 2 | PARAM_FLAG_GETREST, NULL, &args);
@ -663,6 +666,7 @@ void fe_events_numeric_init(void)
signal_add("event 375", (SIGNAL_FUNC) event_motd); signal_add("event 375", (SIGNAL_FUNC) event_motd);
signal_add("event 376", (SIGNAL_FUNC) event_motd); signal_add("event 376", (SIGNAL_FUNC) event_motd);
signal_add("event 372", (SIGNAL_FUNC) event_motd); signal_add("event 372", (SIGNAL_FUNC) event_motd);
signal_add("event 422", (SIGNAL_FUNC) event_motd);
signal_add("event 004", (SIGNAL_FUNC) event_received); signal_add("event 004", (SIGNAL_FUNC) event_received);
signal_add("event 364", (SIGNAL_FUNC) event_received); signal_add("event 364", (SIGNAL_FUNC) event_received);
@ -714,6 +718,7 @@ void fe_events_numeric_deinit(void)
signal_remove("event 375", (SIGNAL_FUNC) event_motd); signal_remove("event 375", (SIGNAL_FUNC) event_motd);
signal_remove("event 376", (SIGNAL_FUNC) event_motd); signal_remove("event 376", (SIGNAL_FUNC) event_motd);
signal_remove("event 372", (SIGNAL_FUNC) event_motd); signal_remove("event 372", (SIGNAL_FUNC) event_motd);
signal_remove("event 422", (SIGNAL_FUNC) event_motd);
signal_remove("event 004", (SIGNAL_FUNC) event_received); signal_remove("event 004", (SIGNAL_FUNC) event_received);
signal_remove("event 364", (SIGNAL_FUNC) event_received); signal_remove("event 364", (SIGNAL_FUNC) event_received);