1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding] Introduced module's Psuedoclient is invalid
7 <LINK REL=
"Index" HREF=
"index.html" >
8 <LINK REL=
"made" HREF=
"mailto:ircservices-coding%40ircservices.esper.net?Subject=%5BIRCServices%20Coding%5D%20Introduced%20module%27s%20Psuedoclient%20is%20invalid%0A%09user.&In-Reply-To=22d5e19ab79e104e913cd28c8ac30583%40avansys.co.uk">
9 <META NAME=
"robots" CONTENT=
"index,nofollow">
10 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
11 <LINK REL=
"Previous" HREF=
"003134.html">
12 <LINK REL=
"Next" HREF=
"003136.html">
14 <BODY BGCOLOR=
"#ffffff">
15 <H1>[IRCServices Coding] Introduced module's Psuedoclient is invalid
18 <A HREF=
"mailto:ircservices-coding%40ircservices.esper.net?Subject=%5BIRCServices%20Coding%5D%20Introduced%20module%27s%20Psuedoclient%20is%20invalid%0A%09user.&In-Reply-To=22d5e19ab79e104e913cd28c8ac30583%40avansys.co.uk"
19 TITLE=
"[IRCServices Coding] Introduced module's Psuedoclient is invalid
20 user.">surreal.w00t at gmail.com
22 <I>Mon Aug
15 04:
28:
48 PDT
2005</I>
24 <LI>Previous message:
<A HREF=
"003134.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
27 <LI>Next message:
<A HREF=
"003136.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
30 <LI> <B>Messages sorted by:
</B>
31 <a href=
"date.html#3135">[ date ]
</a>
32 <a href=
"thread.html#3135">[ thread ]
</a>
33 <a href=
"subject.html#3135">[ subject ]
</a>
34 <a href=
"author.html#3135">[ author ]
</a>
39 <PRE>Aha - let me guess, you're working on a botserv? ;)
41 Alas, it's not that simple, Services doesn't know about users on their
42 own server (chanserv, nickserv and any other pseudoclients). So really,
43 there isn't a way to accomplish this, at least, not easily that we've
44 been able to think of yet. (myself craig, and brain did some
45 brainstorming on this a while back (last year?), can't remember what we
50 </I>><i> I seem to have screwed up somewhere, but can't see where.
51 </I>><i> I have stolen module code, from a module coded by ChatSpike.net (Thanks
52 </I>><i> Brain and the crew) and have modified it a little.
53 </I>><i> The problem is when I try to discover what the psuedoclient's channel
54 </I>><i> status is. All I get in the debug logs is a request has been made for an
55 </I>><i> "invalid user
". If I attempt to discover any info using any of the
56 </I>><i> call-backs, I either get a seg fault or no reply. I imagine this is due
57 </I>><i> to the pseudoclient's Nick not having any valid user. The kind of info I
58 </I>><i> am after is whether the Psuedoclient is opped in any particular channel,
59 </I>><i> or if it has been kicked. None of the call-backs will give me any of
60 </I>><i> this info, and direct use of the standard APIs like:
62 </I>><i> is_chanop(User *user, const char *chan)
64 </I>><i> causes a crash because get_user(PsuedoclientNick) returns NULL I expect.
66 </I>><i> I even attempted to add a custom is_chanop routine to the module which
67 </I>><i> searched using just the nick but then
69 </I>><i> LIST_SEARCH(c-
>users, user-
>nick, user-
>nick, irc_stricmp, cu);
71 </I>><i> gave me a problem because it too requires a valid user to work with, and
72 </I>><i> all I can seem to provide is just a nick.
74 </I>><i> do_intoduce appears to work correctly yet CS still alters the channel
75 </I>><i> status of the module's pseudoclient despite it's being a Services User.
77 </I>><i> Here's the beginning code for do_introduce which is taken directly from
78 </I>><i> Chatspike's module.
80 </I>><i> static int do_introduce(const char *nick)
82 </I>><i> ChannelInfo *ci;static int do_introduce(const char *nick)
83 </I>><i> char chan[
1024];
85 </I>><i> if (!nick || irc_stricmp(nick, s_ModuleNick) ==
0) {
86 </I>><i> send_nick(s_IdleServ, ServiceUser, ServiceHost,
87 </I>><i> ServerName,
88 </I>><i> desc_IdleServ, pseudoclient_modes);
92 </I>><i> Any ideas/help appreciated.
101 </I>><i> ------------------------------------------------------------------------
103 </I>><i> ------------------------------------------------------------------
104 </I>><i> To unsubscribe or change your subscription options, visit:
105 </I>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
114 <LI>Previous message:
<A HREF=
"003134.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
117 <LI>Next message:
<A HREF=
"003136.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
120 <LI> <B>Messages sorted by:
</B>
121 <a href=
"date.html#3135">[ date ]
</a>
122 <a href=
"thread.html#3135">[ thread ]
</a>
123 <a href=
"subject.html#3135">[ subject ]
</a>
124 <a href=
"author.html#3135">[ author ]
</a>