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=20081125115253.GB2825%40phat.za.net">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"003328.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=20081125115253.GB2825%40phat.za.net"
17 TITLE=
"[IRCServices Coding] [IRCServices] akick not setting channel ban">achurch at achurch.org
19 <I>Thu Nov
27 20:
08:
40 PST
2008</I>
21 <LI>Previous message:
<A HREF=
"003328.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
24 <LI> <B>Messages sorted by:
</B>
25 <a href=
"date.html#3327">[ date ]
</a>
26 <a href=
"thread.html#3327">[ thread ]
</a>
27 <a href=
"subject.html#3327">[ subject ]
</a>
28 <a href=
"author.html#3327">[ author ]
</a>
33 <PRE>I won't have a chance to look at this for a bit due to work obligations,
34 but thanks in advance. (: At first glance, yes, this looks like the Right
38 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>
39 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
43 </I>><i>First of all, pardon my serious case of thread necro. I decided to rather
44 </I>><i>resurrect this so that some history is at hand. :)
46 </I>>|
<i> By Andrew Church
<<A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>>
47 </I>>|
<i> [
2005-
09-
12 05:
02 +
0200 ]
48 </I>>><i> >I suspect that some of the irc servers in the network drop a ban
49 </I>>><i> >silently, resulting in services having this ban on their list, which
50 </I>>><i> >is desynched from the rest of the network in this case. I've seen
51 </I>>><i> >similar situations with old hybrid servers and other services, but who
52 </I>>><i> >knows..
54 </I>>><i> That's an interesting possibility. To the original poster: try
55 </I>>><i> applying the following patch to Services, then recompiling and restarting
56 </I>>><i> in debug mode (ircservices -debug). When you see the bug happening, check
57 </I>>><i> the logfile and see if the ban in question is listed. (Also, if you could
58 </I>>><i> privately send me the full debug logfile for further analysis I'd
59 </I>>><i> appreciate it.)
61 </I>><i>I applied your patch (
2 years ago), thank you. However, it didn't help
62 </I>><i>locate the problem and I never really got the time to focus enough energy on
63 </I>><i>it again until recently. Been living with this bug since then.
65 </I>><i>So it's been a while. I extended your patch a bit by adding logging points
66 </I>><i>into do_cmode() to see when bans get set too. The interesting bits:
70 </I>><i> ARRAY_EXTEND(chan-
>bans);
71 </I>><i> chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
72 </I>><i> log(
"addban([%s],[%s],[%d])
", chan-
>name,
73 </I>><i> chan-
>bans[chan-
>bans_count-
1], chan-
>bans_count-
1);
75 </I>><i> int i = find_ban(chan, av[
0]);
76 </I>><i> if (i
>=
0) {
77 </I>><i> log(
"find_ban() true, free([%s])
", chan-
>bans[i]);
78 </I>><i> free(chan-
>bans[i]);
79 </I>><i> ARRAY_REMOVE(chan-
>bans, i);
83 </I>><i>And when the last server relinked a few times:
85 </I>><i>[Nov
23 16:
57:
33 2008] find_ban([#
5fm],[shand0ra*!*@*])
86 </I>><i>[Nov
23 16:
57:
33 2008] ... NOT found
87 </I>><i>[Nov
23 16:
57:
33 2008] addban([#
5fm],[shand0ra*!*@*],[
0])
88 </I>><i>[Nov
23 21:
09:
56 2008] addban([#
5fm],[shand0ra*!*@*],[
1])
89 </I>><i>[Nov
23 21:
25:
20 2008] addban([#
5fm],[shand0ra*!*@*],[
2])
91 </I>><i>And the next find_ban after that:
93 </I>><i>[Nov
24 10:
55:
01 2008] find_ban([#
5fm],[killer!*@*])
94 </I>><i>[Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
95 </I>><i>[Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
96 </I>><i>[Nov
24 10:
55:
01 2008] ... checking [shand0ra*!*@*]
97 </I>><i>[Nov
24 10:
55:
01 2008] ... checking [killer!*@*]
98 </I>><i>[Nov
24 10:
55:
01 2008] ... found[
1]!
99 </I>><i>[Nov
24 10:
55:
01 2008] find_ban() true, free([killer!*@*])
102 </I>><i>So I've changed do_cmode:
105 </I>><i>if (add) {
106 </I>><i> int i = find_ban(chan, av[
0]);
107 </I>><i> if (i == -
1) {
108 </I>><i> ARRAY_EXTEND(chan-
>bans);
109 </I>><i> chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
113 </I>><i>Which I've tested with some oper assisted relinking and things look much
114 </I>><i>better now. I believe
5.1's do_cmode will cause the same problems (it looks
115 </I>><i>the same as
5.0's).
117 </I>><i>Better late than never they say. :)
125 </I>>><i> Index: channels.c
126 </I>>><i> ===================================================================
127 </I>>><i> RCS file: /var/local/cvsroot/ircservices/channels.c,v
128 </I>>><i> retrieving revision
2.43.2.1
129 </I>>><i> diff -u -r2.43
.2.1 channels.c
130 </I>>><i> --- channels.c
6 Jan
2005 17:
15:
11 -
0000 2.43.2.1
131 </I>>><i> +++ channels.c
12 Sep
2005 03:
01:
04 -
0000
132 </I>>><i> @@ -
192,
22 +
192,
33 @@
134 </I>>><i> t = strchr(ban, '!');
135 </I>>><i> i =
0;
136 </I>>><i> + if (debug)
137 </I>>><i> + log(
"find_ban([%s],[%s])
", chan-
>name, ban);
138 </I>>><i> ARRAY_FOREACH (i, chan-
>bans) {
139 </I>>><i> + if (debug)
140 </I>>><i> + log(
"... checking [%s]
", chan-
>bans[i]);
141 </I>>><i> s = strchr(chan-
>bans[i], '!');
142 </I>>><i> if (s
&& t) {
143 </I>>><i> if (s-(chan-
>bans[i]) == t-ban
144 </I>>><i> && irc_strnicmp(chan-
>bans[i], ban, s-(chan-
>bans[i])) ==
0
145 </I>>><i> && stricmp(s+
1, t+
1) ==
0
147 </I>>><i> + if (debug)
148 </I>>><i> + log(
"... found!
");
149 </I>>><i> return i;
151 </I>>><i> } else if (!s
&& !t) {
152 </I>>><i> /* Bans without '!' should be impossible; just
153 </I>>><i> * do a case-insensitive compare */
154 </I>>><i> - if (stricmp(chan-
>bans[i], ban) ==
0)
155 </I>>><i> + if (stricmp(chan-
>bans[i], ban) ==
0) {
156 </I>>><i> + if (debug)
157 </I>>><i> + log(
"... found!
");
158 </I>>><i> return i;
162 </I>>><i> + if (debug)
163 </I>>><i> + log(
"... NOT found
");
164 </I>>><i> return -
1;
167 </I>><i>------------------------------------------------------------------
168 </I>><i>To unsubscribe or change your subscription options, visit:
169 </I>><i><A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
177 <LI>Previous message:
<A HREF=
"003328.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
180 <LI> <B>Messages sorted by:
</B>
181 <a href=
"date.html#3327">[ date ]
</a>
182 <a href=
"thread.html#3327">[ thread ]
</a>
183 <a href=
"subject.html#3327">[ subject ]
</a>
184 <a href=
"author.html#3327">[ author ]
</a>