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=43007C70.7060500%40gmail.com">
9 <META NAME=
"robots" CONTENT=
"index,nofollow">
10 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
11 <LINK REL=
"Previous" HREF=
"003140.html">
12 <LINK REL=
"Next" HREF=
"003141.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=43007C70.7060500%40gmail.com"
19 TITLE=
"[IRCServices Coding] Introduced module's Psuedoclient is invalid
20 user.">achurch at achurch.org
22 <I>Mon Aug
15 21:
36:
33 PDT
2005</I>
24 <LI>Previous message:
<A HREF=
"003140.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
27 <LI>Next message:
<A HREF=
"003141.html">[IRCServices Coding] channel modes bug report
29 <LI> <B>Messages sorted by:
</B>
30 <a href=
"date.html#3137">[ date ]
</a>
31 <a href=
"thread.html#3137">[ thread ]
</a>
32 <a href=
"subject.html#3137">[ subject ]
</a>
33 <a href=
"author.html#3137">[ author ]
</a>
38 <PRE> What you need to do in this case is keep track of the pseudoclients'
39 status yourself, like how the autokick code keeps track of which channels
40 ChanServ is in. The User structure is for users monitored by Services, not
44 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>
45 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
47 ><i>Aha - let me guess, you're working on a botserv? ;)
49 </I>><i>Alas, it's not that simple, Services doesn't know about users on their
50 </I>><i>own server (chanserv, nickserv and any other pseudoclients). So really,
51 </I>><i>there isn't a way to accomplish this, at least, not easily that we've
52 </I>><i>been able to think of yet. (myself craig, and brain did some
53 </I>><i>brainstorming on this a while back (last year?), can't remember what we
54 </I>><i>ended up thinking.
56 </I>><i>Olly wrote:
58 </I>>><i> I seem to have screwed up somewhere, but can't see where.
59 </I>>><i> I have stolen module code, from a module coded by ChatSpike.net (Thanks
60 </I>>><i> Brain and the crew) and have modified it a little.
61 </I>>><i> The problem is when I try to discover what the psuedoclient's channel
62 </I>>><i> status is. All I get in the debug logs is a request has been made for an
63 </I>>><i> "invalid user
". If I attempt to discover any info using any of the
64 </I>>><i> call-backs, I either get a seg fault or no reply. I imagine this is due
65 </I>>><i> to the pseudoclient's Nick not having any valid user. The kind of info I
66 </I>>><i> am after is whether the Psuedoclient is opped in any particular channel,
67 </I>>><i> or if it has been kicked. None of the call-backs will give me any of
68 </I>>><i> this info, and direct use of the standard APIs like:
70 </I>>><i> is_chanop(User *user, const char *chan)
72 </I>>><i> causes a crash because get_user(PsuedoclientNick) returns NULL I expect.
74 </I>>><i> I even attempted to add a custom is_chanop routine to the module which
75 </I>>><i> searched using just the nick but then
77 </I>>><i> LIST_SEARCH(c-
>users, user-
>nick, user-
>nick, irc_stricmp, cu);
79 </I>>><i> gave me a problem because it too requires a valid user to work with, and
80 </I>>><i> all I can seem to provide is just a nick.
82 </I>>><i> do_intoduce appears to work correctly yet CS still alters the channel
83 </I>>><i> status of the module's pseudoclient despite it's being a Services User.
85 </I>>><i> Here's the beginning code for do_introduce which is taken directly from
86 </I>>><i> Chatspike's module.
88 </I>>><i> static int do_introduce(const char *nick)
90 </I>>><i> ChannelInfo *ci;static int do_introduce(const char *nick)
91 </I>>><i> char chan[
1024];
92 </I>>><i> FILE* f;
93 </I>>><i> if (!nick || irc_stricmp(nick, s_ModuleNick) ==
0) {
94 </I>>><i> send_nick(s_IdleServ, ServiceUser, ServiceHost,
95 </I>>><i> ServerName,
96 </I>>><i> desc_IdleServ, pseudoclient_modes);
97 </I>>><i> if (nick)
98 </I>>><i> return
1;
100 </I>>><i> Any ideas/help appreciated.
102 </I>>><i> Thanks.
109 </I>>><i> ------------------------------------------------------------------------
111 </I>>><i> ------------------------------------------------------------------
112 </I>>><i> To unsubscribe or change your subscription options, visit:
113 </I>>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
115 </I>><i>------------------------------------------------------------------
116 </I>><i>To unsubscribe or change your subscription options, visit:
117 </I>><i><A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
128 <LI>Previous message:
<A HREF=
"003140.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
131 <LI>Next message:
<A HREF=
"003141.html">[IRCServices Coding] channel modes bug report
133 <LI> <B>Messages sorted by:
</B>
134 <a href=
"date.html#3137">[ date ]
</a>
135 <a href=
"thread.html#3137">[ thread ]
</a>
136 <a href=
"subject.html#3137">[ subject ]
</a>
137 <a href=
"author.html#3137">[ author ]
</a>