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

31 lines
677 B
Plaintext

$OpenBSD: patch-browse_c,v 1.1 2002/08/10 01:14:04 naddy Exp $
--- browse.c.orig Sat Sep 22 00:54:13 2001
+++ browse.c Tue Oct 16 18:14:04 2001
@@ -87,6 +87,12 @@ HANDLER (browse)
}
ASSERT (validate_user (user));
+ if (sender->level == LEVEL_LEECH)
+ {
+ send_user (sender, MSG_SERVER_BROWSE_END, "%s 0", nick);
+ return;
+ }
+
if (pkt)
{
result = atoi (pkt);
@@ -349,6 +355,13 @@ HANDLER (browse_direct)
if (!user)
{
nosuchuser (con);
+ return;
+ }
+
+ if (sender->level == LEVEL_LEECH)
+ {
+ send_user(sender,MSG_SERVER_BROWSE_DIRECT_ERR,
+ "%s \"permission denied: you are a leech\"", user->nick);
return;
}