openbsd-ports/audio/opennap/patches/patch-ping_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

34 lines
760 B
Plaintext

$OpenBSD: patch-ping_c,v 1.1 2002/08/10 01:14:04 naddy Exp $
--- ping.c.orig Tue Mar 6 00:49:53 2001
+++ ping.c Wed Oct 17 13:19:27 2001
@@ -39,11 +39,29 @@ HANDLER (ping)
return;
}
+ if (gBlockWinMX > 0 && user != orig)
+ {
+ if (tag == MSG_CLIENT_PING)
+ user->wantPong++;
+ else if (orig->wantPong == 0)
+ {
+ if (orig->level < LEVEL_MODERATOR)
+ {
+ discipline_user (orig);
+ return;
+ }
+ }
+ else
+ orig->wantPong--;
+ }
+
if (ISUSER (user->con))
{
if (!is_ignoring (user->con->uopt->ignore, orig->nick))
+ {
send_cmd (user->con, tag, "%s%s%s", orig->nick, pkt ? " " : "",
NONULL (pkt));
+ }
else
send_user (orig, MSG_SERVER_NOSUCH, "%s is ignoring you",
user->nick);