mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-24 03:00:13 +01:00
Altered previous truncation fix and added OLC setting for the HUH message.
This commit is contained in:
parent
68fcdb73bf
commit
4f5c220759
12 changed files with 100 additions and 53 deletions
52
src/cedit.c
52
src/cedit.c
|
|
@ -141,6 +141,7 @@ static void cedit_setup(struct descriptor_data *d)
|
||||||
|
|
||||||
/* Allocate space for the strings. */
|
/* Allocate space for the strings. */
|
||||||
OLC_CONFIG(d)->play.OK = str_udup(CONFIG_OK);
|
OLC_CONFIG(d)->play.OK = str_udup(CONFIG_OK);
|
||||||
|
OLC_CONFIG(d)->play.HUH = str_udup(CONFIG_HUH);
|
||||||
OLC_CONFIG(d)->play.NOPERSON = str_udup(CONFIG_NOPERSON);
|
OLC_CONFIG(d)->play.NOPERSON = str_udup(CONFIG_NOPERSON);
|
||||||
OLC_CONFIG(d)->play.NOEFFECT = str_udup(CONFIG_NOEFFECT);
|
OLC_CONFIG(d)->play.NOEFFECT = str_udup(CONFIG_NOEFFECT);
|
||||||
|
|
||||||
|
|
@ -246,6 +247,10 @@ static void cedit_save_internally(struct descriptor_data *d)
|
||||||
free(CONFIG_OK);
|
free(CONFIG_OK);
|
||||||
CONFIG_OK = str_udup(OLC_CONFIG(d)->play.OK);
|
CONFIG_OK = str_udup(OLC_CONFIG(d)->play.OK);
|
||||||
|
|
||||||
|
if (CONFIG_HUH)
|
||||||
|
free(CONFIG_HUH);
|
||||||
|
CONFIG_HUH = str_udup(OLC_CONFIG(d)->play.HUH);
|
||||||
|
|
||||||
if (CONFIG_NOPERSON)
|
if (CONFIG_NOPERSON)
|
||||||
free(CONFIG_NOPERSON);
|
free(CONFIG_NOPERSON);
|
||||||
CONFIG_NOPERSON = str_udup(OLC_CONFIG(d)->play.NOPERSON);
|
CONFIG_NOPERSON = str_udup(OLC_CONFIG(d)->play.NOPERSON);
|
||||||
|
|
@ -385,6 +390,12 @@ int save_config( IDXTYPE nowhere )
|
||||||
fprintf(fl, "* Text sent to players when OK is all that is needed.\n"
|
fprintf(fl, "* Text sent to players when OK is all that is needed.\n"
|
||||||
"ok = %s\n\n", buf);
|
"ok = %s\n\n", buf);
|
||||||
|
|
||||||
|
strcpy(buf, CONFIG_HUH);
|
||||||
|
strip_cr(buf);
|
||||||
|
|
||||||
|
fprintf(fl, "* Text sent to players for an unrecognized command.\n"
|
||||||
|
"huh = %s\n\n", buf);
|
||||||
|
|
||||||
strcpy(buf, CONFIG_NOPERSON);
|
strcpy(buf, CONFIG_NOPERSON);
|
||||||
strip_cr(buf);
|
strip_cr(buf);
|
||||||
|
|
||||||
|
|
@ -624,12 +635,13 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
|
||||||
"%sR%s) Diagonal Directions : %s%s\r\n"
|
"%sR%s) Diagonal Directions : %s%s\r\n"
|
||||||
"%sS%s) Mortals Level To Immortal : %s%s\r\n"
|
"%sS%s) Mortals Level To Immortal : %s%s\r\n"
|
||||||
"%s1%s) OK Message Text : %s%s"
|
"%s1%s) OK Message Text : %s%s"
|
||||||
"%s2%s) NOPERSON Message Text : %s%s"
|
"%s2%s) HUH Message Text : %s%s"
|
||||||
"%s3%s) NOEFFECT Message Text : %s%s"
|
"%s3%s) NOPERSON Message Text : %s%s"
|
||||||
"%s4%s) Map/Automap Option : %s%s\r\n"
|
"%s4%s) NOEFFECT Message Text : %s%s"
|
||||||
"%s5%s) Default map size : %s%d\r\n"
|
"%s5%s) Map/Automap Option : %s%s\r\n"
|
||||||
"%s6%s) Default minimap size : %s%d\r\n"
|
"%s6%s) Default map size : %s%d\r\n"
|
||||||
"%s7%s) Scripts on PC's : %s%s\r\n"
|
"%s7%s) Default minimap size : %s%d\r\n"
|
||||||
|
"%s8%s) Scripts on PC's : %s%s\r\n"
|
||||||
"%sQ%s) Exit To The Main Menu\r\n"
|
"%sQ%s) Exit To The Main Menu\r\n"
|
||||||
"Enter your choice : ",
|
"Enter your choice : ",
|
||||||
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.pk_allowed),
|
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.pk_allowed),
|
||||||
|
|
@ -653,6 +665,7 @@ static void cedit_disp_game_play_options(struct descriptor_data *d)
|
||||||
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.no_mort_to_immort),
|
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.no_mort_to_immort),
|
||||||
|
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->play.OK,
|
grn, nrm, cyn, OLC_CONFIG(d)->play.OK,
|
||||||
|
grn, nrm, cyn, OLC_CONFIG(d)->play.HUH,
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->play.NOPERSON,
|
grn, nrm, cyn, OLC_CONFIG(d)->play.NOPERSON,
|
||||||
grn, nrm, cyn, OLC_CONFIG(d)->play.NOEFFECT,
|
grn, nrm, cyn, OLC_CONFIG(d)->play.NOEFFECT,
|
||||||
grn, nrm, cyn, m_opt == 0 ? "Off" : (m_opt == 1 ? "On" : (m_opt == 2 ? "Imm-Only" : "Invalid!")),
|
grn, nrm, cyn, m_opt == 0 ? "Off" : (m_opt == 1 ? "On" : (m_opt == 2 ? "Imm-Only" : "Invalid!")),
|
||||||
|
|
@ -974,16 +987,21 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '2':
|
case '2':
|
||||||
|
write_to_output(d, "Enter the HUH message : ");
|
||||||
|
OLC_MODE(d) = CEDIT_HUH;
|
||||||
|
return;
|
||||||
|
|
||||||
|
case '3':
|
||||||
write_to_output(d, "Enter the NOPERSON message : ");
|
write_to_output(d, "Enter the NOPERSON message : ");
|
||||||
OLC_MODE(d) = CEDIT_NOPERSON;
|
OLC_MODE(d) = CEDIT_NOPERSON;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '3':
|
case '4':
|
||||||
write_to_output(d, "Enter the NOEFFECT message : ");
|
write_to_output(d, "Enter the NOEFFECT message : ");
|
||||||
OLC_MODE(d) = CEDIT_NOEFFECT;
|
OLC_MODE(d) = CEDIT_NOEFFECT;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '4':
|
case '5':
|
||||||
write_to_output(d, "1) Disable maps\r\n");
|
write_to_output(d, "1) Disable maps\r\n");
|
||||||
write_to_output(d, "2) Enable Maps\r\n");
|
write_to_output(d, "2) Enable Maps\r\n");
|
||||||
write_to_output(d, "3) Maps for Immortals only\r\n");
|
write_to_output(d, "3) Maps for Immortals only\r\n");
|
||||||
|
|
@ -991,16 +1009,16 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
OLC_MODE(d) = CEDIT_MAP_OPTION;
|
OLC_MODE(d) = CEDIT_MAP_OPTION;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '5':
|
case '6':
|
||||||
write_to_output(d, "Enter default map size (1-12) : ");
|
write_to_output(d, "Enter default map size (1-12) : ");
|
||||||
OLC_MODE(d) = CEDIT_MAP_SIZE;
|
OLC_MODE(d) = CEDIT_MAP_SIZE;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '6':
|
case '7':
|
||||||
write_to_output(d, "Enter default mini-map size (1-12) : ");
|
write_to_output(d, "Enter default mini-map size (1-12) : ");
|
||||||
OLC_MODE(d) = CEDIT_MINIMAP_SIZE;
|
OLC_MODE(d) = CEDIT_MINIMAP_SIZE;
|
||||||
return;
|
return;
|
||||||
case '7':
|
case '8':
|
||||||
TOGGLE_VAR(OLC_CONFIG(d)->play.script_players);
|
TOGGLE_VAR(OLC_CONFIG(d)->play.script_players);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1406,6 +1424,18 @@ void cedit_parse(struct descriptor_data *d, char *arg)
|
||||||
cedit_disp_game_play_options(d);
|
cedit_disp_game_play_options(d);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CEDIT_HUH:
|
||||||
|
if (!genolc_checkstring(d, arg))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (OLC_CONFIG(d)->play.HUH)
|
||||||
|
free(OLC_CONFIG(d)->play.HUH);
|
||||||
|
|
||||||
|
OLC_CONFIG(d)->play.HUH = str_udupnl(arg);
|
||||||
|
|
||||||
|
cedit_disp_game_play_options(d);
|
||||||
|
break;
|
||||||
|
|
||||||
case CEDIT_NOPERSON:
|
case CEDIT_NOPERSON:
|
||||||
if (!genolc_checkstring(d, arg))
|
if (!genolc_checkstring(d, arg))
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ int load_into_inventory = YES;
|
||||||
|
|
||||||
/* "okay" etc. */
|
/* "okay" etc. */
|
||||||
const char *OK = "Okay.\r\n";
|
const char *OK = "Okay.\r\n";
|
||||||
|
const char *HUH = "Huh!?!\r\n";
|
||||||
const char *NOPERSON = "No one by that name here.\r\n";
|
const char *NOPERSON = "No one by that name here.\r\n";
|
||||||
const char *NOEFFECT = "Nothing seems to happen.\r\n";
|
const char *NOEFFECT = "Nothing seems to happen.\r\n";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ extern int idle_max_level;
|
||||||
extern int dts_are_dumps;
|
extern int dts_are_dumps;
|
||||||
extern int load_into_inventory;
|
extern int load_into_inventory;
|
||||||
extern const char *OK;
|
extern const char *OK;
|
||||||
|
extern const char *HUH;
|
||||||
extern const char *NOPERSON;
|
extern const char *NOPERSON;
|
||||||
extern const char *NOEFFECT;
|
extern const char *NOEFFECT;
|
||||||
extern int track_through_doors;
|
extern int track_through_doors;
|
||||||
|
|
|
||||||
8
src/db.c
8
src/db.c
|
|
@ -3788,6 +3788,7 @@ static void load_default_config( void )
|
||||||
CONFIG_DTS_ARE_DUMPS = dts_are_dumps;
|
CONFIG_DTS_ARE_DUMPS = dts_are_dumps;
|
||||||
CONFIG_LOAD_INVENTORY = load_into_inventory;
|
CONFIG_LOAD_INVENTORY = load_into_inventory;
|
||||||
CONFIG_OK = strdup(OK);
|
CONFIG_OK = strdup(OK);
|
||||||
|
CONFIG_HUH = strdup(HUH);
|
||||||
CONFIG_NOPERSON = strdup(NOPERSON);
|
CONFIG_NOPERSON = strdup(NOPERSON);
|
||||||
CONFIG_NOEFFECT = strdup(NOEFFECT);
|
CONFIG_NOEFFECT = strdup(NOEFFECT);
|
||||||
CONFIG_TRACK_T_DOORS = track_through_doors;
|
CONFIG_TRACK_T_DOORS = track_through_doors;
|
||||||
|
|
@ -3944,6 +3945,13 @@ void load_config( void )
|
||||||
case 'h':
|
case 'h':
|
||||||
if (!str_cmp(tag, "holler_move_cost"))
|
if (!str_cmp(tag, "holler_move_cost"))
|
||||||
CONFIG_HOLLER_MOVE_COST = num;
|
CONFIG_HOLLER_MOVE_COST = num;
|
||||||
|
else if (!str_cmp(tag, "huh")) {
|
||||||
|
char tmp[READ_SIZE];
|
||||||
|
if (CONFIG_HUH)
|
||||||
|
free(CONFIG_HUH);
|
||||||
|
snprintf(tmp, sizeof(tmp), "%s\r\n", line);
|
||||||
|
CONFIG_HUH = strdup(tmp);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ ACMD(do_masound)
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch))
|
if (!MOB_OR_IMPL(ch))
|
||||||
{
|
{
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ ACMD(do_mkill)
|
||||||
char_data *victim;
|
char_data *victim;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,7 +148,7 @@ ACMD(do_mjunk)
|
||||||
obj_data *obj_next;
|
obj_data *obj_next;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -195,7 +195,7 @@ ACMD(do_mechoaround)
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ ACMD(do_msend)
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ ACMD(do_mecho)
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +290,7 @@ ACMD(do_mzoneecho)
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch))
|
if (!MOB_OR_IMPL(ch))
|
||||||
{
|
{
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg = any_one_arg(argument, room_number);
|
msg = any_one_arg(argument, room_number);
|
||||||
|
|
@ -322,7 +322,7 @@ ACMD(do_mload)
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -423,7 +423,7 @@ ACMD(do_mpurge)
|
||||||
obj_data *obj;
|
obj_data *obj;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -490,7 +490,7 @@ ACMD(do_mgoto)
|
||||||
room_rnum location;
|
room_rnum location;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -524,7 +524,7 @@ ACMD(do_mat)
|
||||||
room_rnum location, original;
|
room_rnum location, original;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -564,7 +564,7 @@ ACMD(do_mteleport)
|
||||||
char_data *vict, *next_ch;
|
char_data *vict, *next_ch;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -625,7 +625,7 @@ ACMD(do_mdamage) {
|
||||||
char_data *vict;
|
char_data *vict;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -660,7 +660,7 @@ ACMD(do_mforce)
|
||||||
char arg[MAX_INPUT_LENGTH];
|
char arg[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -721,7 +721,7 @@ ACMD(do_mhunt)
|
||||||
char arg[MAX_INPUT_LENGTH];
|
char arg[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -763,7 +763,7 @@ ACMD(do_mremember)
|
||||||
char arg[MAX_INPUT_LENGTH];
|
char arg[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -814,7 +814,7 @@ ACMD(do_mforget)
|
||||||
char arg[MAX_INPUT_LENGTH];
|
char arg[MAX_INPUT_LENGTH];
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -873,7 +873,7 @@ ACMD(do_mtransform)
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -986,7 +986,7 @@ ACMD(do_mdoor)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1074,7 +1074,7 @@ ACMD(do_mfollow)
|
||||||
struct follow_type *j, *k;
|
struct follow_type *j, *k;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1145,7 +1145,7 @@ ACMD(do_mrecho)
|
||||||
char start[MAX_INPUT_LENGTH], finish[MAX_INPUT_LENGTH], *msg;
|
char start[MAX_INPUT_LENGTH], finish[MAX_INPUT_LENGTH], *msg;
|
||||||
|
|
||||||
if (!MOB_OR_IMPL(ch)) {
|
if (!MOB_OR_IMPL(ch)) {
|
||||||
send_to_char(ch, "Huh?!?\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg = two_arguments(argument, start, finish);
|
msg = two_arguments(argument, start, finish);
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,13 @@ char *str_udupnl(const char *txt)
|
||||||
{
|
{
|
||||||
char *str = NULL, undef[] = "undefined";
|
char *str = NULL, undef[] = "undefined";
|
||||||
const char *ptr = NULL;
|
const char *ptr = NULL;
|
||||||
|
size_t n;
|
||||||
|
|
||||||
ptr = (txt && *txt) ? txt : undef;
|
ptr = (txt && *txt) ? txt : undef;
|
||||||
CREATE(str, char, strlen(ptr) + 3);
|
n = strlen(ptr) + 3;
|
||||||
|
|
||||||
strlcpy(str, ptr, strlen(str));
|
CREATE(str, char, n);
|
||||||
|
strlcpy(str, ptr, n);
|
||||||
strcat(str, "\r\n");
|
strcat(str, "\r\n");
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
|
|
||||||
|
|
@ -528,7 +528,7 @@ void command_interpreter(struct char_data *ch, char *argument)
|
||||||
|
|
||||||
if (*complete_cmd_info[cmd].command == '\n') {
|
if (*complete_cmd_info[cmd].command == '\n') {
|
||||||
int found = 0;
|
int found = 0;
|
||||||
send_to_char(ch, "Huh!?!\r\n");
|
send_to_char(ch, "%s", CONFIG_HUH);
|
||||||
|
|
||||||
for (cmd = 0; *cmd_info[cmd].command != '\n'; cmd++)
|
for (cmd = 0; *cmd_info[cmd].command != '\n'; cmd++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
17
src/oasis.h
17
src/oasis.h
|
|
@ -331,14 +331,15 @@ extern const char *nrm, *grn, *cyn, *yel;
|
||||||
#define CEDIT_ROOM_NUMBERS_MENU 6
|
#define CEDIT_ROOM_NUMBERS_MENU 6
|
||||||
#define CEDIT_AUTOWIZ_OPTIONS_MENU 7
|
#define CEDIT_AUTOWIZ_OPTIONS_MENU 7
|
||||||
#define CEDIT_OK 8
|
#define CEDIT_OK 8
|
||||||
#define CEDIT_NOPERSON 9
|
#define CEDIT_HUH 9
|
||||||
#define CEDIT_NOEFFECT 10
|
#define CEDIT_NOPERSON 10
|
||||||
#define CEDIT_DFLT_IP 11
|
#define CEDIT_NOEFFECT 11
|
||||||
#define CEDIT_DFLT_DIR 12
|
#define CEDIT_DFLT_IP 12
|
||||||
#define CEDIT_LOGNAME 13
|
#define CEDIT_DFLT_DIR 13
|
||||||
#define CEDIT_MENU 14
|
#define CEDIT_LOGNAME 14
|
||||||
#define CEDIT_WELC_MESSG 15
|
#define CEDIT_MENU 15
|
||||||
#define CEDIT_START_MESSG 16
|
#define CEDIT_WELC_MESSG 16
|
||||||
|
#define CEDIT_START_MESSG 17
|
||||||
|
|
||||||
/* Numerical responses. */
|
/* Numerical responses. */
|
||||||
#define CEDIT_NUMERICAL_RESPONSE 20
|
#define CEDIT_NUMERICAL_RESPONSE 20
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,9 @@ int free_strings(void *data, int type)
|
||||||
if (config->play.OK)
|
if (config->play.OK)
|
||||||
free(config->play.OK);
|
free(config->play.OK);
|
||||||
|
|
||||||
|
if (config->play.HUH)
|
||||||
|
free(config->play.HUH);
|
||||||
|
|
||||||
if (config->play.NOPERSON)
|
if (config->play.NOPERSON)
|
||||||
free(config->play.NOPERSON);
|
free(config->play.NOPERSON);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -658,9 +658,7 @@ void quest_stat(struct char_data *ch, char argument[MAX_STRING_LENGTH])
|
||||||
char buf[MAX_STRING_LENGTH];
|
char buf[MAX_STRING_LENGTH];
|
||||||
char targetname[MAX_STRING_LENGTH];
|
char targetname[MAX_STRING_LENGTH];
|
||||||
|
|
||||||
if (GET_LEVEL(ch) < LVL_IMMORT)
|
if (!*argument)
|
||||||
send_to_char(ch, "Huh!?!\r\n");
|
|
||||||
else if (!*argument)
|
|
||||||
send_to_char(ch, "%s\r\n", quest_imm_usage);
|
send_to_char(ch, "%s\r\n", quest_imm_usage);
|
||||||
else if ((rnum = real_quest(atoi(argument))) == NOTHING )
|
else if ((rnum = real_quest(atoi(argument))) == NOTHING )
|
||||||
send_to_char(ch, "That quest does not exist.\r\n");
|
send_to_char(ch, "That quest does not exist.\r\n");
|
||||||
|
|
|
||||||
|
|
@ -1322,6 +1322,7 @@ struct game_data
|
||||||
int script_players; /**< Is attaching scripts to players allowed? */
|
int script_players; /**< Is attaching scripts to players allowed? */
|
||||||
|
|
||||||
char *OK; /**< When player receives 'Okay.' text. */
|
char *OK; /**< When player receives 'Okay.' text. */
|
||||||
|
char *HUH; /**< 'Huh!?!' */
|
||||||
char *NOPERSON; /**< 'No one by that name here.' */
|
char *NOPERSON; /**< 'No one by that name here.' */
|
||||||
char *NOEFFECT; /**< 'Nothing seems to happen.' */
|
char *NOEFFECT; /**< 'Nothing seems to happen.' */
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -970,8 +970,10 @@ do \
|
||||||
#define CONFIG_TRACK_T_DOORS config_info.play.track_through_doors
|
#define CONFIG_TRACK_T_DOORS config_info.play.track_through_doors
|
||||||
/** Get the permission to level up from mortal to immortal. */
|
/** Get the permission to level up from mortal to immortal. */
|
||||||
#define CONFIG_NO_MORT_TO_IMMORT config_info.play.no_mort_to_immort
|
#define CONFIG_NO_MORT_TO_IMMORT config_info.play.no_mort_to_immort
|
||||||
/** Get the 'OK' message. */
|
/** Get the OK message. */
|
||||||
#define CONFIG_OK config_info.play.OK
|
#define CONFIG_OK config_info.play.OK
|
||||||
|
/** Get the HUH message. */
|
||||||
|
#define CONFIG_HUH config_info.play.HUH
|
||||||
/** Get the NOPERSON message. */
|
/** Get the NOPERSON message. */
|
||||||
#define CONFIG_NOPERSON config_info.play.NOPERSON
|
#define CONFIG_NOPERSON config_info.play.NOPERSON
|
||||||
/** Get the NOEFFECT message. */
|
/** Get the NOEFFECT message. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue