1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding] [IRCServices] akick not setting channel ban
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20%5BIRCServices%5D%20akick%20not%20setting%20channel%20ban&In-Reply-To=">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"003324.html">
11 <LINK REL=
"Next" HREF=
"003326.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices Coding] [IRCServices] akick not setting channel ban
</H1>
16 <A HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20%5BIRCServices%5D%20akick%20not%20setting%20channel%20ban&In-Reply-To="
17 TITLE=
"[IRCServices Coding] [IRCServices] akick not setting channel ban">aragon at phat.za.net
19 <I>Tue Nov
25 03:
52:
53 PST
2008</I>
21 <LI>Previous message:
<A HREF=
"003324.html">[IRCServices Coding] Migrating Modules to
5.1...
23 <LI>Next message:
<A HREF=
"003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#3325">[ date ]
</a>
27 <a href=
"thread.html#3325">[ thread ]
</a>
28 <a href=
"subject.html#3325">[ subject ]
</a>
29 <a href=
"author.html#3325">[ author ]
</a>
36 First of all, pardon my serious case of thread necro. I decided to rather
37 resurrect this so that some history is at hand. :)
39 |
<i> By Andrew Church
<<A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>>
40 </I>|
<i> [
2005-
09-
12 05:
02 +
0200 ]
41 </I>><i> >I suspect that some of the irc servers in the network drop a ban
42 </I>><i> >silently, resulting in services having this ban on their list, which
43 </I>><i> >is desynched from the rest of the network in this case. I've seen
44 </I>><i> >similar situations with old hybrid servers and other services, but who
45 </I>><i> >knows..
47 </I>><i> That's an interesting possibility. To the original poster: try
48 </I>><i> applying the following patch to Services, then recompiling and restarting
49 </I>><i> in debug mode (ircservices -debug). When you see the bug happening, check
50 </I>><i> the logfile and see if the ban in question is listed. (Also, if you could
51 </I>><i> privately send me the full debug logfile for further analysis I'd
52 </I>><i> appreciate it.)
54 I applied your patch (
2 years ago), thank you. However, it didn't help
55 locate the problem and I never really got the time to focus enough energy on
56 it again until recently. Been living with this bug since then.
58 So it's been a while. I extended your patch a bit by adding logging points
59 into do_cmode() to see when bans get set too. The interesting bits:
63 ARRAY_EXTEND(chan-
>bans);
64 chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
65 log(
"addban([%s],[%s],[%d])
", chan-
>name,
66 chan-
>bans[chan-
>bans_count-
1], chan-
>bans_count-
1);
68 int i = find_ban(chan, av[
0]);
70 log(
"find_ban() true, free([%s])
", chan-
>bans[i]);
71 free(chan-
>bans[i]);
72 ARRAY_REMOVE(chan-
>bans, i);
76 And when the last server relinked a few times:
78 [Nov
23 16:
57:
33 2008] find_ban([#
5fm],[shand0ra*!*@*])
79 [Nov
23 16:
57:
33 2008] ... NOT found
80 [Nov
23 16:
57:
33 2008] addban([#
5fm],[shand0ra*!*@*],[
0])
81 [Nov
23 21:
09:
56 2008] addban([#
5fm],[shand0ra*!*@*],[
1])
82 [Nov
23 21:
25:
20 2008] addban([#
5fm],[shand0ra*!*@*],[
2])
84 And the next find_ban after that:
86 [Nov
24 10:
55:
01 2008] find_ban([#
5fm],[killer!*@*])
87 [Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
88 [Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
89 [Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
90 [Nov
24 10:
55:
01 2008] ... checking [killer!*@*]
91 [Nov
24 10:
55:
01 2008] ... found[
1]!
92 [Nov
24 10:
55:
01 2008] find_ban() true, free([killer!*@*])
95 So I've changed do_cmode:
99 int i = find_ban(chan, av[
0]);
101 ARRAY_EXTEND(chan-
>bans);
102 chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
106 Which I've tested with some oper assisted relinking and things look much
107 better now. I believe
5.1's do_cmode will cause the same problems (it looks
110 Better late than never they say. :)
118 </I>><i> Index: channels.c
119 </I>><i> ===================================================================
120 </I>><i> RCS file: /var/local/cvsroot/ircservices/channels.c,v
121 </I>><i> retrieving revision
2.43.2.1
122 </I>><i> diff -u -r2.43
.2.1 channels.c
123 </I>><i> --- channels.c
6 Jan
2005 17:
15:
11 -
0000 2.43.2.1
124 </I>><i> +++ channels.c
12 Sep
2005 03:
01:
04 -
0000
125 </I>><i> @@ -
192,
22 +
192,
33 @@
127 </I>><i> t = strchr(ban, '!');
129 </I>><i> + if (debug)
130 </I>><i> + log(
"find_ban([%s],[%s])
", chan-
>name, ban);
131 </I>><i> ARRAY_FOREACH (i, chan-
>bans) {
132 </I>><i> + if (debug)
133 </I>><i> + log(
"... checking [%s]
", chan-
>bans[i]);
134 </I>><i> s = strchr(chan-
>bans[i], '!');
135 </I>><i> if (s
&& t) {
136 </I>><i> if (s-(chan-
>bans[i]) == t-ban
137 </I>><i> && irc_strnicmp(chan-
>bans[i], ban, s-(chan-
>bans[i])) ==
0
138 </I>><i> && stricmp(s+
1, t+
1) ==
0
140 </I>><i> + if (debug)
141 </I>><i> + log(
"... found!
");
142 </I>><i> return i;
144 </I>><i> } else if (!s
&& !t) {
145 </I>><i> /* Bans without '!' should be impossible; just
146 </I>><i> * do a case-insensitive compare */
147 </I>><i> - if (stricmp(chan-
>bans[i], ban) ==
0)
148 </I>><i> + if (stricmp(chan-
>bans[i], ban) ==
0) {
149 </I>><i> + if (debug)
150 </I>><i> + log(
"... found!
");
151 </I>><i> return i;
155 </I>><i> + if (debug)
156 </I>><i> + log(
"... NOT found
");
157 </I>><i> return -
1;
167 <LI>Previous message:
<A HREF=
"003324.html">[IRCServices Coding] Migrating Modules to
5.1...
169 <LI>Next message:
<A HREF=
"003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
171 <LI> <B>Messages sorted by:
</B>
172 <a href=
"date.html#3325">[ date ]
</a>
173 <a href=
"thread.html#3325">[ thread ]
</a>
174 <a href=
"subject.html#3325">[ subject ]
</a>
175 <a href=
"author.html#3325">[ author ]
</a>