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=
"003325.html">
11 <LINK REL=
"Next" 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">aragon at phat.za.net
19 <I>Tue Nov
25 12:
59:
27 PST
2008</I>
21 <LI>Previous message:
<A HREF=
"003325.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
23 <LI>Next message:
<A HREF=
"003328.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#3326">[ date ]
</a>
27 <a href=
"thread.html#3326">[ thread ]
</a>
28 <a href=
"subject.html#3326">[ subject ]
</a>
29 <a href=
"author.html#3326">[ author ]
</a>
34 <PRE>|
<i> By Aragon Gouveia
<<A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">aragon at phat.za.net
</A>>
35 </I>|
<i> [
2008-
11-
25 14:
10 +
0200 ]
36 </I>><i> So I've changed do_cmode:
39 </I>><i> if (add) {
40 </I>><i> int i = find_ban(chan, av[
0]);
41 </I>><i> if (i == -
1) {
42 </I>><i> ARRAY_EXTEND(chan-
>bans);
43 </I>><i> chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
47 </I>><i> Which I've tested with some oper assisted relinking and things look much
48 </I>><i> better now. I believe
5.1's do_cmode will cause the same problems (it looks
49 </I>><i> the same as
5.0's).
51 Below is a diff against
5.1.13 that I reworked a little better than above.
52 Not sure if the extra logging is desirable, and I'm assuming do_cmode() and
53 find_ban() work the same in
5.1. :)
61 --- channels.c.orig Tue Nov
25 22:
48:
24 2008
62 +++ channels.c Tue Nov
25 22:
53:
56 2008
67 + int i = find_ban(chan, av[
0]);
69 - ARRAY_EXTEND(chan-
>bans);
70 - chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
72 + ARRAY_EXTEND(chan-
>bans);
73 + chan-
>bans[chan-
>bans_count-
1] = sstrdup(av[
0]);
75 + log(
"channel: MODE %s +b %s: ban already exists
",
76 + chan-
>name, *av);
79 - int i = find_ban(chan, av[
0]);
81 free(chan-
>bans[i]);
82 ARRAY_REMOVE(chan-
>bans, i);
91 <LI>Previous message:
<A HREF=
"003325.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
93 <LI>Next message:
<A HREF=
"003328.html">[IRCServices Coding] [IRCServices] akick not setting channel ban
95 <LI> <B>Messages sorted by:
</B>
96 <a href=
"date.html#3326">[ date ]
</a>
97 <a href=
"thread.html#3326">[ thread ]
</a>
98 <a href=
"subject.html#3326">[ subject ]
</a>
99 <a href=
"author.html#3326">[ author ]
</a>