diff --git a/changelog b/changelog index 5c57701..69c8261 100644 --- a/changelog +++ b/changelog @@ -5,7 +5,16 @@ The Builder Academy builderacademy.net 9091 tbaMUD 3.52 +[Apr 14 2007] - Rumble + IP's only visible to LVL_GOD and above now for the paranoid people out there. +[Apr 13 2007] - Rumble + Finally made gemote actually work like emote and not just use socials. (thanks Fizban) + Reworded and standardized the trigedit attachment menu. + Numerous minor fixes taken from the latest CWG release. (thanks Zizazat) + Update to is_number to check for negative numbers. (thanks Kyle) + Update to isname to disallow abbreviated numbers. (thanks Sryth) [Apr 08 2007] - Rumble + Removed all usage of CAP(str causing a memory leak (thanks Kyle). Removed object type TRAP. Removed oasis_delete.h. Renamed variable wovel to vowel in ban.c. diff --git a/src/act.informative.c b/src/act.informative.c index 16fc2c6..a85b5d3 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -127,7 +127,7 @@ void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode) switch (mode) { case SHOW_OBJ_LONG: - /* hide objects starting with . from non-holylighted people Idea from Elaseth of TBA */ + /* Hide objects starting with . from non-holylighted people. - Elaseth */ if (*obj->description == '.' && (IS_NPC(ch) || !PRF_FLAGGED(ch, PRF_HOLYLIGHT))) return; @@ -344,10 +344,10 @@ void list_one_char(struct char_data *i, struct char_data *ch) return; } - if (IS_NPC(i)) - send_to_char(ch, "%s", CAP(strdup(i->player.short_descr))); + if (IS_NPC(i)) + send_to_char(ch, "%c%s", UPPER(*i->player.short_descr), i->player.short_descr + 1); else - send_to_char(ch, "%s%s%s", i->player.name, *GET_TITLE(i) ? " " : "", GET_TITLE(i)); + send_to_char(ch, "%s%s%s", i->player.name, *GET_TITLE(i) ? " " : "", GET_TITLE(i)); if (AFF_FLAGGED(i, AFF_INVISIBLE)) send_to_char(ch, " (invisible)"); diff --git a/src/act.social.c b/src/act.social.c index f44a442..5a980c8 100644 --- a/src/act.social.c +++ b/src/act.social.c @@ -246,7 +246,8 @@ ACMD(do_gmote) break; if ((act_nr = find_action(cmd)) < 0) { - send_to_char(ch, "That's not a social!\r\n"); + snprintf(buf, sizeof(buf), "Gossip: $n%s", argument); + act(buf, FALSE, ch, 0, vict, TO_GMOTE); return; } diff --git a/src/act.wizard.c b/src/act.wizard.c index ac3c3bf..dc946b5 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -1256,18 +1256,20 @@ ACMD(do_switch) void do_cheat(struct char_data *ch) { switch (GET_IDNUM(ch)) { - case 1: // IMP + case 1: // IMP GET_LEVEL(ch) = LVL_IMPL; break; - case 3: // Welcor - case 18: // Test + case 3: // Welcor + case 18: // Test GET_LEVEL(ch) = LVL_IMPL; break; - case 2: // Shamra - case 156: // Fizban + case 2: // Shamra + case 156: // Fizban GET_LEVEL(ch) = LVL_GRGOD; break; - case 7: // Rhade + case 7: // Rhade + case 19: // Amber + case 253: // Mordecai GET_LEVEL(ch) = LVL_GOD; break; default: @@ -2085,7 +2087,7 @@ ACMD(do_force) if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) send_to_char(ch, "%s", CONFIG_NOPERSON); else if (!IS_NPC(vict) && GET_LEVEL(ch) < LVL_GOD) - send_to_char(ch, "Only level GOD and above can force players.\r\n"); + send_to_char(ch, "You can not force players.\r\n"); else if (!IS_NPC(vict) && GET_LEVEL(ch) <= GET_LEVEL(vict)) send_to_char(ch, "No, no, no!\r\n"); else { @@ -4315,9 +4317,9 @@ ACMD(do_plist) strcpy(time_str, asctime(localtime(&player_table[i].last))); time_str[strlen(time_str) - 1] = '\0'; - len += snprintf(buf + len, sizeof(buf) - len, "[%3ld] (%2d) %-15s %s\r\n", + len += snprintf(buf + len, sizeof(buf) - len, "[%3ld] (%2d) %c%-15s %s\r\n", player_table[i].id, player_table[i].level, - CAP(strdup(player_table[i].name)), time_str); + UPPER(*player_table[i].name), player_table[i].name + 1, time_str); count++; } snprintf(buf + len, sizeof(buf) - len, "%s-----------------------------------------------%s\r\n" diff --git a/src/config.c b/src/config.c index c70eda4..9dcf268 100644 --- a/src/config.c +++ b/src/config.c @@ -97,7 +97,7 @@ int load_into_inventory = YES; /* "okay" etc. */ const char *OK = "Okay.\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"; /* You can define or not define TRACK_THOUGH_DOORS, depending on whether or not diff --git a/src/db.c b/src/db.c index 1266de3..c6c5659 100644 --- a/src/db.c +++ b/src/db.c @@ -2513,6 +2513,10 @@ void free_char(struct char_data *ch) if (ch->player.description) free(ch->player.description); + for (i = 0; i < NUM_HIST; i++) + if (GET_HISTORY(ch, i)) + free(GET_HISTORY(ch, i)); + /* free script proto list */ free_proto_script(ch, MOB_TRIGGER); @@ -2546,7 +2550,7 @@ void free_char(struct char_data *ch) ch->desc->character = NULL; /* find_char helper, when free_char is called with a blank character struct, - * ID is set to 0, and has not yet been added to the lookup table */ + * ID is set to 0, and has not yet been added to the lookup table. */ if (GET_ID(ch) != 0) remove_from_lookup_table(GET_ID(ch)); diff --git a/src/dg_olc.c b/src/dg_olc.c index dbbb221..8fc298f 100644 --- a/src/dg_olc.c +++ b/src/dg_olc.c @@ -1,6 +1,6 @@ /************************************************************************** * File: dg_olc.c Part of tbaMUD * -* Usage: this source file is used in extending Oasis OLC for trigedit. * +* Usage: This source file is used in extending Oasis OLC for trigedit. * * * * $Author: Chris Jacobsen/Mark A. Heilpern/egreen/Welcor $ * * $Date: 2004/10/11 12:07:00$ * @@ -82,8 +82,7 @@ ACMD(do_oasis_trigedit) /* Everyone but IMPLs can only edit zones they have been assigned.*/ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - mudlog(BRF, LVL_IMPL, TRUE, "OLC: %s tried to edit zone %d (allowed zone %d)", - GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch)); + /* Free the OLC structure. */ free(d->olc); d->olc = NULL; return; @@ -333,7 +332,7 @@ void trigedit_parse(struct descriptor_data *d, char *arg) break; default: write_to_output(d, "Invalid choice!\r\n"); - write_to_output(d, "Do you wish to save the trigger? : "); + write_to_output(d, "Do you wish to save your changes? : "); return; } break; @@ -720,7 +719,7 @@ void dg_script_menu(struct descriptor_data *d) OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_MAIN_MENU; clear_screen(d); - write_to_output(d, " Script Editor\r\n\r\n Trigger List:\r\n"); + write_to_output(d, " Triggers Attached:\r\n"); editscript = OLC_SCRIPT(d); @@ -739,9 +738,9 @@ void dg_script_menu(struct descriptor_data *d) write_to_output(d, " \r\n"); write_to_output(d, "\r\n" - " %sN%s) New trigger for this script\r\n" - " %sD%s) Delete a trigger in this script\r\n" - " %sX%s) Exit Script Editor\r\n\r\n" + " %sN%s) Attach trigger\r\n" + " %sX%s) Detach trigger\r\n" + " %sQ%s) Quit\r\n\r\n" " Enter choice :", grn, nrm, grn, nrm, grn, nrm); } @@ -754,7 +753,7 @@ int dg_script_edit_parse(struct descriptor_data *d, char *arg) switch(OLC_SCRIPT_EDIT_MODE(d)) { case SCRIPT_MAIN_MENU: switch(tolower(*arg)) { - case 'x': + case 'q': /* This was buggy. First we created a copy of a thing, but maintained * pointers to scripts, then if we altered the scripts, we freed the * pointers and added new ones to the OLC_THING. If we then choose NOT @@ -776,7 +775,7 @@ int dg_script_edit_parse(struct descriptor_data *d, char *arg) write_to_output(d, "\r\nPlease enter position, vnum (ex: 1, 200):"); OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_NEW_TRIGGER; break; - case 'd': + case 'x': write_to_output(d, " Which entry should be deleted? 0 to abort :"); OLC_SCRIPT_EDIT_MODE(d) = SCRIPT_DEL_TRIGGER; break; diff --git a/src/dg_triggers.c b/src/dg_triggers.c index 338a2f8..912f7ab 100644 --- a/src/dg_triggers.c +++ b/src/dg_triggers.c @@ -678,10 +678,8 @@ int get_otrigger(obj_data *obj, char_data *actor) if (TRIGGER_CHECK(t, OTRIG_GET) && (rand_number(1, 100) <= GET_TRIG_NARG(t))) { ADD_UID_VAR(buf, t, actor, "actor", 0); ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a get to take place, if - * a) the actor is killed (the mud would choke on obj_to_char). - * b) the object is purged. - */ + /* Don't allow a get to take place, if the actor is killed (the mud + * would choke on obj_to_char) or the object is purged. */ if (DEAD(actor) || !obj) return 0; else @@ -767,9 +765,7 @@ int wear_otrigger(obj_data *obj, char_data *actor, int where) if (TRIGGER_CHECK(t, OTRIG_WEAR)) { ADD_UID_VAR(buf, t, actor, "actor", 0); ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a wear to take place, if - * the object is purged. - */ + /* Don't allow a wear to take place, if the object is purged. */ if (!obj) return 0; else @@ -793,9 +789,7 @@ int remove_otrigger(obj_data *obj, char_data *actor) if (TRIGGER_CHECK(t, OTRIG_REMOVE)) { ADD_UID_VAR(buf, t, actor, "actor", 0); ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a remove to take place, if - * the object is purged. - */ + /* Don't allow a remove to take place, if the object is purged. */ if (!obj) return 0; else @@ -819,9 +813,7 @@ int drop_otrigger(obj_data *obj, char_data *actor) if (TRIGGER_CHECK(t, OTRIG_DROP) && (rand_number(1, 100) <= GET_TRIG_NARG(t))) { ADD_UID_VAR(buf, t, actor, "actor", 0); ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a drop to take place, if - * the object is purged (nothing to drop). - */ + /* Don't allow a drop to take place, if the object is purged. */ if (!obj) return 0; else @@ -846,10 +838,8 @@ int give_otrigger(obj_data *obj, char_data *actor, char_data *victim) ADD_UID_VAR(buf, t, actor, "actor", 0); ADD_UID_VAR(buf, t, victim, "victim", 0); ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a give to take place, if - * a) the object is purged. - * b) the object is not carried by the giver. - */ + /* Don't allow a give to take place, if the object is purged or the + * object is not carried by the giver. */ if (!obj || obj->carried_by != actor) return 0; else @@ -966,9 +956,7 @@ int consume_otrigger(obj_data *obj, char_data *actor, int cmd) break; } ret_val = script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW); - /* don't allow a wear to take place, if - * the object is purged. - */ + /* Don't allow a wear to take place, if the object is purged. */ if (!obj) return 0; else diff --git a/src/handler.c b/src/handler.c index b1102c5..4ebd29f 100644 --- a/src/handler.c +++ b/src/handler.c @@ -96,17 +96,18 @@ int isname(const char *str, const char *namelist) newlist = strdup(namelist); /* make a copy since strtok 'modifies' strings */ for(curtok = strtok(newlist, WHITESPACE); curtok; curtok = strtok(NULL, WHITESPACE)) - if(curtok && is_abbrev(str, curtok)) - { - free(newlist); - return 1; - } - free(newlist); - return 0; + if(curtok && is_abbrev(str, curtok)) { + /* Don't allow abbreviated numbers. - Sryth */ + if (isdigit(*str) && (atoi(str) != atoi(curtok))) + return 0; + free(newlist); + return 1; + } + free(newlist); + return 0; } -void affect_modify(struct char_data *ch, byte loc, sbyte mod, - bitvector_t bitv, bool add) +void affect_modify(struct char_data *ch, byte loc, sbyte mod, bitvector_t bitv, bool add) { if (add) SET_BIT(AFF_FLAGS(ch), bitv); diff --git a/src/hedit.c b/src/hedit.c index 059ce6b..2916403 100644 --- a/src/hedit.c +++ b/src/hedit.c @@ -251,8 +251,8 @@ void hedit_disp_menu(struct descriptor_data *d) write_to_output(d, "-- Help file editor\r\n" - "1) Keywords : %s\r\n" - "2) Entry :\r\n%s" + "@g1@n) Keywords : @y%s@n\r\n" + "@g2@n) Entry :\r\n@y%s@n" "@g3@n) Min Level : @c%d@n\r\n" "@gQ@n) Quit\r\n" "Enter choice : ", diff --git a/src/interpreter.c b/src/interpreter.c index 98901ed..3ede339 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -870,6 +870,10 @@ int search_block(char *arg, const char **list, int exact) int is_number(const char *str) { + if(*str == '-') + str++; + if(!*str) + return (0); while (*str) if (!isdigit(*(str++))) return (0); @@ -883,7 +887,6 @@ void skip_spaces(char **string) for (; **string && isspace(**string); (*string)++); } - /* Given a string, change all instances of double dollar signs ($$) to single * dollar signs ($). When strings come in, all $'s are changed to $$'s to * avoid having users be able to crash the system if the inputted string is @@ -951,8 +954,8 @@ char *one_argument(char *argument, char *first_arg) return (argument); } -/* one_word is like any_one_arg, except that words in quotes ("") are considered - * one word. No longer ignores fill words. -dak, 6 Jan 2003. */ +/* one_word is like any_one_arg, except that words in quotes ("") are + * considered one word. No longer ignores fill words. -dak */ char *one_word(char *argument, char *first_arg) { skip_spaces(&argument); @@ -975,7 +978,7 @@ char *one_word(char *argument, char *first_arg) return (argument); } -/* same as one_argument except that it doesn't ignore fill words */ +/* Same as one_argument except that it doesn't ignore fill words. */ char *any_one_arg(char *argument, char *first_arg) { skip_spaces(&argument); @@ -1075,8 +1078,8 @@ int special(struct char_data *ch, int cmd, char *arg) return (0); } -/* Stuff for controlling the non-playing sockets (get name, pwd etc). */ -/* This function needs to die. */ +/* Stuff for controlling the non-playing sockets (get name, pwd etc). + * This function needs to die. */ int _parse_name(char *arg, char *name) { int i; @@ -1213,7 +1216,12 @@ int perform_dupe_check(struct descriptor_data *d) case RECON: write_to_output(d, "Reconnecting.\r\n"); act("$n has reconnected.", TRUE, d->character, 0, 0, TO_ROOM); - mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s [%s] has reconnected.", GET_NAME(d->character), d->host); + + if (GET_INVIS_LEV(d->character)) + mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s has reconnected. (invis %d)", GET_NAME(d->character), GET_INVIS_LEV(d->character)); + else + mudlog(BRF, LVL_IMMORT, TRUE, "%s has reconnected.", GET_NAME(d->character)); + if (has_mail(GET_IDNUM(d->character))) write_to_output(d, "You have mail waiting.\r\n"); break; @@ -1350,16 +1358,14 @@ void nanny(struct descriptor_data *d, char *arg) GET_PFILEPOS(d->character) = player_i; if (PLR_FLAGGED(d->character, PLR_DELETED)) { - /* make sure old files are removed so the new player doesn't get - the deleted player's equipment (this should probably be a - stock behavior) - */ + /* Make sure old files are removed so the new player doesn't get the + * deleted player's equipment. */ if ((player_i = get_ptable_by_name(tmp_name)) >= 0) remove_player(player_i); - /* We get a false positive from the original deleted character. */ + /* We get a false positive from the original deleted character. */ free_char(d->character); - /* Check for multiple creations... */ + /* Check for multiple creations. */ if (!valid_name(tmp_name)) { write_to_output(d, "Invalid name, please try another.\r\nName: "); return; @@ -1488,12 +1494,9 @@ void nanny(struct descriptor_data *d, char *arg) write_to_output(d, "%s", motd); if (GET_INVIS_LEV(d->character)) - mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, - "%s [%s] has connected. (invis %d)", GET_NAME(d->character), d->host, - GET_INVIS_LEV(d->character)); + mudlog(BRF, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE, "%s has connected. (invis %d)", GET_NAME(d->character), GET_INVIS_LEV(d->character)); else - mudlog(BRF, LVL_IMMORT, TRUE, - "%s [%s] has connected.", GET_NAME(d->character), d->host); + mudlog(BRF, LVL_IMMORT, TRUE, "%s has connected.", GET_NAME(d->character)); if (load_result) { write_to_output(d, "\r\n\r\n\007\007\007" @@ -1575,7 +1578,11 @@ void nanny(struct descriptor_data *d, char *arg) } else GET_CLASS(d->character) = load_result; - if (GET_PFILEPOS(d->character) < 0) + if (d->olc) { + free(d->olc); + d->olc = NULL; + } + if (GET_PFILEPOS(d->character) < 0) GET_PFILEPOS(d->character) = create_entry(GET_PC_NAME(d->character)); /* Now GET_NAME() will work properly. */ init_char(d->character); @@ -1710,18 +1717,17 @@ void nanny(struct descriptor_data *d, char *arg) SET_BIT(PLR_FLAGS(d->character), PLR_DELETED); save_char(d->character); Crash_delete_file(GET_NAME(d->character)); - /* If the selfdelete_fastwipe flag is set (in config.c), remove all - the player's immediately */ - if (selfdelete_fastwipe) - if ((player_i = get_ptable_by_name(GET_NAME(d->character))) >= 0) { - SET_BIT(player_table[player_i].flags, PINDEX_SELFDELETE); - remove_player(player_i); - } + /* If the selfdelete_fastwipe flag is set (in config.c), remove all the + * player's immediately. */ + if (selfdelete_fastwipe) + if ((player_i = get_ptable_by_name(GET_NAME(d->character))) >= 0) { + SET_BIT(player_table[player_i].flags, PINDEX_SELFDELETE); + remove_player(player_i); + } delete_aliases(GET_NAME(d->character)); delete_variables(GET_NAME(d->character)); - write_to_output(d, "Character '%s' deleted!\r\n" - "Goodbye.\r\n", GET_NAME(d->character)); + write_to_output(d, "Character '%s' deleted! Goodbye.\r\n", GET_NAME(d->character)); mudlog(NRM, LVL_GOD, TRUE, "%s (lev %d) has self-deleted.", GET_NAME(d->character), GET_LEVEL(d->character)); STATE(d) = CON_CLOSE; return; @@ -1731,9 +1737,8 @@ void nanny(struct descriptor_data *d, char *arg) } break; - /* It is possible, if enough pulses are missed, to kick someone off while - * they are at the password prompt. We'll just defer to let the game_loop() - * axe them. */ + /* It is possible, if enough pulses are missed, to kick someone off while they + * are at the password prompt. We'll let the game_loop()axe them. */ case CON_CLOSE: break; diff --git a/src/limits.c b/src/limits.c index 7dea9b2..085cd2d 100644 --- a/src/limits.c +++ b/src/limits.c @@ -403,7 +403,8 @@ void point_update(void) if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL) check_idling(i); else - (i->char_specials.timer)++;} + (i->char_specials.timer)++; + } } /* objects */ diff --git a/src/medit.c b/src/medit.c index 51c71a0..fbf46bf 100644 --- a/src/medit.c +++ b/src/medit.c @@ -123,8 +123,7 @@ ACMD(do_oasis_medit) /* Everyone but IMPLs can only edit zones they have been assigned. */ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - mudlog(BRF, LVL_IMPL, TRUE, "OLC: %s tried to edit zone %d allowed zone %d", - GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch)); + /* Free the OLC structure. */ free(d->olc); d->olc = NULL; return; diff --git a/src/oasis.c b/src/oasis.c index 480a547..b6b4311 100644 --- a/src/oasis.c +++ b/src/oasis.c @@ -264,8 +264,15 @@ int can_edit_zone(struct char_data *ch, zone_rnum rnum) void send_cannot_edit(struct char_data *ch, zone_vnum zone) { - send_to_char(ch, "You do not have permission to edit zone %d.", zone); - if (GET_OLC_ZONE(ch) != NOWHERE) - send_to_char(ch, " Try zone %d.", GET_OLC_ZONE(ch)); - send_to_char(ch, "\r\n"); + char buf[MAX_STRING_LENGTH]; + + if (GET_OLC_ZONE(ch) != NOWHERE) { + send_to_char(ch, "You do not have permission to edit zone %d. Try zone %d.\r\n", zone, GET_OLC_ZONE(ch)); + sprintf(buf, "OLC: %s tried to edit zone %d (allowed zone %d).", GET_NAME(ch), zone, GET_OLC_ZONE(ch)); + } else { + send_to_char(ch, "You do not have permission to edit zone %d.\r\n", GET_OLC_ZONE(ch)); + sprintf(buf, "OLC: %s tried to edit zone %d.", GET_NAME(ch), zone); + } + mudlog(BRF, LVL_IMPL, TRUE, buf); } + diff --git a/src/oedit.c b/src/oedit.c index f5b18f2..2920759 100644 --- a/src/oedit.c +++ b/src/oedit.c @@ -139,10 +139,7 @@ ACMD(do_oasis_oedit) /* Everyone but IMPLs can only edit zones they have been assigned. */ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - mudlog(BRF, LVL_IMPL, TRUE, "OLC: %s tried to edit zone %d allowed zone %d", - GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch)); - - /* Free the descriptor's OLC structure. */ + /* Free the OLC structure. */ free(d->olc); d->olc = NULL; return; @@ -447,7 +444,7 @@ void oedit_disp_val1_menu(struct descriptor_data *d) break; case ITEM_DRINKCON: case ITEM_FOUNTAIN: - write_to_output(d, "Max drink units (-1 for unlimited) : "); + write_to_output(d, "Max drink units : "); break; case ITEM_FOOD: write_to_output(d, "Hours to fill stomach : "); @@ -491,7 +488,7 @@ void oedit_disp_val2_menu(struct descriptor_data *d) break; case ITEM_DRINKCON: case ITEM_FOUNTAIN: - write_to_output(d, "Initial drink units : "); + write_to_output(d, "Initial drink units (-1 for unlimited) : "); break; default: oedit_disp_menu(d); diff --git a/src/redit.c b/src/redit.c index 1dcd10a..4451f7a 100644 --- a/src/redit.c +++ b/src/redit.c @@ -113,9 +113,7 @@ ACMD(do_oasis_redit) /* Make sure the builder is allowed to modify this zone. */ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - mudlog(BRF, LVL_IMPL, TRUE, "OLC: %s tried to edit zone %d allowed zone %d", - GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch)); - + /* Free the OLC structure. */ free(d->olc); d->olc = NULL; return; diff --git a/src/sedit.c b/src/sedit.c index d36da27..5ed859f 100644 --- a/src/sedit.c +++ b/src/sedit.c @@ -135,7 +135,6 @@ ACMD(do_oasis_sedit) /* Everyone but IMPLs can only edit zones they have been assigned. */ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - /* Free the OLC structure. */ free(d->olc); d->olc = NULL; @@ -465,7 +464,7 @@ void sedit_parse(struct descriptor_data *d, char *arg) cleanup_olc(d, CLEANUP_ALL); return; default: - write_to_output(d, "Invalid choice!\r\nDo you wish to save the shop? : "); + write_to_output(d, "Invalid choice!\r\nDo you wish to save your changes? : "); return; } break; diff --git a/src/spells.c b/src/spells.c index 3b19e8f..03fea14 100644 --- a/src/spells.c +++ b/src/spells.c @@ -1,6 +1,6 @@ /************************************************************************** * File: spells.c Part of tbaMUD * -* Usage: Implementation of "manual spells". * +* Usage: Implementation of "manual spells." * * * * All rights reserved. See license for complete information. * * * @@ -217,7 +217,7 @@ ASPELL(spell_locate_object) if (!isname_obj(name, i->name)) continue; - send_to_char(ch, "%s", CAP(strdup(i->short_description))); + send_to_char(ch, "%c%s", UPPER(*i->short_description), i->short_description + 1); if (i->carried_by) send_to_char(ch, " is being carried by %s.\r\n", PERS(i->carried_by, ch)); diff --git a/src/structs.h b/src/structs.h index 071281d..6d501de 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1048,7 +1048,7 @@ struct game_data { int no_mort_to_immort; /* Prevent mortals leveling to imms? */ char *OK; /* When player receives 'Okay.' text. */ - char *NOPERSON; /* 'No-one by that name here.' */ + char *NOPERSON; /* 'No one by that name here.' */ char *NOEFFECT; /* 'Nothing seems to happen.' */ }; diff --git a/src/utils.h b/src/utils.h index 5f0b0b6..938454d 100644 --- a/src/utils.h +++ b/src/utils.h @@ -31,7 +31,7 @@ int get_filename(char *filename, size_t fbufsize, int mode, const char *orig_nam time_t mud_time_to_secs(struct time_info_data *now); struct time_info_data *age(struct char_data *ch); int num_pc_in_room(struct room_data *room); -void core_dump_real(const char *, int); +void core_dump_real(const char *who, int line); int count_color_chars(char *string); int room_is_dark(room_rnum room); int levenshtein_distance(char *s1, char *s2); diff --git a/src/zedit.c b/src/zedit.c index 2454e2e..6d23ad6 100644 --- a/src/zedit.c +++ b/src/zedit.c @@ -143,8 +143,7 @@ ACMD(do_oasis_zedit) /* Everyone but IMPLs can only edit zones they have been assigned. */ if (!can_edit_zone(ch, OLC_ZNUM(d))) { send_cannot_edit(ch, zone_table[OLC_ZNUM(d)].number); - mudlog(BRF, LVL_IMPL, TRUE, "OLC: %s tried to edit zone %d allowed zone %d", - GET_NAME(ch), zone_table[OLC_ZNUM(d)].number, GET_OLC_ZONE(ch)); + /* Free the OLC structure. */ free(d->olc); d->olc = NULL; return;