changeset 10659:861ae6ee7b6c

[gaim-migrate @ 12192] 478: ban list full on HEAD committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 06 Mar 2005 16:32:40 +0000
parents 61930cadca7c
children 4b3a952b395e
files src/protocols/irc/irc.h src/protocols/irc/msgs.c src/protocols/irc/parse.c
diffstat 3 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.h	Sun Mar 06 06:14:26 2005 +0000
+++ b/src/protocols/irc/irc.h	Sun Mar 06 16:32:40 2005 +0000
@@ -102,6 +102,7 @@
 void irc_msg_away(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_badmode(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_badnick(struct irc_conn *irc, const char *name, const char *from, char **args);
+void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_banned(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args);
 void irc_msg_endwhois(struct irc_conn *irc, const char *name, const char *from, char **args);
--- a/src/protocols/irc/msgs.c	Sun Mar 06 06:14:26 2005 +0000
+++ b/src/protocols/irc/msgs.c	Sun Mar 06 16:32:40 2005 +0000
@@ -110,6 +110,27 @@
 	g_free(buf);
 }
 
+void irc_msg_banfull(struct irc_conn *irc, const char *name, const char *from, char **args)
+{
+	GaimConversation *convo;
+	char *buf, *nick;
+
+	if (!args || !args[0] || !args[1] || !args[2])
+		return;
+
+	convo = gaim_find_conversation_with_account(GAIM_CONV_CHAT, args[1], irc->account);
+	if (!convo)
+		return;
+
+	nick = g_markup_escape_text(args[2], -1);
+	buf = g_strdup_printf(_("Cannot ban %s: banlist is full"), nick);
+	g_free(nick);
+	gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", buf,
+			     GAIM_MESSAGE_SYSTEM|GAIM_MESSAGE_NO_LOG,
+			     time(NULL));
+	g_free(buf);
+}
+
 void irc_msg_chanmode(struct irc_conn *irc, const char *name, const char *from, char **args)
 {
 	GaimConversation *convo;
--- a/src/protocols/irc/parse.c	Sun Mar 06 06:14:26 2005 +0000
+++ b/src/protocols/irc/parse.c	Sun Mar 06 16:32:40 2005 +0000
@@ -83,6 +83,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		*/
+	{ "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		*/
 	{ "506", "nc:", irc_msg_nosend },	/* Must identify to send	*/