Răsfoiți Sursa

* Apparently that -1 was needed :D

svn: 916
Bryan Drewery 22 ani în urmă
părinte
comite
247e8dbf11
3 a modificat fișierele cu 4 adăugiri și 5 ștergeri
  1. 1 1
      src/cmds.c
  2. 2 3
      src/flags.c
  3. 1 1
      src/flags.h

+ 1 - 1
src/cmds.c

@@ -2318,7 +2318,7 @@ static void cmd_chattr(struct userrec *u, int idx, char *par)
 		     user = {0, 0, 0, 0},
 		     ouser = {0, 0, 0, 0};
   /*int fl = -1, of = 0, ocf = 0;*/
-  flag_t fl = 0, of = 0, ocf = 0;
+  flag_t fl = -1, of = 0, ocf = 0;
 
   if (!par[0]) {
     dprintf(idx, "Usage: chattr <handle> [changes] [channel]\n");

+ 2 - 3
src/flags.c

@@ -145,8 +145,7 @@ void break_down_flags(const char *string, struct flag_record *plus, struct flag_
       if ((*string >= 'a') && (*string <= 'z')) {
 	switch (mode) {
 	case 0:
-	  which->global |=1 << (*string - 'a');
-
+	  which->global |= 1 << (*string - 'a');
 	  break;
 	case 1:
 	  which->chan |= 1 << (*string - 'a');
@@ -198,7 +197,7 @@ void break_down_flags(const char *string, struct flag_record *plus, struct flag_
   }
 }
 
-static int flag2str(char *string, int bot)
+static int flag2str(char *string, flag_t bot)
 {
   char x = 'a', *old = string;
 

+ 1 - 1
src/flags.h

@@ -13,7 +13,7 @@
 #define PRIV_VOICE 2
 
 
-typedef unsigned long flag_t;
+typedef long flag_t;
 
 struct flag_record {
   flag_t match;