Mercurial > pidgin.yaz
comparison libpurple/protocols/irc/msgs.c @ 17256:d04b1617da3d
This should suppress an annoying 477 numeric on channel joins if you
aren't identified on freenode. It might cause problems with *real*
477s if you get disconnected, but I'm not sure -- someone scream if it
does.
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Wed, 23 May 2007 18:29:23 +0000 |
parents | 31c49d31edea |
children | 82a02dbf2fa2 |
comparison
equal
deleted
inserted
replaced
17255:51fff4d9869f | 17256:d04b1617da3d |
---|---|
1087 } | 1087 } |
1088 | 1088 |
1089 void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args) | 1089 void irc_msg_regonly(struct irc_conn *irc, const char *name, const char *from, char **args) |
1090 { | 1090 { |
1091 PurpleConnection *gc = purple_account_get_connection(irc->account); | 1091 PurpleConnection *gc = purple_account_get_connection(irc->account); |
1092 PurpleConversation *convo; | |
1092 char *msg; | 1093 char *msg; |
1093 | 1094 |
1094 if (!args || !args[1] || !args[2] || !gc) | 1095 if (!args || !args[1] || !args[2] || !gc) |
1095 return; | 1096 return; |
1097 | |
1098 convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); | |
1099 if (convo) { | |
1100 /* This is a channel we're already in; for some reason, | |
1101 * freenode feels the need to notify us that in some | |
1102 * hypothetical other situation this might not have | |
1103 * succeeded. Suppress that. */ | |
1104 return; | |
1105 } | |
1096 | 1106 |
1097 msg = g_strdup_printf(_("Cannot join %s: Registration is required."), args[1]); | 1107 msg = g_strdup_printf(_("Cannot join %s: Registration is required."), args[1]); |
1098 purple_notify_error(gc, _("Cannot join channel"), msg, args[2]); | 1108 purple_notify_error(gc, _("Cannot join channel"), msg, args[2]); |
1099 g_free(msg); | 1109 g_free(msg); |
1100 } | 1110 } |