]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2005/003134.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2005 / 003134.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=">
9 <META NAME="robots" CONTENT="index,nofollow">
10 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
11 <LINK REL="Previous" HREF="003133.html">
12 <LINK REL="Next" HREF="003135.html">
13 </HEAD>
14 <BODY BGCOLOR="#ffffff">
15 <H1>[IRCServices Coding] Introduced module's Psuedoclient is invalid
16 user.</H1>
17 <B>Olly</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="
19 TITLE="[IRCServices Coding] Introduced module's Psuedoclient is invalid
20 user.">olly at avansys.co.uk
21 </A><BR>
22 <I>Mon Aug 15 04:09:08 PDT 2005</I>
23 <P><UL>
24 <LI>Previous message: <A HREF="003133.html">[IRCServices Coding] cb_unset
25 </A></li>
26 <LI>Next message: <A HREF="003135.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
27 user.
28 </A></li>
29 <LI> <B>Messages sorted by:</B>
30 <a href="date.html#3134">[ date ]</a>
31 <a href="thread.html#3134">[ thread ]</a>
32 <a href="subject.html#3134">[ subject ]</a>
33 <a href="author.html#3134">[ author ]</a>
34 </LI>
35 </UL>
36 <HR>
37 <!--beginarticle-->
38 <PRE>Hi
39 I seem to have screwed up somewhere, but can't see where.
40 I have stolen module code, from a module coded by ChatSpike.net (Thanks
41 Brain and the crew) and have modified it a little.
42 The problem is when I try to discover what the psuedoclient's channel
43 status is. All I get in the debug logs is a request has been made for an
44 &quot;invalid user&quot;. If I attempt to discover any info using any of the
45 call-backs, I either get a seg fault or no reply. I imagine this is due
46 to the pseudoclient's Nick not having any valid user. The kind of info I
47 am after is whether the Psuedoclient is opped in any particular channel,
48 or if it has been kicked. None of the call-backs will give me any of
49 this info, and direct use of the standard APIs like:
50
51 is_chanop(User *user, const char *chan)
52
53 causes a crash because get_user(PsuedoclientNick) returns NULL I expect.
54
55 I even attempted to add a custom is_chanop routine to the module which
56 searched using just the nick but then
57
58 LIST_SEARCH(c-&gt;users, user-&gt;nick, user-&gt;nick, irc_stricmp, cu);
59
60 gave me a problem because it too requires a valid user to work with, and
61 all I can seem to provide is just a nick.
62
63 do_intoduce appears to work correctly yet CS still alters the channel
64 status of the module's pseudoclient despite it's being a Services User.
65
66 Here's the beginning code for do_introduce which is taken directly from
67 Chatspike's module.
68
69 static int do_introduce(const char *nick)
70 {
71 ChannelInfo *ci;static int do_introduce(const char *nick)
72 char chan[1024];
73 FILE* f;
74 if (!nick || irc_stricmp(nick, s_ModuleNick) == 0) {
75 send_nick(s_IdleServ, ServiceUser, ServiceHost,
76 ServerName,
77 desc_IdleServ, pseudoclient_modes);
78 if (nick)
79 return 1;
80
81 Any ideas/help appreciated.
82
83 Thanks.
84
85 Olly
86
87 -------------- next part --------------
88 A non-text attachment was scrubbed...
89 Name: Winmail.dat
90 Type: application/ms-tnef
91 Size: 5203 bytes
92 Desc: not available
93 Url : <A HREF="../attachments/20050815/d6f8ffa0/Winmail-0001.bin">../attachments/20050815/d6f8ffa0/Winmail-0001.bin</A>
94 </PRE>
95
96
97 <!--endarticle-->
98 <HR>
99 <P><UL>
100 <!--threads-->
101 <LI>Previous message: <A HREF="003133.html">[IRCServices Coding] cb_unset
102 </A></li>
103 <LI>Next message: <A HREF="003135.html">[IRCServices Coding] Introduced module's Psuedoclient is invalid
104 user.
105 </A></li>
106 <LI> <B>Messages sorted by:</B>
107 <a href="date.html#3134">[ date ]</a>
108 <a href="thread.html#3134">[ thread ]</a>
109 <a href="subject.html#3134">[ subject ]</a>
110 <a href="author.html#3134">[ author ]</a>
111 </LI>
112 </UL>
113
114 </body></html>