]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2005/003135.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2005 / 003135.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] Introduced module's Psuedoclient is invalid
5 user.
6 </TITLE>
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">
13 </HEAD>
14 <BODY BGCOLOR="#ffffff">
15 <H1>[IRCServices Coding] Introduced module's Psuedoclient is invalid
16 user.</H1>
17 <B>Robin Burchell</B>
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
21 </A><BR>
22 <I>Mon Aug 15 04:28:48 PDT 2005</I>
23 <P><UL>
24 <LI>Previous message: <A HREF="003134.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
25 user.
26 </A></li>
27 <LI>Next message: <A HREF="003136.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
28 user.
29 </A></li>
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>
35 </LI>
36 </UL>
37 <HR>
38 <!--beginarticle-->
39 <PRE>Aha - let me guess, you're working on a botserv? ;)
40
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
46 ended up thinking.
47
48 Olly wrote:
49 &gt;<i> Hi
50 </I>&gt;<i> I seem to have screwed up somewhere, but can't see where.
51 </I>&gt;<i> I have stolen module code, from a module coded by ChatSpike.net (Thanks
52 </I>&gt;<i> Brain and the crew) and have modified it a little.
53 </I>&gt;<i> The problem is when I try to discover what the psuedoclient's channel
54 </I>&gt;<i> status is. All I get in the debug logs is a request has been made for an
55 </I>&gt;<i> &quot;invalid user&quot;. If I attempt to discover any info using any of the
56 </I>&gt;<i> call-backs, I either get a seg fault or no reply. I imagine this is due
57 </I>&gt;<i> to the pseudoclient's Nick not having any valid user. The kind of info I
58 </I>&gt;<i> am after is whether the Psuedoclient is opped in any particular channel,
59 </I>&gt;<i> or if it has been kicked. None of the call-backs will give me any of
60 </I>&gt;<i> this info, and direct use of the standard APIs like:
61 </I>&gt;<i>
62 </I>&gt;<i> is_chanop(User *user, const char *chan)
63 </I>&gt;<i>
64 </I>&gt;<i> causes a crash because get_user(PsuedoclientNick) returns NULL I expect.
65 </I>&gt;<i>
66 </I>&gt;<i> I even attempted to add a custom is_chanop routine to the module which
67 </I>&gt;<i> searched using just the nick but then
68 </I>&gt;<i>
69 </I>&gt;<i> LIST_SEARCH(c-&gt;users, user-&gt;nick, user-&gt;nick, irc_stricmp, cu);
70 </I>&gt;<i>
71 </I>&gt;<i> gave me a problem because it too requires a valid user to work with, and
72 </I>&gt;<i> all I can seem to provide is just a nick.
73 </I>&gt;<i>
74 </I>&gt;<i> do_intoduce appears to work correctly yet CS still alters the channel
75 </I>&gt;<i> status of the module's pseudoclient despite it's being a Services User.
76 </I>&gt;<i>
77 </I>&gt;<i> Here's the beginning code for do_introduce which is taken directly from
78 </I>&gt;<i> Chatspike's module.
79 </I>&gt;<i>
80 </I>&gt;<i> static int do_introduce(const char *nick)
81 </I>&gt;<i> {
82 </I>&gt;<i> ChannelInfo *ci;static int do_introduce(const char *nick)
83 </I>&gt;<i> char chan[1024];
84 </I>&gt;<i> FILE* f;
85 </I>&gt;<i> if (!nick || irc_stricmp(nick, s_ModuleNick) == 0) {
86 </I>&gt;<i> send_nick(s_IdleServ, ServiceUser, ServiceHost,
87 </I>&gt;<i> ServerName,
88 </I>&gt;<i> desc_IdleServ, pseudoclient_modes);
89 </I>&gt;<i> if (nick)
90 </I>&gt;<i> return 1;
91 </I>&gt;<i>
92 </I>&gt;<i> Any ideas/help appreciated.
93 </I>&gt;<i>
94 </I>&gt;<i> Thanks.
95 </I>&gt;<i>
96 </I>&gt;<i> Olly
97 </I>&gt;<i>
98 </I>&gt;<i>
99 </I>&gt;<i>
100 </I>&gt;<i>
101 </I>&gt;<i> ------------------------------------------------------------------------
102 </I>&gt;<i>
103 </I>&gt;<i> ------------------------------------------------------------------
104 </I>&gt;<i> To unsubscribe or change your subscription options, visit:
105 </I>&gt;<i> <A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
106 </I>
107 </PRE>
108
109
110 <!--endarticle-->
111 <HR>
112 <P><UL>
113 <!--threads-->
114 <LI>Previous message: <A HREF="003134.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
115 user.
116 </A></li>
117 <LI>Next message: <A HREF="003136.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
118 user.
119 </A></li>
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>
125 </LI>
126 </UL>
127
128 </body></html>