Bugs in m_nocodes

These are old archives. They are kept for historic purposes only.
Post Reply
Chris233

Bugs in m_nocodes

Post by Chris233 » Tue Oct 26, 2004 1:31 am

Unreal3.2.1. with m_nocodes module loaded..

A) when +c and +f [5t#b]:2 (for example) are set in a channel, flooding with messages with only b/u/r codes in them WILL get you kicked, but no one else will see them. When the messages contain color codes, no one sees them still, but you are NOT kicked.

B) What is sent back when a message containing only b/u/r codes is blocked does not match the one received when a message with a color code is sent:

Code: Select all

-> frontier.surrealchat.net PRIVMSG #test3 :4hi
<- :frontier.surrealchat.net 404 Alucard #test3 :Color is not permitted in this channel (#test3)
-> frontier.surrealchat.net PRIVMSG #test3 :hi
<- :frontier.surrealchat.net 404 Alucard Alucard :Control codes (bold/underline/reverse) are not permitted in this channel (#test3)
See the difference? The second "Alucard" in that last line should probably be replaced with the name of the channel.

A friend of mine modified the module to fix this.. here's the output of running the diff command:

Code: Select all

--- m_nocodes.c~	2004-10-25 21:07:58.000000000 -0400
+++ m_nocodes.c	2004-10-03 17:27:47.000000000 -0400
@@ -78,7 +78,7 @@ static char retbuf[4096];
 		if (strchr(text, '\002') || strchr(text, '\037') || strchr(text, '\026'))
 		{
 			sendto_one(sptr, err_str(ERR_CANNOTSENDTOCHAN),
-				me.name, sptr->name, sptr->name,
+				me.name, sptr->name, chptr->chname,
 				"Control codes (bold/underline/reverse) are not permitted in this channel",
 				chptr->chname);
 			return NULL;


Post Reply