fixed codestyle
authorpk910 <philipp@zoelle1.de>
Mon, 7 Jan 2013 20:58:48 +0000 (21:58 +0100)
committerpk910 <philipp@zoelle1.de>
Mon, 7 Jan 2013 20:58:48 +0000 (21:58 +0100)
src/mod-hostserv.c

index a652043519c83565eb9ad0b22d53ab89eee6fa96..84094d2b76f6ca47d7e9456047eb3f6ca877d176 100644 (file)
@@ -29,7 +29,7 @@
  *         "manager_can_del_toplevel" "0"; //managers of a toplevel group may delete the whole group
  *         "manager_can_rename_secondlevel" "0"; //managers of a secondlevel group may rename the whole group
  *         "manager_can_del_secondlevel" "0"; //managers of a secondlevel group may delete the whole group
- *                "manager_toplevel_can_oset" "0"; //managers of a toplevel group can set other user's fakehosts
+ *           "manager_toplevel_can_oset" "0"; //managers of a toplevel group can set other user's fakehosts
  *         "manager_secondlevel_can_oset" "0"; //managers of a secondlevel group can set other user's fakehosts
  *     };
  *  };
@@ -1167,7 +1167,7 @@ static MODCMD_FUNC(cmd_unassign) {
 static MODCMD_FUNC(cmd_oset) {
     struct handle_info *hi;
     char *fakehost;
-       struct hs_assignment *assignment;
+    struct hs_assignment *assignment;
     if(!strchr(argv[1], '.')) {
         if (!(hi = modcmd_get_handle_info(user, argv[1])))
             return 0;
@@ -1181,16 +1181,16 @@ static MODCMD_FUNC(cmd_oset) {
         reply("NSMSG_MUST_AUTH");
         return 0;
     }
-       struct hs_user *hs_user = hs_get_user(hi, 1);
-       if(!strcmp(argv[1], "*")) {
-               if(!check_management_access(user->handle_info, NULL, NULL)) {
+    struct hs_user *hs_user = hs_get_user(hi, 1);
+    if(!strcmp(argv[1], "*")) {
+        if(!check_management_access(user->handle_info, NULL, NULL)) {
             reply("HSMSG_ACCESS_DENIED");
             return 0;
         }
         hs_activate_assignment(hs_user, NULL);
         return 1;
     } else {
-           struct hs_fakehost_info fhinfo = parse_fakehost_info(fakehost, 1);
+        struct hs_fakehost_info fhinfo = parse_fakehost_info(fakehost, 1);
         if(fhinfo.parse_state == HS_FHPARSE_INVALID) {
             reply("HSMSG_TOPLEVEL_INVALID", fakehost);
             return 0;
@@ -1202,8 +1202,8 @@ static MODCMD_FUNC(cmd_oset) {
             reply("HSMSG_ACCESS_DENIED");
             return 0;
         }
-               struct hs_toplevel *tlfh;
-               struct hs_secondlevel *slfh;
+        struct hs_toplevel *tlfh;
+        struct hs_secondlevel *slfh;
         for(assignment = hs_user->assignments; assignment; assignment = assignment->unext) {
             slfh = assignment->secondlevel;
             tlfh = slfh->toplevel;
@@ -1215,7 +1215,7 @@ static MODCMD_FUNC(cmd_oset) {
         }
         reply("HSMSG_UNKNOWN_FAKEHOST", fhinfo.slfh_name, fhinfo.tlfh_name);
         return 0;
-       }
+    }
 }
 
 static void hostserv_conf_read(void) {
@@ -1255,10 +1255,10 @@ static void hostserv_conf_read(void) {
     
     str = database_get_data(conf_node, "manager_can_rename_secondlevel", RECDB_QSTRING);
     hostserv_conf.manager_can_rename_secondlevel = (atoi(str) ? 1 : 0);
-       
-       str = database_get_data(conf_node, "manager_toplevel_can_oset", RECDB_QSTRING);
+    
+    str = database_get_data(conf_node, "manager_toplevel_can_oset", RECDB_QSTRING);
     hostserv_conf.manager_toplevel_can_oset = (atoi(str) ? 1 : 0);
-       
+    
     str = database_get_data(conf_node, "manager_secondlevel_can_oset", RECDB_QSTRING);
     hostserv_conf.manager_secondlevel_can_oset = (atoi(str) ? 1 : 0);
 }