Server Help

ASSS Questions - ?man/?help

Anonymous - Sat Jul 15, 2006 10:03 pm
Post subject: ?man/?help
Well I want to enable ?help <help msg here> and I noticed Hypersapce did that. On wiki it says its not possible and seems that HS swapped ?help/?man so how can I do this with my zone?
Chambahs - Sun Jul 16, 2006 12:49 am
Post subject:
i believe the reason is because HS has SSC billing, but maybe im wrong.
Dr Brain - Sun Jul 16, 2006 12:59 am
Post subject:
You'll have to edit the source and recompile like I did. If you don't feel up to it, I can post a patch file that you can apply.
Anonymous - Sun Jul 16, 2006 1:11 am
Post subject:
that would be very nice if you did that brain, I use the .3(latest) lunix version of as3
Smong - Sun Jul 16, 2006 7:22 am
Post subject:
Does it add an AlertCommands setting to global.conf so things like ?host can go in there?
BDwinsAlt - Sun Jul 16, 2006 7:44 am
Post subject:
I actually made a ?host/?ask/?alert command module but changing ?help is a good idea. Players are used to it. W/e works.
Anonymous - Sun Jul 16, 2006 10:50 pm
Post subject:
can you upload it please brain?
Dr Brain - Sun Jul 16, 2006 11:31 pm
Post subject:
Code: Show/Hide
============================================================
--- src/core/help.c     340475817fbf2b3f8e987c53e62fda1c789148a9
+++ src/core/help.c     cba8234e25c1d34bb446d8256704bcaf6cee6e42
@@ -81,21 +81,21 @@
}


-local helptext_t help_help =
+local helptext_t man_help =
"Targets: none\n"
"Args: <command name> | <setting name (section:key)>\n"
-"Displays help on a command or config file setting. Use {?help section:}\n"
-"to list known keys in that section. Use {?help :} to list known section\n"
+"Displays help on a command or config file setting. Use {?man section:}\n"
+"to list known keys in that section. Use {?man :} to list known section\n"
"names.\n";

-local void Chelp(const char *tc, const char *params, Player *p, const Target *target)
+local void Cman(const char *tc, const char *params, Player *p, const Target *target)
{

        if (params[0] == '?' || params[0] == '*' || params[0] == '!')
                params++;

        if (params[0] == '\0')
-               params = "help";
+               params = "man";

        if (strchr(params, ':'))
        {
@@ -134,12 +134,12 @@
                if (!chat || !cmdman)
                        return MM_FAIL;

-               cmdman->AddCommand("help", Chelp, ALLARENAS, help_help);
+               cmdman->AddCommand("man", Cman, ALLARENAS, man_help);
                return MM_OK;
        }
        else if (action == MM_UNLOAD)
        {
-               cmdman->RemoveCommand("help", Chelp, ALLARENAS);
+               cmdman->RemoveCommand("man", Cman, ALLARENAS);
                mm->ReleaseInterface(chat);
                mm->ReleaseInterface(cmdman);
                mm->ReleaseInterface(cfghelp);
============================================================
--- src/core/objects.c  ea0f52c22fddc49c0952406b90db81f85f291dda
+++ src/core/objects.c  7b50edd0260ca977f01fe5b27cc9db3f585040d0
@@ -209,7 +209,7 @@
        char id[256];
        const char *image = delimcpy(id, params, sizeof(id), ' ');
        if (image) Image(target, atoi(id), atoi(image));
-       else chat->SendMessage(p, "Invalid syntax. Please read ?help objimage");
+       else chat->SendMessage(p, "Invalid syntax. Please read ?man objimage");
}

local helptext_t objlayer_help =
@@ -251,7 +251,7 @@
        char id[256];
        const char *timer = delimcpy(id, params, sizeof(id), ' ');
        if (timer) Timer(target, atoi(id), atoi(timer));
-       else chat->SendMessage(p, "Invalid syntax. Please read ?help objtimer");
+       else chat->SendMessage(p, "Invalid syntax. Please read ?man objtimer");
}

local helptext_t objmode_help =
============================================================
--- src/core/playercmd.c        7180db4582ddc4a3504fc8ee0b09768f47d7d227
+++ src/core/playercmd.c        da8dc743d6c12f6d9a13b349091eafaa0fba5127
@@ -1101,6 +1101,23 @@
}


+local helptext_t help_help =
+"Targets: none\n"
+"Args: <message>\n"
+"Sends the message to all online staff members.\n";
+
+local void Chelp(const char *tc, const char *params, Player *p, const Target *target)
+{
+       Arena *arena = p->arena;
+       if (IS_ALLOWED(chat->GetPlayerChatMask(p), MSG_MODCHAT))
+       {
+               chat->SendModMessage("help {%s} %s: %s",
+                               arena->name, p->name, params);
+               chat->SendMessage(p, "Message has been sent to online staff");
+       }
+}
+
+
local helptext_t warn_help =
"Targets: player\n"
"Args: <message>\n"
@@ -2180,6 +2197,7 @@
        CMD(z)
        CMD(az)
        CMD(cheater)
+       CMD(help)
        CMD(warn)
        CMD(netstats)
        CMD(send)
============================================================
--- src/database/aliasdb.c      93c9d1e9a35be7892e8c3e704de08d0a047bf943
+++ src/database/aliasdb.c      44356a84ba6aab11af8fb8bc9d6b1cbd05b600b2
@@ -194,7 +194,7 @@

        if (!name || !*name)
        {
-               chat->SendMessage(p, "Invalid syntax. See ?help alias.");
+               chat->SendMessage(p, "Invalid syntax. See ?man alias.");
                return;
        }


Dr Brain - Sun Jul 23, 2006 7:38 pm
Post subject:
An updated version of this can be found here: http://forums.minegoboom.com/viewtopic.php?p=63607#63607
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group