Updated Changelog and helpfiles and put do_gen_tog back in, doh! still want the old commands too.

This commit is contained in:
Rumble
2007-01-15 01:52:48 +00:00
parent 7b195232f5
commit 6e584e104e
2 changed files with 159 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ ACMD(do_report);
ACMD(do_split);
ACMD(do_use);
ACMD(do_display);
ACMD(do_gen_tog);
ACMD(do_gen_write);
ACMD(do_file);
@@ -793,6 +794,144 @@ ACMD(do_gen_write)
send_to_char(ch, "Okay. Thanks!\r\n");
}
#define TOG_OFF 0
#define TOG_ON 1
#define PRF_TOG_CHK(ch,flag) ((TOGGLE_BIT(PRF_FLAGS(ch), (flag))) & (flag))
ACMD(do_gen_tog)
{
long result;
const char *tog_messages[][2] = {
{"You are now safe from summoning by other players.\r\n",
"You may now be summoned by other players.\r\n"},
{"Nohassle disabled.\r\n",
"Nohassle enabled.\r\n"},
{"Brief mode off.\r\n",
"Brief mode on.\r\n"},
{"Compact mode off.\r\n",
"Compact mode on.\r\n"},
{"You can now hear tells.\r\n",
"You are now deaf to tells.\r\n"},
{"You can now hear auctions.\r\n",
"You are now deaf to auctions.\r\n"},
{"You can now hear shouts.\r\n",
"You are now deaf to shouts.\r\n"},
{"You can now hear gossip.\r\n",
"You are now deaf to gossip.\r\n"},
{"You can now hear the congratulation messages.\r\n",
"You are now deaf to the congratulation messages.\r\n"},
{"You can now hear the Wiz-channel.\r\n",
"You are now deaf to the Wiz-channel.\r\n"},
{"You are no longer part of the Quest.\r\n",
"Okay, you are part of the Quest!\r\n"},
{"You will no longer see the room flags.\r\n",
"You will now see the room flags.\r\n"},
{"You will now have your communication repeated.\r\n",
"You will no longer have your communication repeated.\r\n"},
{"HolyLight mode off.\r\n",
"HolyLight mode on.\r\n"},
{"Nameserver_is_slow changed to NO; IP addresses will now be resolved.\r\n",
"Nameserver_is_slow changed to YES; sitenames will no longer be resolved.\r\n"},
{"Autoexits disabled.\r\n",
"Autoexits enabled.\r\n"},
{"Will no longer track through doors.\r\n",
"Will now track through doors.\r\n"},
{"Will no longer clear screen in OLC.\r\n",
"Will now clear screen in OLC.\r\n"},
{"Buildwalk Off.\r\n",
"Buildwalk On.\r\n"},
{"AFK flag is now off.\r\n",
"AFK flag is now on.\r\n"}
};
if (IS_NPC(ch))
return;
switch (subcmd) {
case SCMD_NOSUMMON:
result = PRF_TOG_CHK(ch, PRF_SUMMONABLE);
break;
case SCMD_NOHASSLE:
result = PRF_TOG_CHK(ch, PRF_NOHASSLE);
break;
case SCMD_BRIEF:
result = PRF_TOG_CHK(ch, PRF_BRIEF);
break;
case SCMD_COMPACT:
result = PRF_TOG_CHK(ch, PRF_COMPACT);
break;
case SCMD_NOTELL:
result = PRF_TOG_CHK(ch, PRF_NOTELL);
break;
case SCMD_NOAUCTION:
result = PRF_TOG_CHK(ch, PRF_NOAUCT);
break;
case SCMD_NOSHOUT:
result = PRF_TOG_CHK(ch, PRF_NOSHOUT);
break;
case SCMD_NOGOSSIP:
result = PRF_TOG_CHK(ch, PRF_NOGOSS);
break;
case SCMD_NOGRATZ:
result = PRF_TOG_CHK(ch, PRF_NOGRATZ);
break;
case SCMD_NOWIZ:
result = PRF_TOG_CHK(ch, PRF_NOWIZ);
break;
case SCMD_QUEST:
result = PRF_TOG_CHK(ch, PRF_QUEST);
break;
case SCMD_SHOWVNUMS:
result = PRF_TOG_CHK(ch, PRF_SHOWVNUMS);
break;
case SCMD_NOREPEAT:
result = PRF_TOG_CHK(ch, PRF_NOREPEAT);
break;
case SCMD_HOLYLIGHT:
result = PRF_TOG_CHK(ch, PRF_HOLYLIGHT);
break;
case SCMD_AUTOEXIT:
result = PRF_TOG_CHK(ch, PRF_AUTOEXIT);
break;
case SCMD_CLS:
result = PRF_TOG_CHK(ch, PRF_CLS);
break;
case SCMD_BUILDWALK:
if (GET_LEVEL(ch) < LVL_BUILDER) {
send_to_char(ch, "Builders only, sorry.\r\n");
return;
}
result = PRF_TOG_CHK(ch, PRF_BUILDWALK);
if (PRF_FLAGGED(ch, PRF_BUILDWALK))
mudlog(CMP, GET_LEVEL(ch), TRUE,
"OLC: %s turned buildwalk on. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
else
mudlog(CMP, GET_LEVEL(ch), TRUE,
"OLC: %s turned buildwalk off. Allowed zone %d", GET_NAME(ch), GET_OLC_ZONE(ch));
break;
case SCMD_AFK:
result = PRF_TOG_CHK(ch, PRF_AFK);
if (PRF_FLAGGED(ch, PRF_AFK))
act("$n has gone AFK.", TRUE, ch, 0, 0, TO_ROOM);
else
act("$n has come back from AFK.", TRUE, ch, 0, 0, TO_ROOM);
break;
default:
log("SYSERR: Unknown subcmd %d in do_gen_toggle.", subcmd);
return;
}
if (result)
send_to_char(ch, "%s", tog_messages[subcmd][TOG_ON]);
else
send_to_char(ch, "%s", tog_messages[subcmd][TOG_OFF]);
return;
}
ACMD(do_file)
{
FILE *req_file;