From 7b7fd7e3c4d05117751fe89204260333e78e8fe3 Mon Sep 17 00:00:00 2001 From: NurPech Date: Wed, 2 Jan 2013 05:23:33 +0100 Subject: [PATCH] bugfix in function to revoke an assignment. --- src/mod-hostserv.c | 3 +-- src/mod-hostserv.help | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/mod-hostserv.help diff --git a/src/mod-hostserv.c b/src/mod-hostserv.c index 7f86d6e..d97ed83 100644 --- a/src/mod-hostserv.c +++ b/src/mod-hostserv.c @@ -58,7 +58,6 @@ static const struct message_entry msgtab[] = { { "HSMSG_MANAGED_FAKEHOST", " $b%s.%s$b assignments: %d" }, { "HSMSG_MANAGE_HOWTO", "Use $bview xxx.yyy$b to view more information about a fakehost group." }, { "HSMSG_UNKNOWN_FAKEHOST", "Fakehost $b%s.%s$b is unknown or you have no access to manage it." }, - { "HSMSG_UNKNOWN_FAKEHOST_TOPLEVEL", "Fakehost $b%s$b is unknown or you have no access to manage it." }, { "HSMSG_TOPLEVEL_FAKEHOSTS", "Fakehosts in group $b*.%s$b:" }, { "HSMSG_TOPLEVEL_FAKEHOST", " $b%s.%s$b assignments: %d managers: %d" }, { "HSMSG_TOPLEVEL_INVALID", "The name of the group you entered is invalid ($b%s$b)" }, @@ -1122,7 +1121,7 @@ static MODCMD_FUNC(cmd_revoke) { for(assignment = hs_user->assignments; assignment; assignment = assignment->unext) { if(!irccasecmp(slfh_name, assignment->secondlevel->fakehost)) { if(!irccasecmp(tlfh_name, assignment->secondlevel->toplevel->fakehost)) { - if(check_management_access(hi, assignment->secondlevel->toplevel, assignment->secondlevel)) { + if(check_management_access(hiuser, assignment->secondlevel->toplevel, assignment->secondlevel)) { hs_del_assignment(assignment, 1); reply("HSMSG_FAKEHOST_REVOKE_SUCCESS", slfh_name, tlfh_name); return 1; diff --git a/src/mod-hostserv.help b/src/mod-hostserv.help new file mode 100644 index 0000000..8ebf0ee --- /dev/null +++ b/src/mod-hostserv.help @@ -0,0 +1,31 @@ +view +addmanager +delmanager +set +assign +revoke +addhost +delhost +"" ("$b$H Help$b", + "$b$G$b is a fakehost service, with this you can manage your own fakehosts.", + " USER - User Commands", + " MANAGER - Manager Commands" +); +"USER" ("$bUser Commands:$b", + " SET Sets the given fakehost.", + " VIEW View fakehostdetails and userdetails." +); +"MANAGER" ("$bManager Commands:$b", + "ADDHOST Adds the given host to the database.", + "ADDMANAGER Adds a manager to the given group.", + "ASSIGN Adds a user to the given group.", + "DELHOST Deletes the given host from the database.", + "DELMANAGER Deletes a manager from the given group", + "REVOKE Deletes a user from the given group" +); +"SET" ("/msg $H SET ", + "Sets the given fakehost to your AuthServ Account." +); +"VIEW" ("/msg $H VIEW [group|nick|*account]", + "Reports various pieces of information about a fakehostgroup or user. If no parameters are given it will use your current nick," +); \ No newline at end of file -- 2.20.1