/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* Ken Stevens, 1995
* Steve McClure, 1998
* Ron Koenderink, 2005
- * Markus Armbruster, 2004-2011
+ * Markus Armbruster, 2004-2013
*/
#include <config.h>
static int sendmessage(struct natstr *, char *, int);
int
-flash(void)
+c_flash(void)
{
struct natstr *us;
struct natstr *to;
}
int
-wall(void)
+c_wall(void)
{
return chat(NULL, player->comtail[1]);
}
/*
- * Send flash message(s) from US to TO.
- * Null TO broadcasts to all.
- * MESSAGE is UTF-8. If it is null, prompt for messages interactively.
+ * Send flash message(s) to @to.
+ * Null @to broadcasts to all.
+ * @message is UTF-8. If it is null, prompt for messages interactively.
* Return RET_OK.
*/
static int
}
/*
- * Send flash message MESSAGE from US to TO.
- * MESSAGE is UTF-8.
- * Null TO broadcasts to all.
- * A header identifying US is prepended to the message. It is more
- * verbose if VERBOSE.
+ * Send flash message @message to @to.
+ * @message is UTF-8.
+ * Null @to broadcasts to all.
+ * A header identifying the player is prepended to the message. It is
+ * more verbose if @verbose.
*/
static int
sendmessage(struct natstr *to, char *message, int verbose)
if (verbose)
if (to)
- pr_flash(other, "FLASH from %s (#%d) @ %02d:%02d%s\n",
- cname(player->cnum), player->cnum, tm->tm_hour,
- tm->tm_min, message);
+ pr_flash(other, "FLASH from %s @ %02d:%02d%s\n",
+ prnatid(player->cnum),
+ tm->tm_hour, tm->tm_min, message);
else
- pr_flash(other, "BROADCAST from %s (#%d) @ %02d:%02d%s\n",
- cname(player->cnum), player->cnum, tm->tm_hour,
- tm->tm_min, message);
+ pr_flash(other, "BROADCAST from %s @ %02d:%02d%s\n",
+ prnatid(player->cnum),
+ tm->tm_hour, tm->tm_min, message);
else
- pr_flash(other, "%s (#%d): %s\n",
- cname(player->cnum), player->cnum, message);
+ pr_flash(other, "%s: %s\n",
+ prnatid(player->cnum), message);
sent++;
}