changeset 16935:c417cc8403e3

Handle channel joins when registration is required more gracefully.
author Ethan Blanton <elb@pidgin.im>
date Tue, 08 May 2007 02:46:50 +0000
parents 2fffd9d72b8f
children 37c57a0a9686
files libpurple/protocols/irc/irc.h libpurple/protocols/irc/msgs.c libpurple/protocols/irc/parse.c
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);
 }
--- 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		*/