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

* Fixed chattr +pj issue

svn: 1008
Bryan Drewery 22 лет назад
Родитель
Сommit
a5f9fc6eec
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 0
      doc/UPDATES
  2. 3 4
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -5,6 +5,7 @@ This is a summary of ChangeLog basically.
 1.Fixed cosmetic error in help:decrypt.
 2.Fixed a chmod() problem when the config was missing.
 3.Fixed config file not saving/recognizing IPV6 ip.
+4.Fixed problem with cmd_chattr +pj
 
 1.1.7
 

+ 3 - 4
src/cmds.c

@@ -2448,8 +2448,6 @@ static void cmd_chattr(struct userrec *u, int idx, char *par)
   		     mns = {0, 0, 0},
 		     user = {0, 0, 0},
 		     ouser = {0, 0, 0};
-  /*int fl = -1, of = 0, ocf = 0;*/
-/* FIXME: fl WAS -1 */
   flag_t of = 0, ocf = 0;
 
   if (!par[0]) {
@@ -2530,7 +2528,6 @@ static void cmd_chattr(struct userrec *u, int idx, char *par)
         free(tmpchg);
       return;
     }
-/* FIXME: POSSIBLY WRONG BECAUSE OF SIGNNES CHANGE OF fl */
   user.match &= -1;
 
   if (chg) {
@@ -2546,7 +2543,9 @@ static void cmd_chattr(struct userrec *u, int idx, char *par)
     }
     
     /* strip out +p without +i or +j */
-    if (((pls.global & USER_PARTY) && !(pls.global & USER_CHUBA) && !(pls.global & USER_HUBA)) && (!glob_huba(ouser) && !glob_chuba(ouser))) {
+    if ((pls.global & USER_PARTY) && 
+        (!((pls.global & USER_CHUBA) || (pls.global & USER_HUBA)) || 
+          !(glob_huba(ouser) || glob_chuba(ouser)))) {
       dprintf(idx, "Global flag +p requires either chathub or hub access first.\n");
       pls.global &= ~USER_PARTY;
     }