.FI
Note that you can end a multi-line flash with either a '.' (period)
on a line all by itself, or by hitting ^D on a line by itself.
-Note also that all messages are truncated to 60 characters long!
.s1
If you do not wish to receive any flash messages from your friends,
then you can temporarily turn the feature off by typing "toggle flash".
.FI
Note that you can end a multi-line wall with either a '.' (period)
on a line all by itself, or by hitting ^D on a line by itself.
-Note also that all messages are truncated to 60 characters long!
.s1
If you do not wish to receive any broadcast messages from your allies,
then you can temporarily turn the feature off by typing "toggle flash".
/*
* Send flash message MESSAGE from US to TO.
- * MESSAGE is UTF-8. Long messages are broken into several parts.
- * A header identifying US is prepended to each part. The first
- * header is more verbose if ONESHOT.
+ * MESSAGE is UTF-8.
+ * Null TO broadcasts to all.
+ * A header identifying US is prepended to the message. It is more
+ * verbose if VERBOSE.
*/
int
-sendmessage(struct natstr *us, struct natstr *to, char *message, int oneshot)
+sendmessage(struct natstr *us, struct natstr *to, char *message, int verbose)
{
struct player *other;
struct tm *tm;
time_t now;
int sent = 0;
struct natstr *wto;
- char c;
- int pos;
-
- pos = ufindpfx(message, 60);
- c = message[pos];
- if (c)
- message[pos] = '\0';
time(&now);
tm = localtime(&now);
continue;
if (player == other)
continue;
- if (oneshot)
+ if (verbose)
if (to)
pr_flash(other, "FLASH from %s (#%d) @ %02d:%02d%s\n",
us->nat_cnam, us->nat_cnum, tm->tm_hour,
pr("%s is not accepting flashes\n", to->nat_cnam);
}
}
- if (c) {
- message[pos] = c;
- sendmessage(us, to, &message[pos], 0);
- }
return 0;
}