# HG changeset patch # User Ethan Blanton # Date 1178592410 0 # Node ID c417cc8403e3e48383db19b98f5bdfe257691faf # Parent 2fffd9d72b8fb98248d85314060fab73ef012259 Handle channel joins when registration is required more gracefully. diff -r 2fffd9d72b8f -r c417cc8403e3 libpurple/protocols/irc/irc.h --- a/libpurple/protocols/irc/irc.h Tue May 08 00:48:20 2007 +0000 +++ b/libpurple/protocols/irc/irc.h Tue May 08 02:46:50 2007 +0000 @@ -142,8 +142,8 @@ void irc_msg_ping(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_pong(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_privmsg(struct irc_conn *irc, const char *name, const char *from, char **args); +void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args); -void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_time(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_topic(struct irc_conn *irc, const char *name, const char *from, char **args); void irc_msg_unavailable(struct irc_conn *irc, const char *name, const char *from, char **args); diff -r 2fffd9d72b8f -r c417cc8403e3 libpurple/protocols/irc/msgs.c --- a/libpurple/protocols/irc/msgs.c Tue May 08 00:48:20 2007 +0000 +++ b/libpurple/protocols/irc/msgs.c Tue May 08 02:46:50 2007 +0000 @@ -1079,7 +1079,7 @@ if (!args || !args[1] || !args[2] || !gc) return; - msg = g_strdup_printf(_("Cannot join %s:"), args[1]); + 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); } diff -r 2fffd9d72b8f -r c417cc8403e3 libpurple/protocols/irc/parse.c --- a/libpurple/protocols/irc/parse.c Tue May 08 00:48:20 2007 +0000 +++ b/libpurple/protocols/irc/parse.c Tue May 08 02:46:50 2007 +0000 @@ -91,6 +91,7 @@ { "442", "nc:", irc_msg_notinchan }, /* Not in channel */ { "473", "nc:", irc_msg_inviteonly }, /* Tried to join invite-only */ { "474", "nc:", irc_msg_banned }, /* Banned from channel */ + { "477", "nc:", irc_msg_regonly }, /* Registration Required */ { "478", "nct:", irc_msg_banfull }, /* Banlist is full */ { "482", "nc:", irc_msg_notop }, /* Need to be op to do that */ { "501", "n:", irc_msg_badmode }, /* Unknown mode flag */