mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-19 18:11:45 +01:00
Wizhelp (#39)
* Added %log%, and made %send%, %echo%, etc. not force capitalization. * Fixed Previous Commit * Really fixed this time. * Fixed look 2.mail Also reverted CMMAND_TERMS, was increased in previous commit when it didn't need to be due to the removed of marena. * Fixed add_to_lookup_table Fixed as per Welcor https://www.tbamud.com/forum/2-general/4307-crash-bug-need-assistance-with-gdb?start=20#7390 * Fixed two crash bugs Fixed tw crash bugs Welcor found here https://www.tbamud.com/forum/4-development/4300-simple-list-forced-to-reset-itself * wizhelp changes Cleared buf in columns_list that was getting garbage data in it. Removed wizhelp subcommand from do_commands, and removed buf and sprintf line that were never sent to anyone and replaced it with a send_to_char. Removed arg capability from do_commands as it's no longer useful without the wizhelp subcommand. Replaced wizhelp subcommand with separate do_wizhelp command that sorts commands by their level and shows all imms all imm commands regardless of their level.
This commit is contained in:
@@ -89,6 +89,34 @@ static int purge_room(room_rnum room)
|
||||
return 1;
|
||||
}
|
||||
|
||||
ACMD(do_wizhelp)
|
||||
{
|
||||
extern int *cmd_sort_info;
|
||||
int no = 1, i, cmd_num;
|
||||
int level;
|
||||
|
||||
if (!ch->desc)
|
||||
return;
|
||||
|
||||
send_to_char(ch, "The following privileged commands are available:\r\n");
|
||||
|
||||
for (level = LVL_IMPL; level >= LVL_IMMORT; level--) {
|
||||
send_to_char(ch, "%sLevel %d%s:\r\n", CCCYN(ch, C_NRM), level, CCNRM(ch, C_NRM));
|
||||
for (no = 1, cmd_num = 1; complete_cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n'; cmd_num++) {
|
||||
i = cmd_sort_info[cmd_num];
|
||||
|
||||
if (complete_cmd_info[i].minimum_level != level)
|
||||
continue;
|
||||
|
||||
send_to_char(ch, "%-14s%s", complete_cmd_info[i].command, no++ % 7 == 0 ? "\r\n" : "");
|
||||
}
|
||||
if (no % 7 != 1)
|
||||
send_to_char(ch, "\r\n");
|
||||
if (level != LVL_IMMORT)
|
||||
send_to_char(ch, "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
ACMD(do_echo)
|
||||
{
|
||||
skip_spaces(&argument);
|
||||
|
||||
Reference in New Issue
Block a user