changeset 6714:0c260c4e753e

[gaim-migrate @ 7240] 515: not identified committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Tue, 02 Sep 2003 23:35:08 +0000
parents 6c871a20d9eb
children f362dc18f920
files src/protocols/irc/irc.h src/protocols/irc/msgs.c src/protocols/irc/parse.c
diffstat 3 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.h	Tue Sep 02 23:34:08 2003 +0000
+++ b/src/protocols/irc/irc.h	Tue Sep 02 23:35:08 2003 +0000
@@ -114,6 +114,7 @@
 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_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_topic(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_unknown(struct irc_conn *irc, const char *name, const char *from, char **args);
--- a/src/protocols/irc/msgs.c	Tue Sep 02 23:34:08 2003 +0000
+++ b/src/protocols/irc/msgs.c	Tue Sep 02 23:35:08 2003 +0000
@@ -766,6 +766,19 @@
 	g_free(nick);
 }
 
+void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args)
+{
+	GaimConnection *gc = gaim_account_get_connection(irc->account);
+	char *msg;
+
+	if (!args || !args[1] || !args[2] || !gc)
+		return;
+
+	msg = g_strdup_printf(_("Cannot join %s:"), args[1]);
+	gaim_notify_error(gc, _("Cannot join channel"), msg, args[2]);
+	g_free(msg);
+}
+
 void irc_msg_quit(struct irc_conn *irc, const char *name, const char *from, char **args)
 {
 	GaimConnection *gc = gaim_account_get_connection(irc->account);
--- a/src/protocols/irc/parse.c	Tue Sep 02 23:34:08 2003 +0000
+++ b/src/protocols/irc/parse.c	Tue Sep 02 23:35:08 2003 +0000
@@ -78,6 +78,7 @@
 	{ "474", "nc:", irc_msg_banned },	/* Banned from channel		*/
 	{ "482", "nc:", irc_msg_notop },	/* Need to be op to do that	*/
 	{ "501", "n:", irc_msg_badmode },	/* Unknown mode flag		*/
+	{ "515", "nc:", irc_msg_regonly },	/* Registration required	*/
 	{ "invite", "n:", irc_msg_invite },	/* Invited			*/
 	{ "join", ":", irc_msg_join },		/* Joined a channel		*/
 	{ "kick", "cn:", irc_msg_kick },	/* KICK				*/