src/network/network_data.cpp
changeset 10310 ca2eb5811a07
parent 10208 72c00af5c95d
equal deleted inserted replaced
10309:a3519caf1001 10310:ca2eb5811a07
    51 	if (c.callback == _callback_table_count) {
    51 	if (c.callback == _callback_table_count) {
    52 		DEBUG(net, 0, "Unknown callback. (Pointer: %p) No callback sent", callback);
    52 		DEBUG(net, 0, "Unknown callback. (Pointer: %p) No callback sent", callback);
    53 		c.callback = 0; // _callback_table[0] == NULL
    53 		c.callback = 0; // _callback_table[0] == NULL
    54 	}
    54 	}
    55 
    55 
    56 	ttd_strlcpy(c.text, (_cmd_text != NULL) ? _cmd_text : "", lengthof(c.text));
    56 	strecpy(c.text, (_cmd_text != NULL) ? _cmd_text : "", lastof(c.text));
    57 
    57 
    58 	if (_network_server) {
    58 	if (_network_server) {
    59 		/* If we are the server, we queue the command in our 'special' queue.
    59 		/* If we are the server, we queue the command in our 'special' queue.
    60 		 *   In theory, we could execute the command right away, but then the
    60 		 *   In theory, we could execute the command right away, but then the
    61 		 *   client on the server can do everything 1 tick faster than others.
    61 		 *   client on the server can do everything 1 tick faster than others.