]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2001/000044.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2001 / 000044.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] akills
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20akills&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="000042.html">
11 <LINK REL="Next" HREF="000033.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] akills</H1>
15 <B>v13 at priest.com</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20akills&In-Reply-To="
17 TITLE="[IRCServices Coding] akills">v13 at priest.com
18 </A><BR>
19 <I>Mon Dec 17 05:47:22 PST 2001</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000042.html">[IRCServices Coding] Services 5 having problems to shut down
22 </A></li>
23 <LI>Next message: <A HREF="000033.html">[IRCServices Coding] coding... (svcs 5)
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#44">[ date ]</a>
27 <a href="thread.html#44">[ thread ]</a>
28 <a href="subject.html#44">[ subject ]</a>
29 <a href="author.html#44">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>As of bahamut 1.4.29, s_serv.c -&gt; m_akill() (in bahamut ircd sources)
35 has:
36
37 /* whether or not we have a length, this is still a temporary akill */
38 /* if the length is over a day, or nonexistant, we call this a 'forever'
39 * akill and set -&gt;hold to 0xFFFFFFFF to indicate such
40 * this is a hack to prevent
41 * forever akills from being removed unless by an explicit /rehash */
42 if(length&gt;86400 || !length)
43 aconf-&gt;hold=0xFFFFFFFF;
44 else
45 aconf-&gt;hold=timeset+length;
46
47 which means that akills whith expire time greater than a day, will never
48 expire, unless explicity removed. This way, netsplits may prevent akills
49 to be removed from servers, when services send the RAKILL.
50
51 This can be bypassed, by forcing services to send AKILLs, with expire
52 time less than 86400 by
53 changing (in operserv/akill.c send_akill() ):
54
55 call_callback_5(module, cb_send_akill,
56 username, host,
57 akill-&gt;expires,
58 akill-&gt;who,
59 make_reason(AkillReason, akill));
60
61 to:
62
63 call_callback_5(module, cb_send_akill,
64 username, host,
65 ( (akill-&gt;expires - now) &gt; 86399 ? now + 86399 : akill-&gt;expires),
66 akill-&gt;who,
67 make_reason(AkillReason, akill));
68
69 or better, change the callback in the bahamut protocol module:
70
71 static int do_send_akill(const char *username, const char *host,
72 time_t expires, const char *who, const char *reason)
73 {
74 time_t now = time(NULL);
75
76 send_cmd(ServerName, &quot;AKILL %s %s %ld %s %ld :%s&quot;, host, username,
77 (expires &amp;&amp; expires &gt; now) ? expires - now : 0,
78 who ? who : &quot;&lt;unknown&gt;&quot;, now, reason);
79 return 1;
80 }
81
82 to:
83
84 static int do_send_akill(const char *username, const char *host,
85 time_t expires, const char *who, const char *reason)
86 {
87 time_t now = time(NULL);
88
89 if (expires&gt;now)
90 {
91 expires-=now;
92 if (expires&gt;=86400)
93 expires=86399;
94 }
95
96 send_cmd(ServerName, &quot;AKILL %s %s %ld %s %ld :%s&quot;, host, username,
97 expires, who ? who : &quot;&lt;unknown&gt;&quot;, now, reason);
98 return 1;
99 }
100
101 This way akills for 5 days, will be send up to 5 times on each server
102 (Removed after 86399 seconds and send again when a matching user tries ti use
103 the server). This should not add much overhead and non-expiring akills will
104 not be affected.
105
106 &lt;&lt;V13&gt;&gt;
107
108 </PRE>
109
110 <!--endarticle-->
111 <HR>
112 <P><UL>
113 <!--threads-->
114 <LI>Previous message: <A HREF="000042.html">[IRCServices Coding] Services 5 having problems to shut down
115 </A></li>
116 <LI>Next message: <A HREF="000033.html">[IRCServices Coding] coding... (svcs 5)
117 </A></li>
118 <LI> <B>Messages sorted by:</B>
119 <a href="date.html#44">[ date ]</a>
120 <a href="thread.html#44">[ thread ]</a>
121 <a href="subject.html#44">[ subject ]</a>
122 <a href="author.html#44">[ author ]</a>
123 </LI>
124 </UL>
125
126 </body></html>