X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmod-hostserv.c;h=8e1ee36e3b08cc4c122078d7e541a85721aca1cd;hb=648ed0b405683a26b2eb69af2063811cec84236f;hp=56ef7454225b69f830a7e323f8e5177b01c75ab8;hpb=c63edd448a0ab7d83ddb5724cb9c141009be5a45;p=srvx.git diff --git a/src/mod-hostserv.c b/src/mod-hostserv.c index 56ef745..8e1ee36 100644 --- a/src/mod-hostserv.c +++ b/src/mod-hostserv.c @@ -23,7 +23,10 @@ * "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 * }; * }; * @@ -165,7 +168,7 @@ static void hs_free_all() { } for(slfh = tlfh->secondlevel; slfh; slfh = next_slfh) { next_slfh = slfh->next; - for(manager = tlfh->managers; manager; manager = next_manager) { + for(manager = slfh->managers; manager; manager = next_manager) { next_manager = manager->next; free(manager); } @@ -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; } @@ -356,7 +359,7 @@ static void hs_activate_assignment(struct hs_user *user, struct hs_assignment *a assignment->active = 1; } - apply_fakehost(assignment->user->hi, NULL); + apply_fakehost(user->hi, NULL); } static struct hs_assignment *hs_add_assignment(struct hs_secondlevel *slfh, struct hs_user *user) { @@ -966,9 +969,6 @@ static MODCMD_FUNC(cmd_set) { hs_activate_assignment(hs_user, NULL); return 1; } else { - if(!strchr(argv[1], '.')) { - - } fakehost = argv[1]; char *slfh_name = fakehost; char *tlfh_name = strchr(fakehost, '.');