Mercurial > pidgin.yaz
changeset 13522:5ddae6fe983e
[gaim-migrate @ 15898]
SF Patch #1451956 from Philip Derrin
"The IRC client displays any /notice in an IM window,
even when the /notice was actually sent to a channel.
It does so even if the sender of the /notice is being
ignored in that channel.
A patch to fix this is attached. I'm aware the fix is a
little seedy, but so is the code it's fixing."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 17 Mar 2006 05:45:48 +0000 |
parents | d593b7d4f29c |
children | 9713baaa9aa6 |
files | COPYRIGHT src/protocols/irc/msgs.c |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Fri Mar 17 00:47:03 2006 +0000 +++ b/COPYRIGHT Fri Mar 17 05:45:48 2006 +0000 @@ -66,6 +66,7 @@ Jeramey Crawford Michael Culbertson Martijn Dekker +Philip Derrin Balwinder Singh Dheeman Andrew Dieffenbach Finlay Dobbie
--- a/src/protocols/irc/msgs.c Fri Mar 17 00:47:03 2006 +0000 +++ b/src/protocols/irc/msgs.c Fri Mar 17 05:45:48 2006 +0000 @@ -846,10 +846,11 @@ void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args) { - char *newargs[2]; + char *newargs[3]; newargs[0] = " notice "; /* The spaces are magic, leave 'em in! */ newargs[1] = args[1]; + newargs[2] = args[0]; irc_msg_privmsg(irc, name, from, newargs); } @@ -951,7 +952,7 @@ GaimConnection *gc = gaim_account_get_connection(irc->account); GaimConversation *convo; char *nick = irc_mask_nick(from), *tmp, *msg; - int notice = 0; + gboolean notice = FALSE; if (!args || !args[0] || !args[1] || !gc) { g_free(nick); @@ -959,6 +960,9 @@ } notice = !strcmp(args[0], " notice "); + if (notice) { + args[0] = args[2]; + } tmp = irc_parse_ctcp(irc, nick, args[0], args[1], notice); if (!tmp) { g_free(nick); @@ -979,8 +983,6 @@ if (!gaim_utf8_strcasecmp(args[0], gaim_connection_get_display_name(gc))) { serv_got_im(gc, nick, msg, 0, time(NULL)); - } else if (notice) { - serv_got_im(gc, nick, msg, 0, time(NULL)); } else { convo = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, args[0], irc->account); if (convo)