pidgin: a058c134: Fix IRC handling of PART without a part ...
elb at pidgin.im
elb at pidgin.im
Sat May 3 21:45:48 EDT 2008
-----------------------------------------------------------------
Revision: a058c134215134bb51e4d1a2b3f742af2065c6e9
Ancestor: 3082d15caca08e3411fb7cd5e58d6af62811d9e6
Author: elb at pidgin.im
Date: 2008-05-04T01:43:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a058c134215134bb51e4d1a2b3f742af2065c6e9
Modified files:
ChangeLog libpurple/protocols/irc/msgs.c
ChangeLog:
Fix IRC handling of PART without a part message on Undernet IRCds.
-------------- next part --------------
============================================================
--- ChangeLog 96876f04e71c6b213f617285333d4644b2912827
+++ ChangeLog 431f93dd00a1a226b1dd541db10cf7faa2d688c0
@@ -7,6 +7,8 @@ version 2.x.x:
* IRC now displays ban lists in-channel for joined channels.
* Fixed a bug where the list of loaded plugins would get removed when
switching between different operating systems.
+ * Fix reception of IRC PART without a part message on Undernet
+ (fixes a problem with litter in the channel user list).
Pidgin:
* The typing notification in the conversation history can be disabled or
============================================================
--- libpurple/protocols/irc/msgs.c a7f1f2177dc2a58e69d44808e45cd1219d425411
+++ libpurple/protocols/irc/msgs.c e1d3b9eb36e2dc597aea90b75c98aba82875a985
@@ -1015,14 +1015,18 @@ void irc_msg_part(struct irc_conn *irc,
{
PurpleConnection *gc = purple_account_get_connection(irc->account);
PurpleConversation *convo;
- char *nick, *msg;
+ char *nick, *msg, *channel;
if (!args || !args[0] || !gc)
return;
- convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, args[0], irc->account);
+ /* Undernet likes to :-quote the channel name, for no good reason
+ * that I can see. This catches that. */
+ channel = (args[0][0] == ':') ? &args[0][1] : args[0];
+
+ convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, channel, irc->account);
if (!convo) {
- purple_debug(PURPLE_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", args[0]);
+ purple_debug(PURPLE_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", channel);
return;
}
@@ -1033,7 +1037,7 @@ void irc_msg_part(struct irc_conn *irc,
(args[1] && *args[1]) ? ": " : "",
(escaped && *escaped) ? escaped : "");
g_free(escaped);
- purple_conv_chat_write(PURPLE_CONV_CHAT(convo), args[0], msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
+ purple_conv_chat_write(PURPLE_CONV_CHAT(convo), channel, msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(msg);
serv_got_chat_left(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo)));
} else {
More information about the Commits
mailing list