]>
Commit | Line | Data |
---|---|---|
3bd189cb JR |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
2 | <HTML> | |
3 | <HEAD> | |
4 | <TITLE> AW: Re: [IRCServices Coding] Associating NickGroupInfo with | |
5 | twonicksatonce | |
6 | </TITLE> | |
7 | <LINK REL="Index" HREF="index.html" > | |
8 | <LINK REL="made" HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=AW%3A%20Re%3A%20%5BIRCServices%20Coding%5D%20%20Associating%20NickGroupInfo%20with%0A%20twonicksatonce&In-Reply-To=200304252009.h3PK9pA25637%40localhost.localdomain"> | |
9 | <META NAME="robots" CONTENT="index,nofollow"> | |
10 | <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> | |
11 | <LINK REL="Previous" HREF="002025.html"> | |
12 | <LINK REL="Next" HREF="002027.html"> | |
13 | </HEAD> | |
14 | <BODY BGCOLOR="#ffffff"> | |
15 | <H1>AW: Re: [IRCServices Coding] Associating NickGroupInfo with | |
16 | twonicksatonce</H1> | |
17 | <B>Georges Berscheid</B> | |
18 | <A HREF="mailto:ircservices-coding%40ircservices.za.net?Subject=AW%3A%20Re%3A%20%5BIRCServices%20Coding%5D%20%20Associating%20NickGroupInfo%20with%0A%20twonicksatonce&In-Reply-To=200304252009.h3PK9pA25637%40localhost.localdomain" | |
19 | TITLE="AW: Re: [IRCServices Coding] Associating NickGroupInfo with | |
20 | twonicksatonce">georges at berscheid.lu | |
21 | </A><BR> | |
22 | <I>Sat Apr 26 02:54:37 PDT 2003</I> | |
23 | <P><UL> | |
24 | <LI>Previous message: <A HREF="002025.html">[IRCServices Coding] Associating NickGroupInfo with two | |
25 | nicksatonce | |
26 | </A></li> | |
27 | <LI>Next message: <A HREF="002027.html">[IRCServices Coding] feature suggestion... | |
28 | </A></li> | |
29 | <LI> <B>Messages sorted by:</B> | |
30 | <a href="date.html#2026">[ date ]</a> | |
31 | <a href="thread.html#2026">[ thread ]</a> | |
32 | <a href="subject.html#2026">[ subject ]</a> | |
33 | <a href="author.html#2026">[ author ]</a> | |
34 | </LI> | |
35 | </UL> | |
36 | <HR> | |
37 | <!--beginarticle--> | |
38 | <PRE>Hi, | |
39 | ||
40 | since services are a almost-regular server linked to your network, they | |
41 | know all of the network-relevant information, including /list. Just use | |
42 | ||
43 | Channel *chan; | |
44 | for(chan = first_channel(); chan; chan = next_channel()) { | |
45 | <your code> | |
46 | } | |
47 | ||
48 | to get a list of all channels. There are similar commands for users, | |
49 | registered channels, registered nicks etc. Note that chan->users is a | |
50 | linked list of all users currently in the channel. Refer to channels.h, | |
51 | users.h, modules/nickserv/nickserv.h and modules/chanserv/chanserv.h for | |
52 | more information on structs. | |
53 | ||
54 | I suggest you have a look at | |
55 | <A HREF="http://www.luxusbuerg.lu/data/ircservices-luxusbuerg.tgz">http://www.luxusbuerg.lu/data/ircservices-luxusbuerg.tgz</A> in | |
56 | modules/httpd/accesslist.c. This is an example of how to dynamically | |
57 | include the accesslist of all registered channels into a php-script. | |
58 | Another example is modules/httpd/banlist.c. | |
59 | modules/nickserv/dbsynch.c shows how we linked services to the mysql | |
60 | database. This could also be a possibility, to write all information you | |
61 | need in constant intervals into a mysql table which you can read with | |
62 | you php script anytime you want. Choose what fits your needs the best | |
63 | ;-) | |
64 | ||
65 | Georges | |
66 | ||
67 | ||
68 | -----Ursprüngliche Nachricht----- | |
69 | Von: <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">ircservices-coding-bounces at ircservices.za.net</A> | |
70 | [mailto:<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">ircservices-coding-bounces at ircservices.za.net</A>] Im Auftrag von | |
71 | Craig Edwards | |
72 | Gesendet: Freitag, 25. April 2003 23:01 | |
73 | An: IRC Services Coding Mailing List | |
74 | Betreff: Re: Re: [IRCServices Coding] Associating NickGroupInfo with | |
75 | twonicksatonce | |
76 | ||
77 | ||
78 | Good idea. We're taking the opposite route, only allowing users to | |
79 | register on irc. We believe that on our network, given the option to | |
80 | register on the website would create a whole bunch of pointless | |
81 | never-used nicks that are just used by clueless web users who have no | |
82 | idea what theyre doing with irc ;-) | |
83 | ||
84 | We're using our service to fetch certain information that is particular | |
85 | to the ircd and not services, e.g. output of /list, etc, so if there was | |
86 | a way to output this too -- i noticed chanserv only keeps a linked list | |
87 | of *registered* channels, which is the reverse of how our modified | |
88 | statserv works :) | |
89 | ||
90 | Anyhow, have fun, | |
91 | Brain :-) | |
92 | ||
93 | ><i>Hi, | |
94 | </I>><i> | |
95 | </I>><i>we disabled all /ns {register|drop|link} etc. commands in services and | |
96 | </I>><i>force our users to register their nicknames via a web-interface (90 of | |
97 | </I>><i>our users use a java-web-interface to chat anyway). Services have a | |
98 | </I>><i>module that connects to the MySQL database and retrieves information | |
99 | </I>><i>from there, without needing any interaction of bots with services. | |
100 | </I>><i>To retrieve services-internal information, we use http-modules which | |
101 | </I>><i>output simple PHP-scripts that can be included using <?php | |
102 | </I>><i>include("<A HREF="http://your.services.host/moduleurl"">http://your.services.host/moduleurl"</A>) ?> Again, you won't need | |
103 | </I> | |
104 | ><i>a bot that connects to your network, use any (possibly exploitable) | |
105 | </I>><i>commands and parse the output. | |
106 | </I>><i> | |
107 | </I>><i>Georges | |
108 | </I>><i> | |
109 | </I>><i> | |
110 | </I>><i> | |
111 | </I>><i>Craig McLure wrote: | |
112 | </I>><i> | |
113 | </I>>><i>Could you give any other suggestions on how this could be done? I'll | |
114 | </I>go into a few details on what is trying to be accomplished... | |
115 | >><i> | |
116 | </I>>><i>For years now, people have been acking for use of MySQL databases, so | |
117 | </I>that they can have "Web Interfaces" to services, basically, we are | |
118 | creating a module that allows this "su" type command, which will allow | |
119 | use of the command from specific hosts to gain information on nicknames, | |
120 | then parse them into HTML, and be able to display on a website.. it | |
121 | would also be allowed to change some settings on the nickname (example, | |
122 | access lists, passwords) without having to talk to the service itself. | |
123 | >><i> | |
124 | </I>>><i>Theres an alpha running at <A HREF="http://www.chatspike.net/?page=ircadmin">http://www.chatspike.net/?page=ircadmin</A> | |
125 | </I>>><i>Currently, you need to have a registered nickname on irc.chatspike.net | |
126 | </I>to use it.. If you wanna try exploiting it in some way.. feel free :p | |
127 | >><i> | |
128 | </I>>><i>So yeah, any other solutions would be great :) | |
129 | </I>>><i> | |
130 | </I>>><i>---------------------------------------------------------------------- | |
131 | </I>- | |
132 | >><i>Craig McLure - <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">Craig at chatspike.net</A> | |
133 | </I>>><i>ChatSpike - The users network: <A HREF="http://www.chatspike.net">http://www.chatspike.net</A> | |
134 | </I>>><i>InspIRCd - Modular IRC server: <A HREF="http://www.inspircd.org">http://www.inspircd.org</A> | |
135 | </I>>><i><`RaSh> how do i install linux i got the cd and i dont see the | |
136 | </I>setup.exe or install.exe | |
137 | >><i>---------------------------------------------------------------------- | |
138 | </I>- | |
139 | >><i> | |
140 | </I>>><i>============ Original Message ============ | |
141 | </I>>>><i>From : "Andrew Church" <<A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A>> | |
142 | </I>>><i> | |
143 | </I>>><i> | |
144 | </I>>>><i>Reply-To : <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">ircservices-coding at ircservices.za.net</A> | |
145 | </I>>>><i>To : <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">ircservices-coding at ircservices.za.net</A> | |
146 | </I>>>><i>Subject : Re: [IRCServices Coding] Associating NickGroupInfo with | |
147 | </I>two nicks atonce | |
148 | >>><i>Date : 2003-04-23 | |
149 | </I>>>><i> | |
150 | </I>>>><i> | |
151 | </I>>>><i> The code currently assumes that at most one user will be | |
152 | </I>associated | |
153 | >>><i>with any particular nickname, that NickInfo.user will point at the | |
154 | </I>user | |
155 | >>><i>with nickname NickInfo.nick, that User.ni will point at the NickInfo | |
156 | </I>with | |
157 | >>><i>nickname User.nick (or NULL if the nickname is not registered), and | |
158 | </I>that | |
159 | >>><i>User.ngi will point to a nickname group containing User.ni (or NULL | |
160 | </I>or | |
161 | >>><i>NICKGROUPINFO_INVALID). Breaking any of these assumptions will | |
162 | </I>probably | |
163 | >>><i>cause many weird and dangerous things to happen. | |
164 | </I>>>><i> | |
165 | </I>>>><i> Note that two or more users can be associated with a single nick | |
166 | </I>group | |
167 | >>><i>(if, for example, someone has two clients open and using two linked | |
168 | </I>nicks). | |
169 | >>><i>However, if the user's nick is not in NickGroupInfo.nicks[], things | |
170 | </I>will | |
171 | >>><i>probably break. | |
172 | </I>>>><i> | |
173 | </I>>>><i> I'd strongly suggest finding another way to accomplish whatever | |
174 | </I>you're | |
175 | >>><i>trying to do without an "su"-like command. | |
176 | </I>>>><i> | |
177 | </I>>>><i> --Andrew Church | |
178 | </I>>>><i> <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org</A> | |
179 | </I>>>><i> <A HREF="http://achurch.org/">http://achurch.org/</A> | |
180 | </I>>>><i> | |
181 | </I>>>><i> | |
182 | </I>>>><i> | |
183 | </I>>>>><i>Hi, we're writing a module which allows a web interface to "su" to a | |
184 | </I>nickname, similar to the way the unix "su" command (dont ask! :)) heres | |
185 | how it works: | |
186 | >>>><i> | |
187 | </I>>>>><i>basically, /msg somepseudoclient su <nick> <pass> | |
188 | </I>>>>><i> | |
189 | </I>>>>><i>..and you gain the privilages of that nick, wether or not they are | |
190 | </I>using it at the time. What we're doing at the moment is associating the | |
191 | user's ngi and ni fields with the nickgroupinfo of the registered | |
192 | nickname, e.g. | |
193 | >>>><i> | |
194 | </I>>>>><i>NickInfo* MyNickInf = get_nickinfo(somenick); | |
195 | </I>>>>><i>NickGroupInfo* MyNGroupInf = get_ngi(MyNickInf); | |
196 | </I>>>>><i> | |
197 | </I>>>>><i>u->ngi = MyNGroupInf; | |
198 | </I>>>>><i>u->ni = MyNickInf; | |
199 | </I>>>>><i>/* user u is now logged in with privilages of "ngi" nick, send +r as | |
200 | </I>a raw if neccessary */ | |
201 | >>>><i> | |
202 | </I>>>>><i>sorry for any errors in this code, im typing it off the top of my | |
203 | </I>head. | |
204 | >>>><i>Basically, the problem we have is, that only one nick can have | |
205 | </I>"ownership" of a groupinfo at any one time, if we associate user 'u' | |
206 | with MyNGroupInf, then if some other user online at the time (lets call | |
207 | them u2) has this same association (u2->ngi == MyNG | |
208 | >>>><i>roupInf) than u2 is logged out (and has to re-identify using /msg | |
209 | </I>nickserv identify <pass>). Basically we cant give two people ownership | |
210 | of the same nickgroup at the same time. Is there any way we can get | |
211 | around this, e.g. by memcpy'ing the NickGroupInfo? | |
212 | >>>><i>The ownership of the nick by the second user only needs to be | |
213 | </I>temporary, until disconnect, so there shouldnt be any corruption of | |
214 | services DB's by having two people pointing at the same nickgroup in the | |
215 | file, or anything as weird as that :) | |
216 | >>>><i> | |
217 | </I>>>>><i>If theres any way to solve this problem simply, without needing andy | |
218 | </I>to rewrite the core, or for us to approach the problem a different way, | |
219 | we'd be grateful of anyone could tell us how :) | |
220 | >>>><i> | |
221 | </I>>>>><i>Thanks, | |
222 | </I>>>>><i>Brain | |
223 | </I>>>>><i>ChatSpike Services-dev | |
224 | </I>>>>><i> | |
225 | </I>>>>><i> | |
226 | </I>>>>><i> | |
227 | </I>>>>><i>------------------------------------------------------------------ | |
228 | </I>>>>><i> | |
229 | </I>>>>><i> | |
230 | </I>>>><i>------------------------------------------------------------------ | |
231 | </I>>>><i>To unsubscribe or change your subscription options, visit: | |
232 | </I>>>><i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A> | |
233 | </I>>>><i>. | |
234 | </I>>>><i> | |
235 | </I>>>><i> | |
236 | </I>>><i>========= End of Original Message ========= | |
237 | </I>>><i> | |
238 | </I>>><i> | |
239 | </I>>><i> | |
240 | </I>>><i>------------------------------------------------------------------ | |
241 | </I>>><i>To unsubscribe or change your subscription options, visit: | |
242 | </I>>><i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A> | |
243 | </I>>><i> | |
244 | </I>>><i> | |
245 | </I>>><i> | |
246 | </I>>><i> | |
247 | </I>><i> | |
248 | </I>><i> | |
249 | </I>><i> | |
250 | </I>><i>------------------------------------------------------------------ | |
251 | </I>><i>To unsubscribe or change your subscription options, visit: | |
252 | </I>><i><A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A> | |
253 | </I> | |
254 | ||
255 | ------------------------------------------------------------------ | |
256 | To unsubscribe or change your subscription options, visit: | |
257 | <A HREF="http://www.ircservices.za.net/mailman/listinfo/ircservices-coding">http://www.ircservices.za.net/mailman/listinfo/ircservices-coding</A> | |
258 | ||
259 | ||
260 | ||
261 | ||
262 | </PRE> | |
263 | ||
264 | <!--endarticle--> | |
265 | <HR> | |
266 | <P><UL> | |
267 | <!--threads--> | |
268 | <LI>Previous message: <A HREF="002025.html">[IRCServices Coding] Associating NickGroupInfo with two | |
269 | nicksatonce | |
270 | </A></li> | |
271 | <LI>Next message: <A HREF="002027.html">[IRCServices Coding] feature suggestion... | |
272 | </A></li> | |
273 | <LI> <B>Messages sorted by:</B> | |
274 | <a href="date.html#2026">[ date ]</a> | |
275 | <a href="thread.html#2026">[ thread ]</a> | |
276 | <a href="subject.html#2026">[ subject ]</a> | |
277 | <a href="author.html#2026">[ author ]</a> | |
278 | </LI> | |
279 | </UL> | |
280 | ||
281 | </body></html> |