]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices/2008/005653.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices / 2008 / 005653.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] ircservices 5.1.11 RFC 1459 protocol module broken?
5 </TITLE>
6 <LINK REL="Index" HREF="index.html" >
7 <LINK REL="made" HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20ircservices%205.1.11%20RFC%201459%20protocol%20module%20broken%3F&In-Reply-To=">
8 <META NAME="robots" CONTENT="index,nofollow">
9 <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
10 <LINK REL="Previous" HREF="005652.html">
11 <LINK REL="Next" HREF="005654.html">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] ircservices 5.1.11 RFC 1459 protocol module broken?</H1>
15 <B>Alexander Barton</B>
16 <A HREF="mailto:ircservices%40ircservices.za.net?Subject=%5BIRCServices%5D%20ircservices%205.1.11%20RFC%201459%20protocol%20module%20broken%3F&In-Reply-To="
17 TITLE="[IRCServices] ircservices 5.1.11 RFC 1459 protocol module broken?">alex at barton.de
18 </A><BR>
19 <I>Fri Nov 7 08:07:41 PST 2008</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="005652.html">[IRCServices] Happy Birthday
22 </A></li>
23 <LI>Next message: <A HREF="005654.html">[IRCServices] ircservices 5.1.11 RFC 1459 protocol module broken?
24 </A></li>
25 <LI> <B>Messages sorted by:</B>
26 <a href="date.html#5653">[ date ]</a>
27 <a href="thread.html#5653">[ thread ]</a>
28 <a href="subject.html#5653">[ subject ]</a>
29 <a href="author.html#5653">[ author ]</a>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>Hello!
35
36 I'm working on getting ngIRCd connected to the ircservices 5.1.11
37 package, at the moment I'm using the RFC 1459 protocol module and
38 enhanced ngIRCd to understand server and user registration according
39 to this older RFC.
40
41 Thereby I encountered a problem: ircservices all the time answered
42 with the following error message:
43
44 ----------&gt; cut here &lt;----------
45 debug: Received: :a.irc.net PASS srvPWD 0210-IRC+ ngircd|dev:CHLZ PZ
46 debug: Received: :a.irc.net SERVER a.irc.net 1 :A Server Info Text
47 debug: Received: NICK test :1
48 debug: Received: :test USER ~alex localhost a.irc.net :Alex
49 debug: Received: :test MODE test :+w
50 debug: user: MODE +w for nonexistent nick test from test: test +w
51 ----------&gt; cut here &lt;----------
52
53 &quot;nonexistent nick test&quot; ... hm!?
54
55 Digging through the source code of ircservices, I found the folowing
56 code in modules/protocol/rfc1459.c, line 42 ff.:
57
58 ----------&gt; cut here &lt;----------
59 static void m_user(char *source, int ac, char **av)
60 {
61 char *new_av[7];
62 if (ac != 5)
63 return;
64 ----------&gt; cut here &lt;----------
65
66 So this function checks if the USER command das 5(!) parameters. BUT:
67 according to RFC 1459 the USER command only has 4 parameters, see
68 section 4.1.3:
69
70 ----------&gt; cut here &lt;----------
71 4.1.3 User message
72
73 Command: USER
74 Parameters: &lt;username&gt; &lt;hostname&gt; &lt;servername&gt; &lt;realname&gt;
75
76 [...]
77 ----------&gt; cut here &lt;----------
78
79 So the above mentioned test in ircservices always silently failed.
80
81 Proposed patch:
82
83 ----------&gt; cut here &lt;----------
84 --- rfc1459.c.ORIG 2008-08-13 21:28:33.000000000 +0200
85 +++ rfc1459.c 2008-08-13 21:27:51.000000000 +0200
86 @@ -43,8 +43,11 @@ static void m_user(char *source, int ac,
87 {
88 char *new_av[7];
89
90 - if (ac != 5)
91 + if (ac != 4) {
92 + module_log_debug(1, &quot;USER message: wrong number of parameters&quot;
93 + &quot; (%d) for source `%s'&quot;, ac, source ?
94 source : &quot;?&quot;);
95 return;
96 + }
97 new_av[0] = source; /* Nickname */
98 new_av[1] = (char *)&quot;0&quot;; /* # of hops (was in NICK command... we
99 lose) */
100 new_av[2] = (char *)&quot;0&quot;; /* Timestamp */
101 ----------&gt; cut here &lt;----------
102
103 Can you tell me if I'm correct? Or do I overlook something?
104
105 And can you tell me which protocol module is the &quot;most advanced&quot; or
106 &quot;best&quot;?
107
108 Thanks a lot!
109 Alex
110 </PRE>
111
112
113
114
115 <!--endarticle-->
116 <HR>
117 <P><UL>
118 <!--threads-->
119 <LI>Previous message: <A HREF="005652.html">[IRCServices] Happy Birthday
120 </A></li>
121 <LI>Next message: <A HREF="005654.html">[IRCServices] ircservices 5.1.11 RFC 1459 protocol module broken?
122 </A></li>
123 <LI> <B>Messages sorted by:</B>
124 <a href="date.html#5653">[ date ]</a>
125 <a href="thread.html#5653">[ thread ]</a>
126 <a href="subject.html#5653">[ subject ]</a>
127 <a href="author.html#5653">[ author ]</a>
128 </LI>
129 </UL>
130
131 </body></html>