openbsd-ports/audio/opennap/patches/patch-privmsg_c
naddy c208dc5df3 Update to 0.44 with some patches from CVS.
Notable changes to the port:
- creates opennap user/group to run as
- tons of bugfixes, improved performance
- no longer hardcodes SYSCONFDIR to /etc/opennap

Submitted by Jolan Luff <jolan@pellaeon.com>.
2002-08-10 01:14:04 +00:00

28 lines
753 B
Plaintext

$OpenBSD: patch-privmsg_c,v 1.1 2002/08/10 01:14:04 naddy Exp $
--- 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;
}