# HG changeset patch # User Ethan Blanton # Date 1179944963 0 # Node ID d04b1617da3daec016b7c349088a64c70a7562c0 # Parent 51fff4d9869fe5430dc75d67920331510a7c959b This should suppress an annoying 477 numeric on channel joins if you aren't identified on freenode. It might cause problems with *real* 477s if you get disconnected, but I'm not sure -- someone scream if it does. diff -r 51fff4d9869f -r d04b1617da3d libpurple/protocols/irc/msgs.c --- a/libpurple/protocols/irc/msgs.c Wed May 23 15:28:54 2007 +0000 +++ b/libpurple/protocols/irc/msgs.c Wed May 23 18:29:23 2007 +0000 @@ -1089,11 +1089,21 @@ void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args) { PurpleConnection *gc = purple_account_get_connection(irc->account); + PurpleConversation *convo; char *msg; if (!args || !args[1] || !args[2] || !gc) return; + convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + if (convo) { + /* This is a channel we're already in; for some reason, + * freenode feels the need to notify us that in some + * hypothetical other situation this might not have + * succeeded. Suppress that. */ + return; + } + msg = g_strdup_printf(_("Cannot join %s: Registration is required."), args[1]); purple_notify_error(gc, _("Cannot join channel"), msg, args[2]); g_free(msg);