updated Helpfile for module HostServ
authorNurPech <nurpech@nurpech.de>
Wed, 2 Jan 2013 17:37:39 +0000 (18:37 +0100)
committerNurPech <nurpech@nurpech.de>
Wed, 2 Jan 2013 17:40:51 +0000 (18:40 +0100)
renamed command to delete an assignment

src/mod-hostserv.c
src/mod-hostserv.help

index d97ed83fceaaa304e84aa6f7e8257b32d753cadc..3ac51d288ac910ce035f5f8e78ec27b3323d7acd 100644 (file)
@@ -27,6 +27,9 @@
  *     };
  *  };
  *
  *     };
  *  };
  *
+ * After you started srvx make the bot active:
+ /msg opserv bind hostserv * hostserv.*
+ /msg opserv bind hostserv help *modcmd.help
  */
 
 #include "chanserv.h"
  */
 
 #include "chanserv.h"
@@ -79,7 +82,7 @@ static const struct message_entry msgtab[] = {
     { "HSMSG_MANAGER_NOT", "$b%s$b is not a manager of %s.%s" },
     { "HSMSG_MANAGER_DELETED", "$b%s$b is no longer a manager of %s.%s" },
     { "HSMSG_FAKEHOST_ASSIGN_SUCCESS", "Group $b%s.%s$b was assigned successfully." },
     { "HSMSG_MANAGER_NOT", "$b%s$b is not a manager of %s.%s" },
     { "HSMSG_MANAGER_DELETED", "$b%s$b is no longer a manager of %s.%s" },
     { "HSMSG_FAKEHOST_ASSIGN_SUCCESS", "Group $b%s.%s$b was assigned successfully." },
-    { "HSMSG_FAKEHOST_REVOKE_SUCCESS", "Group $b%s.%s$b was revoked successfully." },
+    { "HSMSG_FAKEHOST_UNASSIGN_SUCCESS", "Group $b%s.%s$b was unassigned successfully." },
     
     { NULL, NULL }
 };
     
     { NULL, NULL }
 };
@@ -1082,7 +1085,7 @@ static MODCMD_FUNC(cmd_assign) {
     return 0;
 }
 
     return 0;
 }
 
-static MODCMD_FUNC(cmd_revoke) {
+static MODCMD_FUNC(cmd_unassign) {
     struct handle_info *hi;
     struct handle_info *hiuser;
     char *fakehost;
     struct handle_info *hi;
     struct handle_info *hiuser;
     char *fakehost;
@@ -1123,7 +1126,7 @@ static MODCMD_FUNC(cmd_revoke) {
             if(!irccasecmp(tlfh_name, assignment->secondlevel->toplevel->fakehost)) {
                 if(check_management_access(hiuser, assignment->secondlevel->toplevel, assignment->secondlevel)) {
                     hs_del_assignment(assignment, 1);
             if(!irccasecmp(tlfh_name, assignment->secondlevel->toplevel->fakehost)) {
                 if(check_management_access(hiuser, assignment->secondlevel->toplevel, assignment->secondlevel)) {
                     hs_del_assignment(assignment, 1);
-                    reply("HSMSG_FAKEHOST_REVOKE_SUCCESS", slfh_name, tlfh_name);
+                    reply("HSMSG_FAKEHOST_UNASSIGN_SUCCESS", slfh_name, tlfh_name);
                     return 1;
                 }
                 reply("HSMSG_UNKNOWN_FAKEHOST", slfh_name, tlfh_name);
                     return 1;
                 }
                 reply("HSMSG_UNKNOWN_FAKEHOST", slfh_name, tlfh_name);
@@ -1347,7 +1350,7 @@ int hostserv_init() {
     modcmd_register(hostserv_module, "delmanager", cmd_delmanager, 3, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "set", cmd_set, 2, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "assign", cmd_assign, 3, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "delmanager", cmd_delmanager, 3, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "set", cmd_set, 2, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "assign", cmd_assign, 3, MODCMD_REQUIRE_AUTHED, NULL);
-    modcmd_register(hostserv_module, "revoke", cmd_revoke, 3, MODCMD_REQUIRE_AUTHED, NULL);
+    modcmd_register(hostserv_module, "unassign", cmd_unassign, 3, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "addhost", cmd_addhost, 2, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "delhost", cmd_delhost, 2, MODCMD_REQUIRE_AUTHED, NULL);
     message_register_table(msgtab);
     modcmd_register(hostserv_module, "addhost", cmd_addhost, 2, MODCMD_REQUIRE_AUTHED, NULL);
     modcmd_register(hostserv_module, "delhost", cmd_delhost, 2, MODCMD_REQUIRE_AUTHED, NULL);
     message_register_table(msgtab);
index a0faf5912f5fc3433ef3c79836f9356792d7f2e5..7ce9515158bd3f000361dab130f0334abbe2cfa8 100644 (file)
@@ -1,23 +1,41 @@
-"<INDEX>" ("$b$H Help$b",
-        "$b$G$b is a fakehost service, with this you can manage your own fakehosts.",
+"<INDEX>" ("$b$S Help$b",
+        "$b$S$b is a fakehost service, with this you can manage your own fakehosts.",
         "    USER - User Commands",
         "    MANAGER - Manager Commands"
 );
 "USER" ("$bUser Commands:$b",
         "    USER - User Commands",
         "    MANAGER - Manager Commands"
 );
 "USER" ("$bUser Commands:$b",
-               " SET                   Sets the given fakehost.",
-               " VIEW                  View fakehostdetails and userdetails."
+               " SET           Sets the given fakehost.",
+               " VIEW          View fakehostdetails and userdetails."
 );
 "MANAGER" ("$bManager Commands:$b",
 );
 "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>",
+               "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",
+               "UNASSIGN         Deletes a user from the given group"
+);
+"SET" ("/msg $S SET <fakehost|*>",
        "Sets the given fakehost to your AuthServ Account."
 );
        "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,"
+"VIEW" ("/msg $S 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."
+);
+"ADDHOST" ("/msg $S ADDHOST <host>",
+       ""
+);
+"ADDMANAGER" ("/msg $S ADDMANAGER <host> <nick|*account>",
+       ""
+);
+"ASSIGN" ("/msg $S ASSIGN <host> <nick|*account>",
+       ""
+);
+"DELHOST" ("/msg $S DELHOST <host>",
+       ""
+);
+"DELmANAGER" ("/msg $S DELHOST <host> <nick|*account>",
+       ""
+);
+"UNASSIGN" ("/msg $S UNASSIGN <host> <nick|*account>",
+       ""
 );
\ No newline at end of file
 );
\ No newline at end of file