changeset 6718:37af5dea14d1

[gaim-migrate @ 7245] IRC diety schmiety committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Wed, 03 Sep 2003 03:21:27 +0000
parents c72012e40672
children 3cc4d5e55a69
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	Wed Sep 03 01:13:20 2003 +0000
+++ b/src/protocols/irc/irc.h	Wed Sep 03 03:21:27 2003 +0000
@@ -106,6 +106,7 @@
 void irc_msg_nick(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_nickused(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args);
+void irc_msg_nochangenick(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_nosend(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args);
--- a/src/protocols/irc/msgs.c	Wed Sep 03 01:13:20 2003 +0000
+++ b/src/protocols/irc/msgs.c	Wed Sep 03 03:21:27 2003 +0000
@@ -647,6 +647,19 @@
 	irc_msg_privmsg(irc, name, from, newargs);
 }
 
+void irc_msg_nochangenick(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(_("Could not change nick:"), args[1]);
+	gaim_notify_error(gc, _("Cannot change nick"), msg, args[2]);
+	g_free(msg);
+}
+
 void irc_msg_part(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	Wed Sep 03 01:13:20 2003 +0000
+++ b/src/protocols/irc/parse.c	Wed Sep 03 03:21:27 2003 +0000
@@ -73,6 +73,7 @@
 	{ "421", "nv:", irc_msg_unknown },	/* Unknown command		*/
 	{ "422", "nv:", irc_msg_endmotd },	/* No MOTD available		*/
 	{ "433", "vn:", irc_msg_nickused },	/* Nickname already in use	*/
+	{ "438", "nn:", irc_msg_nochangenick },	/* Nick may not change		*/
 	{ "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		*/