]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2002/000088.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2002 / 000088.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] svcs5 - request
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20svcs5%20-%20request&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="000092.html">
11 <LINK REL="Next" HREF="000093.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] svcs5 - request</H1>
15 <B>Andrew Church</B>
16 <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20svcs5%20-%20request&In-Reply-To="
17 TITLE="[IRCServices Coding] svcs5 - request">achurch at achurch.org
18 </A><BR>
19 <I>Sun Jan 6 22:57:52 PST 2002</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="000092.html">[IRCServices Coding] newbee ircservices User
22 </A></li>
23 <LI>Next message: <A HREF="000093.html">[IRCServices Coding] Services 5.0 alpha 11 released
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#88">[ date ]</a>
27 <a href="thread.html#88">[ thread ]</a>
28 <a href="subject.html#88">[ subject ]</a>
29 <a href="author.html#88">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE> I'm planning to do this when I redo the database handling, but that
35 will be in a future version--the current design has settled too much for me
36 to want to redo it right now. As things stand now, such additions can
37 still be done--they just require a separate database. (Whether this is
38 more or less efficient than a structure of the kind described below is left
39 as an exercise for the reader.)
40
41 --Andrew Church
42 <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>
43 <A HREF="http://achurch.org/">http://achurch.org/</A>
44
45 &gt;<i> If you realy want other people to write useful modules, then it should b
46 </I>&gt;<i>e
47 </I>&gt;<i>possible for each module to extend the NickServ and ChanServ (and even th
48 </I>&gt;<i>e
49 </I>&gt;<i>others) databases. I suppose that having a:
50 </I>&gt;<i>
51 </I>&gt;<i>struct ext_list {
52 </I>&gt;<i> struct ext_list *prev, *next;
53 </I>&gt;<i> long id;
54 </I>&gt;<i> size_t size;
55 </I>&gt;<i> void *buf;
56 </I>&gt;<i>};
57 </I>&gt;<i>
58 </I>&gt;<i>that will form a list for each nickname/channel whould be what we need. I
59 </I>&gt;<i>t
60 </I>&gt;<i>should be easy to save it using the existing database format.
61 </I>&gt;<i>Also by providing some functions like:
62 </I>&gt;<i>
63 </I>&gt;<i>struct ext_list *get_extlist_memb(struct ext_list *head, long id);
64 </I>&gt;<i>
65 </I>&gt;<i>void update_extlist_memb(struct ext_list **head, long id, size_t size,
66 </I>&gt;<i> void *buf);
67 </I>&gt;<i>
68 </I>&gt;<i>/* and one for delete */
69 </I>&gt;<i>
70 </I>&gt;<i>it should be very easy to handle it.
71 </I>&gt;<i>
72 </I>&gt;<i>Each module will only need to have a fixed unique integer to use and it w
73 </I>&gt;<i>ill
74 </I>&gt;<i>need only one field to be added to struct NickInfo etc.. like:
75 </I>&gt;<i>
76 </I>&gt;<i>struct NickInfo {
77 </I>&gt;<i> ...
78 </I>&gt;<i> struct ext_list *head;
79 </I>&gt;<i>};
80 </I>&gt;<i>
81 </I>&gt;<i>and after that..
82 </I>&gt;<i>
83 </I>&gt;<i>/**********************************************/
84 </I>&gt;<i>
85 </I>&gt;<i>#define MY_ID 0x1234
86 </I>&gt;<i>
87 </I>&gt;<i> struct NickInfo *ni;
88 </I>&gt;<i> struct ext_list *el;
89 </I>&gt;<i>
90 </I>&gt;<i> ...code...
91 </I>&gt;<i>
92 </I>&gt;<i> update_extlist_memb( &amp;(ni-&gt;head), MY_ID, 7, &quot;RANDOM&quot; );
93 </I>&gt;<i>
94 </I>&gt;<i> ...code...
95 </I>&gt;<i>
96 </I>&gt;<i> el=get_extlist_memb(ni-&gt;head, MY_ID);
97 </I>&gt;<i>
98 </I>&gt;<i> /* and there we have el==NULL or el-&gt;buf == &quot;RANDOM&quot; */
99 </I>&gt;<i>
100 </I>&gt;<i>/**********************************************/
101 </I>&gt;<i>
102 </I>&gt;<i>Something like this whould *REALY* help to add functionality without chan
103 </I>&gt;<i>ging
104 </I>&gt;<i>existing code, without creating another database and will be compatible t
105 </I>&gt;<i>o
106 </I>&gt;<i>future versions.
107 </I>&gt;<i>
108 </I>&gt;<i>TIA
109 </I>&gt;<i>&lt;&lt;V13&gt;&gt;
110 </I>&gt;<i>------------------------------------------------------------------
111 </I>&gt;<i>To unsubscribe or change your subscription options, visit:
112 </I>&gt;<i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
113 </I>
114 </PRE>
115
116 <!--endarticle-->
117 <HR>
118 <P><UL>
119 <!--threads-->
120 <LI>Previous message: <A HREF="000092.html">[IRCServices Coding] newbee ircservices User
121 </A></li>
122 <LI>Next message: <A HREF="000093.html">[IRCServices Coding] Services 5.0 alpha 11 released
123 </A></li>
124 <LI> <B>Messages sorted by:</B>
125 <a href="date.html#88">[ date ]</a>
126 <a href="thread.html#88">[ thread ]</a>
127 <a href="subject.html#88">[ subject ]</a>
128 <a href="author.html#88">[ author ]</a>
129 </LI>
130 </UL>
131
132 </body></html>