aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_utilities.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-12 00:08:53 +1000
committerDavid Walter Seikel2012-02-12 00:08:53 +1000
commitf43dc63f9820ba0d3ff30efd2c45bf6dc5d2af51 (patch)
treeb971c5d251b27136bd95022a6e4a493b8b9448e5 /LuaSL/src/LuaSL_utilities.c
parentSID is now full path to the LSL file. Still need to change it to the UUID of... (diff)
downloadSledjHamr-f43dc63f9820ba0d3ff30efd2c45bf6dc5d2af51.zip
SledjHamr-f43dc63f9820ba0d3ff30efd2c45bf6dc5d2af51.tar.gz
SledjHamr-f43dc63f9820ba0d3ff30efd2c45bf6dc5d2af51.tar.bz2
SledjHamr-f43dc63f9820ba0d3ff30efd2c45bf6dc5d2af51.tar.xz
New sendBack and sendForth global functions.
Diffstat (limited to 'LuaSL/src/LuaSL_utilities.c')
-rw-r--r--LuaSL/src/LuaSL_utilities.c18
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
69void 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
78void 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
69float timeDiff(struct timeval *now, struct timeval *then) 87float timeDiff(struct timeval *now, struct timeval *then)
70{ 88{
71 if (0 == gettimeofday(now, 0)) 89 if (0 == gettimeofday(now, 0))