[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: irc2.10.3: /msg to (non-existent) !channel



Thomas Kuiper wrote:
> 
> This message stuff is messed up a bit on other locations as well.
> For example if you try to message a channel which doesn't exist as
> oper:
> 
> /MSG #foobars hello
> *** #foobars : No toplevel domain specified

You'll also find that a notice returns a similar error, e.g.

/NOTICE #something BLAH!
#something No toplevel domain specified

/NOTICE $server.n?t BLAH!
$server.n?t Wildcard in toplevel Domain

But according to the RFC:

      The NOTICE command is used similarly to PRIVMSG.  The difference
   between NOTICE and PRIVMSG is that automatic replies MUST NEVER be
   sent in response to a NOTICE message.  This rule applies to servers
   too - they MUST NOT send any error reply back to the client on
   receipt of a notice.  The object of this rule is to avoid loops
   between clients automatically sending something in response to some¡
   thing it received.

If this is deemed a breach of the RFC (it looks that way to me), then
the following small diff will fix it.

Wull@IRCnet
--- s_user.c	Sat Jul 17 12:47:50 1999
+++ s_user.c.new	Tue Sep 14 05:56:20 1999
@@ -1163,8 +1163,9 @@
 		    {
 			if (!(s = (char *)rindex(nick, '.')))
 			    {
-				sendto_one(sptr, err_str(ERR_NOTOPLEVEL,
-					   parv[0]), nick);
+				if (!notice)
+				    sendto_one(sptr, err_str(ERR_NOTOPLEVEL,
+							parv[0]), nick);
 				continue;
 			    }
 			while (*++s)
@@ -1172,8 +1173,9 @@
 					break;
 			if (*s == '*' || *s == '?')
 			    {
-				sendto_one(sptr, err_str(ERR_WILDTOPLEVEL,
-					   parv[0]), nick);
+				if (!notice)
+				    sendto_one(sptr, err_str(ERR_WILDTOPLEVEL,
+							parv[0]), nick);
 				continue;
 			    }
 			sendto_match_butone(IsServer(cptr) ? cptr : NULL,