Просмотр исходного кода

* Users can no longer who PERM OWNERS unless they are themselves one.

svn: 1971
Bryan Drewery 21 лет назад
Родитель
Сommit
e89b3911cc
2 измененных файлов с 7 добавлено и 2 удалено
  1. 1 0
      doc/UPDATES
  2. 6 2
      src/flags.c

+ 1 - 0
doc/UPDATES

@@ -59,6 +59,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Fixed bot's not being able to link when the botnick case did not match (userlist vs binary -C).
 * Fixed colors still showing for characters ":@()<>" when colors were turned off.
 * Reverted patch from 1.2 which disabled removing duplicate msgs in server queue. (Fixes most queue/excess flood bugs)
+* Users can no longer who PERM OWNERS unless they are themselves one.
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 6 - 2
src/flags.c

@@ -544,9 +544,13 @@ whois_access(struct userrec *user, struct userrec *whois_user)
   get_user_flagrec(user, &fr, NULL);
   get_user_flagrec(whois_user, &whois, NULL);
 
-  if ((glob_master(whois) && !glob_master(fr)) ||
+  if (
+      (isowner(user->handle) && !isowner(user->handle)) ||
+      (glob_admin(whois) && !glob_admin(fr)) || 
       (glob_owner(whois) && !glob_owner(fr)) ||
-      (glob_admin(whois) && !glob_admin(fr)) || (glob_bot(whois) && !glob_master(fr)))
+      (glob_master(whois) && !glob_master(fr)) ||
+      (glob_bot(whois) && !glob_master(fr))
+     )
     return 0;
   return 1;
 }