diff options
Diffstat (limited to 'LuaSL/src/LuaSL_utilities.c')
-rw-r--r-- | LuaSL/src/LuaSL_utilities.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_utilities.c b/LuaSL/src/LuaSL_utilities.c index d73c06d..ab4ea65 100644 --- a/LuaSL/src/LuaSL_utilities.c +++ b/LuaSL/src/LuaSL_utilities.c | |||
@@ -66,6 +66,24 @@ char *getDateTime(struct tm **nowOut, char *dateOut, time_t *timeOut) | |||
66 | return (dateTime); | 66 | return (dateTime); |
67 | } | 67 | } |
68 | 68 | ||
69 | void sendBack(gameGlobals *game, Ecore_Con_Client *client, const char *SID, const char *message) | ||
70 | { | ||
71 | char buf[PATH_MAX]; | ||
72 | |||
73 | sprintf(buf, "%s.%s\n", SID, message); | ||
74 | ecore_con_client_send(client, buf, strlen(buf)); | ||
75 | ecore_con_client_flush(client); | ||
76 | } | ||
77 | |||
78 | void sendForth(gameGlobals *game, const char *SID, const char *message) | ||
79 | { | ||
80 | char buf[PATH_MAX]; | ||
81 | |||
82 | snprintf(buf, sizeof(buf), "%s.%s\n", SID, message); | ||
83 | ecore_con_server_send(game->server, buf, strlen(buf)); | ||
84 | ecore_con_server_flush(game->server); | ||
85 | } | ||
86 | |||
69 | float timeDiff(struct timeval *now, struct timeval *then) | 87 | float timeDiff(struct timeval *now, struct timeval *then) |
70 | { | 88 | { |
71 | if (0 == gettimeofday(now, 0)) | 89 | if (0 == gettimeofday(now, 0)) |