[ekg2-commit] r4086 - trunk/plugins/irc: trunk/plugins/irc/misc.c
SVN commit
svn w toxygen.net
Śro, 9 Lip 2008, 22:50:32 CEST
Author: darkjames
Date: 2008-07-09 22:50:31 +0200 (Wed, 09 Jul 2008)
New Revision: 4086
Modified:
trunk/plugins/irc/misc.c
Log:
allow ignoring join/parts in whole channel as well.
Modified: trunk/plugins/irc/misc.c
===================================================================
--- trunk/plugins/irc/misc.c 2008-07-09 16:40:08 UTC (rev 4085)
+++ trunk/plugins/irc/misc.c 2008-07-09 20:50:31 UTC (rev 4086)
@@ -1261,13 +1261,14 @@
window_t *newwin;
people_t *person;
int me = 0;
- char *ignore_nick;
+ char *irc_nick;
/* irc channels are said to be case insensitive, so I think
* we can do it 'in place', without a copy
*/
irc_channel = IRC_TO_LOWER(OMITCOLON(param[2]));
ekg2_channel = saprintf("%s:%s", IRC3, irc_channel);
+ irc_nick = saprintf("%s:%s", IRC3, param[0]+1);
if ((tmp = xstrchr(param[0], '!'))) *tmp='\0';
/* istnieje jakaśtam szansa że ktoś zrobi nick i part i będzie
@@ -1287,8 +1288,7 @@
irc_access_parse(s, irc_find_channel(j->channels, irc_channel), person, 0);
}
- ignore_nick = saprintf("%s%s", IRC4, param[0]+1);
- if (!(ignored_check(s, ignore_nick) & IGNORE_NOTIFY)) {
+ if (!(ignored_check(s, ekg2_channel) & IGNORE_NOTIFY) && !(ignored_check(s, irc_nick) & IGNORE_NOTIFY)) {
print_window(ekg2_channel, s, 0, me ? "irc_joined_you" : "irc_joined",
session_name(s), param[0]+1, tmp?tmp+1:"", irc_channel);
if (me) {
@@ -1307,7 +1307,7 @@
}
if (tmp) *tmp='!';
- xfree(ignore_nick);
+ xfree(irc_nick);
xfree(ekg2_channel);
return 0;
}
@@ -1319,7 +1319,7 @@
*/
IRC_COMMAND(irc_c_part)
{
- char *ekg2_channel, *irc_channel, *tmp, *coloured, *ignore_nick;
+ char *ekg2_channel, *irc_channel, *tmp, *coloured, *irc_nick;
int me = 0;
if ((tmp = xstrchr(param[0], '!'))) *tmp = '\0';
@@ -1329,6 +1329,7 @@
irc_channel = IRC_TO_LOWER(OMITCOLON(param[2]));
ekg2_channel = saprintf("%s:%s", IRC3, irc_channel);
+ irc_nick = saprintf("%s:%s", IRC3, param[0]+1);
/* Servers MUST be able to parse arguments in the form of
* a list of target, but SHOULD NOT use lists when sending
@@ -1351,17 +1352,16 @@
* G->dj: yep, but we can make this behaviour dependent on something
* e.g: on my fave: DISPLAY_IN_CURRENT :)
*/
- ignore_nick = saprintf("%s%s", IRC4, param[0]+1);
- if (!(ignored_check(s, ignore_nick) & IGNORE_NOTIFY)) {
+ if (!(ignored_check(s, ekg2_channel) & IGNORE_NOTIFY) && !(ignored_check(s, irc_nick) & IGNORE_NOTIFY)) {
print_window(ekg2_channel, s, 0, (me)?"irc_left_you":"irc_left", session_name(s),
param[0]+1, tmp?tmp+1:"", irc_channel, coloured);
}
- xfree(ignore_nick);
if (tmp) *tmp='!';
xfree(coloured);
xfree(ekg2_channel);
+ xfree(irc_nick);
return 0;
}
Więcej informacji o liście dyskusyjnej ekg2-commit