Some small formatting changes, and some stray @ symbols cleaned up

This commit is contained in:
Vatiken 2012-03-24 14:41:24 +00:00
parent 6a342723ed
commit 5c317f6863
10 changed files with 17 additions and 22 deletions

View file

@ -32,7 +32,7 @@ ACMD(do_say)
char buf[MAX_INPUT_LENGTH + 14], *msg; char buf[MAX_INPUT_LENGTH + 14], *msg;
struct char_data *vict; struct char_data *vict;
snprintf(buf, sizeof(buf), "$n\tn says, '%s\tn'", argument); snprintf(buf, sizeof(buf), "$n\tn says, '%s'", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG); msg = act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);
for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room) for (vict = world[IN_ROOM(ch)].people; vict; vict = vict->next_in_room)
@ -42,7 +42,7 @@ ACMD(do_say)
if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT)) if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
send_to_char(ch, "%s", CONFIG_OK); send_to_char(ch, "%s", CONFIG_OK);
else { else {
sprintf(buf, "You say, '%s\tn'", argument); sprintf(buf, "You say, '%s'", argument);
msg = act(buf, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG); msg = act(buf, FALSE, ch, 0, 0, TO_CHAR | DG_NO_TRIG);
add_history(ch, msg, HIST_SAY); add_history(ch, msg, HIST_SAY);
} }

View file

@ -1341,7 +1341,7 @@ ACMD(do_who)
send_to_char(ch, "%d characters displayed.\r\n", num_can_see); send_to_char(ch, "%d characters displayed.\r\n", num_can_see);
if (IS_HAPPYHOUR > 0){ if (IS_HAPPYHOUR > 0){
send_to_char(ch, "It's a Happy Hour! Type @Rhappyhour@W to see the current bonuses.\r\n"); send_to_char(ch, "It's a Happy Hour! Type \tRhappyhour\tW to see the current bonuses.\r\n");
} }
} }
@ -2559,7 +2559,7 @@ ACMD(do_areas)
len += tmp_len; len += tmp_len;
if (overlap_shown) { if (overlap_shown) {
tmp_len = snprintf(buf+len, sizeof(buf)-len, "Areas shown in @rred@n may have some creatures outside the specified range.\r\n"); tmp_len = snprintf(buf+len, sizeof(buf)-len, "Areas shown in \trred\tn may have some creatures outside the specified range.\r\n");
len += tmp_len; len += tmp_len;
} }

View file

@ -972,7 +972,7 @@ ACMD(do_happyhour)
" %shappyhour qp <num> %s- set qp percentage gain\r\n" " %shappyhour qp <num> %s- set qp percentage gain\r\n"
" %shappyhour exp <num> %s- set exp percentage gain\r\n" " %shappyhour exp <num> %s- set exp percentage gain\r\n"
" %shappyhour gold <num> %s- set gold percentage gain\r\n" " %shappyhour gold <num> %s- set gold percentage gain\r\n"
" @yhappyhour default @w- sets a default setting for happyhour\r\n\r\n" " \tyhappyhour default \tw- sets a default setting for happyhour\r\n\r\n"
"Configure the happyhour settings and start a happyhour.\r\n" "Configure the happyhour settings and start a happyhour.\r\n"
"Currently 1 hour IRL = %d ticks\r\n" "Currently 1 hour IRL = %d ticks\r\n"
"If no number is specified, 0 (off) is assumed.\r\nThe command \tyhappyhour time\tn will therefore stop the happyhour timer.\r\n", "If no number is specified, 0 (off) is assumed.\r\nThe command \tyhappyhour time\tn will therefore stop the happyhour timer.\r\n",

View file

@ -1828,7 +1828,7 @@ struct last_entry *find_llog_entry(int punique, long idnum) {
FILE *fp; FILE *fp;
struct last_entry mlast; struct last_entry mlast;
struct last_entry *llast; struct last_entry *llast;
int size, recs, tmp, i; int size, recs, tmp;
if(!(fp=fopen(LAST_FILE,"r"))) { if(!(fp=fopen(LAST_FILE,"r"))) {
log("Error opening last_file for reading, will create."); log("Error opening last_file for reading, will create.");
@ -1843,7 +1843,8 @@ struct last_entry *find_llog_entry(int punique, long idnum) {
* do (like searching for the last shutdown/etc..) */ * do (like searching for the last shutdown/etc..) */
for(tmp=recs-1; tmp > 0; tmp--) { for(tmp=recs-1; tmp > 0; tmp--) {
fseek(fp,-1*(sizeof(struct last_entry)),SEEK_CUR); fseek(fp,-1*(sizeof(struct last_entry)),SEEK_CUR);
i = fread(&mlast,sizeof(struct last_entry),1,fp); if (fread(&mlast,sizeof(struct last_entry),1,fp) != 1)
return NULL;
/*another one to keep that stepback */ /*another one to keep that stepback */
fseek(fp,-1*(sizeof(struct last_entry)),SEEK_CUR); fseek(fp,-1*(sizeof(struct last_entry)),SEEK_CUR);
@ -2173,7 +2174,7 @@ ACMD(do_wiznet)
delete_doubledollar(argument); delete_doubledollar(argument);
if (!*argument) { if (!*argument) {
send_to_char(ch, "Usage: wiznet [ #<level> ] [<text> | *<emotetext> | @@ ]\r\n"); send_to_char(ch, "Usage: wiznet [ #<level> ] [<text> | *<emotetext> | @ ]\r\n");
return; return;
} }
switch (*argument) { switch (*argument) {
@ -4256,7 +4257,7 @@ ACMD(do_zpurge)
/** Used to read and gather a bit of information about external log files while /** Used to read and gather a bit of information about external log files while
* in game. * in game.
* Makes use of the '@' color codes in the file status information. * Makes use of the '\t' color codes in the file status information.
* Some of the methods used are a bit wasteful (reading through the file * Some of the methods used are a bit wasteful (reading through the file
* multiple times to gather diagnostic information), but it is * multiple times to gather diagnostic information), but it is
* assumed that the files read with this function will never be very large. * assumed that the files read with this function will never be very large.
@ -4547,7 +4548,7 @@ ACMD(do_plist)
} }
len = 0; len = 0;
len += snprintf(buf + len, sizeof(buf) - len, "@W[ Id] (Lv) Name Last@n\r\n" len += snprintf(buf + len, sizeof(buf) - len, "\tW[ Id] (Lv) Name Last\tn\r\n"
"%s-------------------------------------%s\r\n", CCCYN(ch, C_NRM), "%s-------------------------------------%s\r\n", CCCYN(ch, C_NRM),
CCNRM(ch, C_NRM)); CCNRM(ch, C_NRM));

View file

@ -126,8 +126,6 @@ struct happyhour happy_data = {0,0,0,0};
/* declaration of local (file scope) variables */ /* declaration of local (file scope) variables */
static int converting = FALSE; static int converting = FALSE;
/* Local (file scope) utility functions */ /* Local (file scope) utility functions */
static int check_bitvector_names(bitvector_t bits, size_t namecount, const char *whatami, const char *whatbits); static int check_bitvector_names(bitvector_t bits, size_t namecount, const char *whatami, const char *whatbits);
static int check_object_spell_number(struct obj_data *obj, int val); static int check_object_spell_number(struct obj_data *obj, int val);
@ -222,7 +220,6 @@ void boot_social_messages(void)
for (;;) { for (;;) {
i = fscanf(fl, " %s ", next_soc); i = fscanf(fl, " %s ", next_soc);
if (*next_soc == '$') break; if (*next_soc == '$') break;
if (CONFIG_NEW_SOCIALS == TRUE) { if (CONFIG_NEW_SOCIALS == TRUE) {
if (fscanf(fl, " %s %d %d %d %d \n", if (fscanf(fl, " %s %d %d %d %d \n",
sorted, &hide, &min_char_pos, &min_pos, &min_lvl) != 5) { sorted, &hide, &min_char_pos, &min_pos, &min_lvl) != 5) {
@ -3212,7 +3209,7 @@ void free_char(struct char_data *ch)
} }
free_list(ch->events); free_list(ch->events);
} }
/* new version of free_followers take the followers pointer as arg */ /* new version of free_followers take the followers pointer as arg */
free_followers(ch->followers); free_followers(ch->followers);

View file

@ -588,7 +588,7 @@ static void dam_message(int dam, struct char_data *ch, struct char_data *victim,
/* damage message to damagee */ /* damage message to damagee */
if (GET_LEVEL(victim) >= LVL_IMMORT) if (GET_LEVEL(victim) >= LVL_IMMORT)
send_to_char(victim, "@R(%d)", dam); send_to_char(victim, "\tR(%d)", dam);
buf = replace_string(dam_weapons[msgnum].to_victim, buf = replace_string(dam_weapons[msgnum].to_victim,
attack_hit_text[w_type].singular, attack_hit_text[w_type].plural); attack_hit_text[w_type].singular, attack_hit_text[w_type].plural);
act(buf, FALSE, ch, NULL, victim, TO_VICT | TO_SLEEP); act(buf, FALSE, ch, NULL, victim, TO_VICT | TO_SLEEP);

View file

@ -66,7 +66,6 @@ static int export_mobile_record(mob_vnum mvnum, struct char_data *mob, FILE *fd)
static void export_script_save_to_disk(FILE *fp, void *item, int type); static void export_script_save_to_disk(FILE *fp, void *item, int type);
static int export_info_file(zone_rnum zrnum); static int export_info_file(zone_rnum zrnum);
int genolc_checkstring(struct descriptor_data *d, char *arg) int genolc_checkstring(struct descriptor_data *d, char *arg)
{ {
smash_tilde(arg); smash_tilde(arg);

View file

@ -537,9 +537,9 @@ int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned
if (*flow) { if (*flow) {
start = flow; start = flow;
while (*flow && !strchr("\n\r\f\t\v .?!", *flow)) { while (*flow && !strchr("\n\r\f\v .?!", *flow)) {
if (*flow == '@') { if (*flow == '\t') {
if (*(flow + 1) == '@') if (*(flow + 1) == '\t')
color_chars++; color_chars++;
else else
color_chars += 2; color_chars += 2;

View file

@ -483,7 +483,6 @@ int cast_spell(struct char_data *ch, struct char_data *tch,
return (call_magic(ch, tch, tobj, spellnum, GET_LEVEL(ch), CAST_SPELL)); return (call_magic(ch, tch, tobj, spellnum, GET_LEVEL(ch), CAST_SPELL));
} }
/* do_cast is the entry point for PC-casted spells. It parses the arguments, /* do_cast is the entry point for PC-casted spells. It parses the arguments,
* determines the spell number and finds a target, throws the die to see if * determines the spell number and finds a target, throws the die to see if
* the spell can be cast, checks for sufficient mana and subtracts it, and * the spell can be cast, checks for sufficient mana and subtracts it, and

View file

@ -92,7 +92,7 @@ char *CAP(char *txt)
/* Skip all preceeding color codes and ANSI codes */ /* Skip all preceeding color codes and ANSI codes */
while ((*p == '\t' && *(p+1)) || (*p == '\x1B' && *(p+1) == '[')) { while ((*p == '\t' && *(p+1)) || (*p == '\x1B' && *(p+1) == '[')) {
if (*p == '\t') p += 2; /* Skip @ sign and color letter/number */ if (*p == '\t') p += 2; /* Skip \t sign and color letter/number */
else { else {
p += 2; /* Skip the CSI section of the ANSI code */ p += 2; /* Skip the CSI section of the ANSI code */
while (*p && !isalpha(*p)) p++; /* Skip until a 'letter' is found */ while (*p && !isalpha(*p)) p++; /* Skip until a 'letter' is found */
@ -1499,6 +1499,5 @@ char * convert_from_tabs(char * string)
strcpy(buf, string); strcpy(buf, string);
parse_tab(buf); parse_tab(buf);
return(buf); return(buf);
} }