bugfix in function to revoke an assignment.
authorNurPech <nurpech@nurpech.de>
Wed, 2 Jan 2013 04:23:33 +0000 (05:23 +0100)
committerNurPech <nurpech@nurpech.de>
Wed, 2 Jan 2013 04:23:33 +0000 (05:23 +0100)
src/mod-hostserv.c
src/mod-hostserv.help [new file with mode: 0644]

index 7f86d6e7ec8b893be5a53c2cca34a75871e8ea3a..d97ed83fceaaa304e84aa6f7e8257b32d753cadc 100644 (file)
@@ -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 (file)
index 0000000..8ebf0ee
--- /dev/null
@@ -0,0 +1,31 @@
+view
+addmanager
+delmanager
+set
+assign
+revoke
+addhost
+delhost
+"<INDEX>" ("$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 <fakehost>",
+       "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