changeset 7877:828856b7fe30

[gaim-migrate @ 8531] I suppose IRC should handle 403 (no such channel) committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Sun, 14 Dec 2003 23:20:41 +0000
parents 59c936eead56
children cbfbed263d00
files src/protocols/irc/irc.h src/protocols/irc/msgs.c src/protocols/irc/parse.c
diffstat 3 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.h	Sun Dec 14 23:15:55 2003 +0000
+++ b/src/protocols/irc/irc.h	Sun Dec 14 23:20:41 2003 +0000
@@ -105,6 +105,7 @@
 void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char **args);
 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_nochan(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);
--- a/src/protocols/irc/msgs.c	Sun Dec 14 23:15:55 2003 +0000
+++ b/src/protocols/irc/msgs.c	Sun Dec 14 23:20:41 2003 +0000
@@ -360,6 +360,16 @@
 	irc->timer = g_timeout_add(45000, (GSourceFunc)irc_blist_timeout, (gpointer)irc);
 }
 
+void irc_msg_nochan(struct irc_conn *irc, const char *name, const char *from, char **args)
+{
+	GaimConnection *gc = gaim_account_get_connection(irc->account);
+
+	if (gc == NULL || args == NULL || args[1] == NULL)
+		return;
+
+	gaim_notify_error(gc, NULL, _("No such channel"), args[1]);
+}
+
 void irc_msg_nonick(struct irc_conn *irc, const char *name, const char *from, char **args)
 {
 	GaimConnection *gc;
--- a/src/protocols/irc/parse.c	Sun Dec 14 23:15:55 2003 +0000
+++ b/src/protocols/irc/parse.c	Sun Dec 14 23:20:41 2003 +0000
@@ -69,6 +69,7 @@
 	{ "375", "n:", irc_msg_motd },		/* Start MOTD			*/
 	{ "376", "n:", irc_msg_endmotd },	/* End of MOTD			*/
 	{ "401", "nt:", irc_msg_nonick },	/* No such nick/chan		*/
+	{ "403", "nc:", irc_msg_nochan },	/* No such channel		*/
 	{ "404", "nt:", irc_msg_nosend },	/* Cannot send to chan		*/
 	{ "421", "nv:", irc_msg_unknown },	/* Unknown command		*/
 	{ "422", "nv:", irc_msg_endmotd },	/* No MOTD available		*/