]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2008/003328.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2008 / 003328.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] [IRCServices] akick not setting channel ban
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] [IRCServices] akick not setting channel ban</H1>
15 <B>Andrew Church</B>
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
18 </A><BR>
19 <I>Sun Dec 7 19:44:33 PST 2008</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
22 </A></li>
23 <LI>Next message: <A HREF="003327.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
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.
37
38 Thanks for figuring this out!
39
40 --Andrew Church
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>
43
44 &gt;|<i> By Aragon Gouveia &lt;<A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">aragon at phat.za.net</A>&gt;
45 </I>&gt;|<i> [ 2008-11-25 14:10 +0200 ]
46 </I>&gt;&gt;<i> So I've changed do_cmode:
47 </I>&gt;&gt;<i>
48 </I>&gt;&gt;<i> case 'b':
49 </I>&gt;&gt;<i> if (add) {
50 </I>&gt;&gt;<i> int i = find_ban(chan, av[0]);
51 </I>&gt;&gt;<i> if (i == -1) {
52 </I>&gt;&gt;<i> ARRAY_EXTEND(chan-&gt;bans);
53 </I>&gt;&gt;<i> chan-&gt;bans[chan-&gt;bans_count-1] = sstrdup(av[0]);
54 </I>&gt;&gt;<i> }
55 </I>&gt;&gt;<i>
56 </I>&gt;&gt;<i>
57 </I>&gt;&gt;<i> Which I've tested with some oper assisted relinking and things look much
58 </I>&gt;&gt;<i> better now. I believe 5.1's do_cmode will cause the same problems (it looks
59 </I>&gt;&gt;<i> the same as 5.0's).
60 </I>&gt;<i>
61 </I>&gt;<i>Below is a diff against 5.1.13 that I reworked a little better than above.
62 </I>&gt;<i>Not sure if the extra logging is desirable, and I'm assuming do_cmode() and
63 </I>&gt;<i>find_ban() work the same in 5.1. :)
64 </I>&gt;<i>
65 </I>&gt;<i>
66 </I>&gt;<i>Regards,
67 </I>&gt;<i>Aragon
68 </I>&gt;<i>
69 </I>&gt;<i>
70 </I>&gt;<i>
71 </I>&gt;<i>--- channels.c.orig Tue Nov 25 22:48:24 2008
72 </I>&gt;<i>+++ channels.c Tue Nov 25 22:53:56 2008
73 </I>&gt;<i>@@ -360,11 +360,16 @@
74 </I>&gt;<i> break;
75 </I>&gt;<i>
76 </I>&gt;<i> case 'b':
77 </I>&gt;<i>+ int i = find_ban(chan, av[0]);
78 </I>&gt;<i> if (add) {
79 </I>&gt;<i>- ARRAY_EXTEND(chan-&gt;bans);
80 </I>&gt;<i>- chan-&gt;bans[chan-&gt;bans_count-1] = sstrdup(av[0]);
81 </I>&gt;<i>+ if (i == -1) {
82 </I>&gt;<i>+ ARRAY_EXTEND(chan-&gt;bans);
83 </I>&gt;<i>+ chan-&gt;bans[chan-&gt;bans_count-1] = sstrdup(av[0]);
84 </I>&gt;<i>+ } else {
85 </I>&gt;<i>+ log(&quot;channel: MODE %s +b %s: ban already exists&quot;,
86 </I>&gt;<i>+ chan-&gt;name, *av);
87 </I>&gt;<i>+ }
88 </I>&gt;<i> } else {
89 </I>&gt;<i>- int i = find_ban(chan, av[0]);
90 </I>&gt;<i> if (i &gt;= 0) {
91 </I>&gt;<i> free(chan-&gt;bans[i]);
92 </I>&gt;<i> ARRAY_REMOVE(chan-&gt;bans, i);
93 </I>&gt;<i>------------------------------------------------------------------
94 </I>&gt;<i>To unsubscribe or change your subscription options, visit:
95 </I>&gt;<i><A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
96 </I></PRE>
97
98 <!--endarticle-->
99 <HR>
100 <P><UL>
101 <!--threads-->
102 <LI>Previous message: <A HREF="003326.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
103 </A></li>
104 <LI>Next message: <A HREF="003327.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
105 </A></li>
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>
111 </LI>
112 </UL>
113
114 </body></html>