patch-browse_c 677 B

12345678910111213141516171819202122232425262728293031
  1. $OpenBSD: patch-browse_c,v 1.1 2002/08/10 01:14:04 naddy Exp $
  2. --- browse.c.orig Sat Sep 22 00:54:13 2001
  3. +++ browse.c Tue Oct 16 18:14:04 2001
  4. @@ -87,6 +87,12 @@ HANDLER (browse)
  5. }
  6. ASSERT (validate_user (user));
  7. + if (sender->level == LEVEL_LEECH)
  8. + {
  9. + send_user (sender, MSG_SERVER_BROWSE_END, "%s 0", nick);
  10. + return;
  11. + }
  12. +
  13. if (pkt)
  14. {
  15. result = atoi (pkt);
  16. @@ -349,6 +355,13 @@ HANDLER (browse_direct)
  17. if (!user)
  18. {
  19. nosuchuser (con);
  20. + return;
  21. + }
  22. +
  23. + if (sender->level == LEVEL_LEECH)
  24. + {
  25. + send_user(sender,MSG_SERVER_BROWSE_DIRECT_ERR,
  26. + "%s \"permission denied: you are a leech\"", user->nick);
  27. return;
  28. }