mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
include seed in chat messages to make sure they're unique
This commit is contained in:
parent
2ce097629f
commit
1e6ff9b33c
1 changed files with 4 additions and 2 deletions
|
@ -1874,6 +1874,7 @@ chatsTimerFired( gpointer data )
|
|||
|
||||
if ( COMMS_RELAYSTATE_ALLCONNECTED == globals->commsRelayState
|
||||
&& 3 > globals->nChatsSent ) {
|
||||
XWGame* game = &globals->cGlobals.game;
|
||||
XP_UCHAR msg[128];
|
||||
struct tm* timp;
|
||||
struct timeval tv;
|
||||
|
@ -1882,10 +1883,11 @@ chatsTimerFired( gpointer data )
|
|||
gettimeofday( &tv, &tz );
|
||||
timp = localtime( &tv.tv_sec );
|
||||
|
||||
snprintf( msg, sizeof(msg), "Saying hi via chat at %.2d:%.2d:%.2d",
|
||||
snprintf( msg, sizeof(msg), "%x: Saying hi via chat at %.2d:%.2d:%.2d",
|
||||
comms_getChannelSeed( game->comms ),
|
||||
timp->tm_hour, timp->tm_min, timp->tm_sec );
|
||||
XP_LOGF( "%s: sending \"%s\"", __func__, msg );
|
||||
server_sendChat( globals->cGlobals.game.server, msg );
|
||||
server_sendChat( game->server, msg );
|
||||
++globals->nChatsSent;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue