(flash, wall): Use player->comtail[] to find the raw message. The old
hack to find worked only when there were no spaces in flash's first argument. Closes #941740.
This commit is contained in:
parent
8b0c965a38
commit
566223c36b
1 changed files with 6 additions and 9 deletions
|
@ -47,7 +47,6 @@ flash(void)
|
||||||
struct natstr *to;
|
struct natstr *to;
|
||||||
char buf[1024]; /* UTF-8 */
|
char buf[1024]; /* UTF-8 */
|
||||||
int tocn;
|
int tocn;
|
||||||
char *sp; /* points into player->combuf[], UTF-8 */
|
|
||||||
|
|
||||||
us = getnatp(player->cnum);
|
us = getnatp(player->cnum);
|
||||||
if ((tocn = natarg(player->argp[1], "to which country? ")) < 0)
|
if ((tocn = natarg(player->argp[1], "to which country? ")) < 0)
|
||||||
|
@ -70,11 +69,10 @@ flash(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->argp[2]) {
|
if (player->comtail[2]) {
|
||||||
for (sp = player->combuf; *sp && *sp != ' '; ++sp) ;
|
|
||||||
for (++sp; *sp && *sp != ' '; ++sp) ;
|
|
||||||
buf[0] = ':';
|
buf[0] = ':';
|
||||||
strcpy(buf+1, sp);
|
buf[1] = ' ';
|
||||||
|
strcpy(buf+2, player->comtail[2]);
|
||||||
sendmessage(us, to, buf, 1);
|
sendmessage(us, to, buf, 1);
|
||||||
} else {
|
} else {
|
||||||
sendmessage(us, to, "...", 1);
|
sendmessage(us, to, "...", 1);
|
||||||
|
@ -93,13 +91,12 @@ wall(void)
|
||||||
{
|
{
|
||||||
struct natstr *us;
|
struct natstr *us;
|
||||||
char buf[1024]; /* UTF-8 */
|
char buf[1024]; /* UTF-8 */
|
||||||
char *sp; /* points into player->combuf[], UTF-8 */
|
|
||||||
|
|
||||||
us = getnatp(player->cnum);
|
us = getnatp(player->cnum);
|
||||||
if (player->argp[1]) {
|
if (player->comtail[1]) {
|
||||||
for (sp = player->combuf; *sp && *sp != ' '; ++sp) ;
|
|
||||||
buf[0] = ':';
|
buf[0] = ':';
|
||||||
strcpy(buf+1, sp);
|
buf[1] = ' ';
|
||||||
|
strcpy(buf+2, player->comtail[1]);
|
||||||
sendmessage(us, 0, buf, 1);
|
sendmessage(us, 0, buf, 1);
|
||||||
} else {
|
} else {
|
||||||
sendmessage(us, 0, "...", 1);
|
sendmessage(us, 0, "...", 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue