mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-16 06:15:27 +01:00
MAJOR UPDATE: Admin Levels split from Mortal Levels
This commit is contained in:
parent
2b30509371
commit
dcba9d6441
77 changed files with 2882 additions and 2067 deletions
44
src/tedit.c
44
src/tedit.c
|
|
@ -31,14 +31,14 @@ void tedit_string_cleanup(struct descriptor_data *d, int terminator)
|
|||
switch (terminator) {
|
||||
case STRINGADD_SAVE:
|
||||
if (!(fl = fopen(storage, "w")))
|
||||
mudlog(CMP, LVL_IMPL, TRUE, "SYSERR: Can't write file '%s'.", storage);
|
||||
mudlog(CMP, ADMLVL_IMPL, TRUE, "SYSERR: Can't write file '%s'.", storage);
|
||||
else {
|
||||
if (*d->str) {
|
||||
strip_cr(*d->str);
|
||||
fputs(*d->str, fl);
|
||||
}
|
||||
fclose(fl);
|
||||
mudlog(CMP, LVL_GOD, TRUE, "OLC: %s saves '%s'.", GET_NAME(d->character), storage);
|
||||
mudlog(CMP, ADMLVL_GOD, TRUE, "OLC: %s saves '%s'.", GET_NAME(d->character), storage);
|
||||
write_to_output(d, "Saved.\r\n");
|
||||
if (!strcmp(storage, NEWS_FILE))
|
||||
newsmod = time(0);
|
||||
|
|
@ -74,20 +74,20 @@ ACMD(do_tedit)
|
|||
char *filename;
|
||||
} fields[] = {
|
||||
/* edit the lvls to your own needs */
|
||||
{ "credits", LVL_IMPL, &credits, 2400, CREDITS_FILE},
|
||||
{ "news", LVL_GRGOD, &news, 8192, NEWS_FILE},
|
||||
{ "motd", LVL_GRGOD, &motd, 2400, MOTD_FILE},
|
||||
{ "imotd", LVL_IMPL, &imotd, 2400, IMOTD_FILE},
|
||||
{ "greetings", LVL_IMPL, &GREETINGS, 2400, GREETINGS_FILE},
|
||||
{ "help", LVL_GRGOD, &help, 2400, HELP_PAGE_FILE},
|
||||
{ "ihelp", LVL_GRGOD, &ihelp, 2400, IHELP_PAGE_FILE},
|
||||
{ "info", LVL_GRGOD, &info, 8192, INFO_FILE},
|
||||
{ "background", LVL_IMPL, &background, 8192, BACKGROUND_FILE},
|
||||
{ "handbook", LVL_IMPL, &handbook, 8192, HANDBOOK_FILE},
|
||||
{ "policies", LVL_IMPL, &policies, 8192, POLICIES_FILE},
|
||||
{ "wizlist", LVL_IMPL, &wizlist, 2400, WIZLIST_FILE},
|
||||
{ "immlist", LVL_GRGOD, &immlist, 2400, IMMLIST_FILE},
|
||||
{ "\n", 0, NULL, 0, NULL }
|
||||
{ "credits", ADMLVL_IMPL, &credits, 2400, CREDITS_FILE},
|
||||
{ "news", ADMLVL_GRGOD, &news, 8192, NEWS_FILE},
|
||||
{ "motd", ADMLVL_GRGOD, &motd, 2400, MOTD_FILE},
|
||||
{ "imotd", ADMLVL_IMPL, &imotd, 2400, IMOTD_FILE},
|
||||
{ "greetings", ADMLVL_IMPL, &GREETINGS, 2400, GREETINGS_FILE},
|
||||
{ "help", ADMLVL_GRGOD, &help, 2400, HELP_PAGE_FILE},
|
||||
{ "ihelp", ADMLVL_GRGOD, &ihelp, 2400, IHELP_PAGE_FILE},
|
||||
{ "info", ADMLVL_GRGOD, &info, 8192, INFO_FILE},
|
||||
{ "background", ADMLVL_IMPL, &background, 8192, BACKGROUND_FILE},
|
||||
{ "handbook", ADMLVL_IMPL, &handbook, 8192, HANDBOOK_FILE},
|
||||
{ "policies", ADMLVL_IMPL, &policies, 8192, POLICIES_FILE},
|
||||
{ "wizlist", ADMLVL_IMPL, &wizlist, 2400, WIZLIST_FILE},
|
||||
{ "immlist", ADMLVL_GRGOD, &immlist, 2400, IMMLIST_FILE},
|
||||
{ "\n", ADMLVL_MORTAL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
if (ch->desc == NULL)
|
||||
|
|
@ -98,10 +98,10 @@ ACMD(do_tedit)
|
|||
if (!*field) {
|
||||
send_to_char(ch, "Files available to be edited:\r\n");
|
||||
for (l = 0; *fields[l].cmd != '\n'; l++) {
|
||||
if (GET_LEVEL(ch) >= fields[l].level) {
|
||||
send_to_char(ch, "%-11.11s ", fields[l].cmd);
|
||||
if (!(++i % 7))
|
||||
send_to_char(ch, "\r\n");
|
||||
if (GET_ADMLEVEL(ch) >= fields[l].level) {
|
||||
send_to_char(ch, "%-11.11s ", fields[l].cmd);
|
||||
if (!(++i % 7))
|
||||
send_to_char(ch, "\r\n");
|
||||
}
|
||||
}
|
||||
if (i % 7)
|
||||
|
|
@ -119,7 +119,7 @@ ACMD(do_tedit)
|
|||
return;
|
||||
}
|
||||
|
||||
if (GET_LEVEL(ch) < fields[l].level) {
|
||||
if (GET_ADMLEVEL(ch) < fields[l].level) {
|
||||
send_to_char(ch, "You are not godly enough for that!\r\n");
|
||||
return;
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ ACMD(do_tedit)
|
|||
send_to_char(ch, "Edit file below:\r\n\r\n");
|
||||
|
||||
if (ch->desc->olc) {
|
||||
mudlog(BRF, LVL_IMMORT, TRUE, "SYSERR: do_tedit: Player already had olc structure.");
|
||||
mudlog(BRF, ADMLVL_IMMORT, TRUE, "SYSERR: do_tedit: Player already had olc structure.");
|
||||
free(ch->desc->olc);
|
||||
}
|
||||
CREATE(ch->desc->olc, struct oasis_olc_data, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue