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=20081125205927.GA43971%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=
"003326.html">
11 <LINK REL=
"Next" HREF=
"003327.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=20081125205927.GA43971%40phat.za.net"
17 TITLE=
"[IRCServices Coding] [IRCServices] akick not setting channel ban">achurch at achurch.org
19 <I>Sun Dec
7 19:
44:
33 PST
2008</I>
21 <LI>Previous message:
<A HREF=
"003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
23 <LI>Next message:
<A HREF=
"003327.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#3328">[ date ]
</a>
27 <a href=
"thread.html#3328">[ thread ]
</a>
28 <a href=
"subject.html#3328">[ subject ]
</a>
29 <a href=
"author.html#3328">[ author ]
</a>
34 <PRE>It does indeed look like the lack of a check can lead to desyncs, causing
35 the failure to set a ban you originally reported. I'll make a release
36 soon with the fix included.
38 Thanks for figuring this out!
41 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>
42 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
44 >|
<i> By Aragon Gouveia
<<A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">aragon at phat.za.net
</A>>
45 </I>>|
<i> [
2008-
11-
25 14:
10 +
0200 ]
46 </I>>><i> So I've changed do_cmode:
48 </I>>><i> case 'b':
49 </I>>><i> if (add) {
50 </I>>><i> int i = find_ban(chan, av[
0]);
51 </I>>><i> if (i == -
1) {
52 </I>>><i> ARRAY_EXTEND(chan-
>bans);
53 </I>>><i> chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
57 </I>>><i> Which I've tested with some oper assisted relinking and things look much
58 </I>>><i> better now. I believe
5.1's do_cmode will cause the same problems (it looks
59 </I>>><i> the same as
5.0's).
61 </I>><i>Below is a diff against
5.1.13 that I reworked a little better than above.
62 </I>><i>Not sure if the extra logging is desirable, and I'm assuming do_cmode() and
63 </I>><i>find_ban() work the same in
5.1. :)
71 </I>><i>--- channels.c.orig Tue Nov
25 22:
48:
24 2008
72 </I>><i>+++ channels.c Tue Nov
25 22:
53:
56 2008
73 </I>><i>@@ -
360,
11 +
360,
16 @@
77 </I>><i>+ int i = find_ban(chan, av[
0]);
78 </I>><i> if (add) {
79 </I>><i>- ARRAY_EXTEND(chan-
>bans);
80 </I>><i>- chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
81 </I>><i>+ if (i == -
1) {
82 </I>><i>+ ARRAY_EXTEND(chan-
>bans);
83 </I>><i>+ chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
85 </I>><i>+ log(
"channel: MODE %s +b %s: ban already exists
",
86 </I>><i>+ chan-
>name, *av);
89 </I>><i>- int i = find_ban(chan, av[
0]);
90 </I>><i> if (i
>=
0) {
91 </I>><i> free(chan-
>bans[i]);
92 </I>><i> ARRAY_REMOVE(chan-
>bans, i);
93 </I>><i>------------------------------------------------------------------
94 </I>><i>To unsubscribe or change your subscription options, visit:
95 </I>><i><A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
102 <LI>Previous message:
<A HREF=
"003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
104 <LI>Next message:
<A HREF=
"003327.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
106 <LI> <B>Messages sorted by:
</B>
107 <a href=
"date.html#3328">[ date ]
</a>
108 <a href=
"thread.html#3328">[ thread ]
</a>
109 <a href=
"subject.html#3328">[ subject ]
</a>
110 <a href=
"author.html#3328">[ author ]
</a>