ports/audio/opennap/patches/patch-privmsg_c

26 lines
689 B
Text

--- privmsg.c.orig Sat Sep 22 00:54:13 2001
+++ privmsg.c Tue Oct 16 23:02:48 2001
@@ -348,7 +348,7 @@ HANDLER (privmsg)
/* prevent DoS attack againt windows napster client */
if (len - (pkt - ptr) > 180)
{
- log_message ("privmsg(): truncated %d byte message from %s", len,
+ log_message ("privmsg: truncated %d byte message from %s", len,
sender->nick);
pkt[180] = 0;
}
@@ -385,6 +385,14 @@ HANDLER (privmsg)
if (!user)
{
nosuchuser (con);
+ return;
+ }
+
+ if (gBlockWinMX > 0 &&
+ !strncmp ("//WantQueue", pkt, sizeof("//WantQueue")-1))
+ {
+ if (sender->level < LEVEL_MODERATOR)
+ discipline_user (sender);
return;
}