diff options
-rw-r--r-- | src/irc/core/irc-servers.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 1fc7faaa..11817188 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -507,6 +507,19 @@ static void event_server_info(IRC_SERVER_REC *server, const char *data) g_free(params); } +static void event_motd(IRC_SERVER_REC *server, const char *data, const char *from) +{ + if (server->connected) + return; + + /* Stupid broken piece of shit ircd didn't send us 001, + you'd think they could at least get that right?? + But no, then I'll have to go and add these idiotic kludges + to make them work. Maybe I should instead get the users of these + servers to complain about it to their admins. */ + event_connected(server, data, from); +} + static void event_channels_formed(IRC_SERVER_REC *server, const char *data) { char *params, *channels; @@ -564,6 +577,7 @@ void irc_servers_init(void) signal_add_last("server quit", (SIGNAL_FUNC) sig_server_quit); signal_add("event 001", (SIGNAL_FUNC) event_connected); signal_add("event 004", (SIGNAL_FUNC) event_server_info); + signal_add("event 375", (SIGNAL_FUNC) event_motd); signal_add("event 254", (SIGNAL_FUNC) event_channels_formed); signal_add("event 465", (SIGNAL_FUNC) event_server_banned); signal_add("event error", (SIGNAL_FUNC) event_error); @@ -586,6 +600,7 @@ void irc_servers_deinit(void) signal_remove("server quit", (SIGNAL_FUNC) sig_server_quit); signal_remove("event 001", (SIGNAL_FUNC) event_connected); signal_remove("event 004", (SIGNAL_FUNC) event_server_info); + signal_remove("event 375", (SIGNAL_FUNC) event_motd); signal_remove("event 254", (SIGNAL_FUNC) event_channels_formed); signal_remove("event 465", (SIGNAL_FUNC) event_server_banned); signal_remove("event error", (SIGNAL_FUNC) event_error); |