fixed NULL pointer crash when returning to default fakehost
[srvx.git] / src / mod-hostserv.c
index 56ef7454225b69f830a7e323f8e5177b01c75ab8..291fac2dc60d61f3d73f66c9a5e13f344b13e0e4 100644 (file)
  *     "hostserv" {
  *         "nick" "HostServ";
  *         "modes" "+iok";
-           "toplevel_access" "600";
+ *         "toplevel_access" "600";
+ *         "fallback_other_assignment" "1"; //fall back to another assignment when active assignment gets removed
+ *         "manager_can_del_toplevel" "0"; //managers of a toplevel group may delete the whole group
+ *         "manager_can_del_secondlevel" "0"; //managers of a secondlevel group may delete the whole group
  *     };
  *  };
  *
@@ -339,7 +342,7 @@ static void hs_activate_assignment(struct hs_user *user, struct hs_assignment *a
     assert((!assignment || (assignment->user == user)));
     
     if(user->assignments) {
-        for(assgn = assignment->user->assignments; assgn; assgn = assgn->unext)
+        for(assgn = user->assignments; assgn; assgn = assgn->unext)
             assgn->active = 0;
     }