diff options
Diffstat (limited to 'LuaSL/src/LuaSL_main.c')
-rw-r--r-- | LuaSL/src/LuaSL_main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_main.c b/LuaSL/src/LuaSL_main.c index daee816..04145b5 100644 --- a/LuaSL/src/LuaSL_main.c +++ b/LuaSL/src/LuaSL_main.c | |||
@@ -6,11 +6,23 @@ static int CPUs = 4; | |||
6 | static Eina_Strbuf *clientStream; | 6 | static Eina_Strbuf *clientStream; |
7 | 7 | ||
8 | 8 | ||
9 | static Eina_Bool _sleep_timer_cb(void *data) | ||
10 | { | ||
11 | char *SID = data; | ||
12 | |||
13 | printf("Waking up %s\n", SID); | ||
14 | sendToChannel(SID, "0.0", NULL, NULL); | ||
15 | return ECORE_CALLBACK_CANCEL; | ||
16 | } | ||
17 | |||
9 | static void _sendBack(void * data) | 18 | static void _sendBack(void * data) |
10 | { | 19 | { |
11 | scriptMessage *message = data; | 20 | scriptMessage *message = data; |
12 | 21 | ||
13 | sendBack(message->script->game, message->script->client, message->script->SID, message->message); | 22 | if (0 == strncmp(message->message, "llSleep(", 8)) |
23 | ecore_timer_add(atof(&(message->message)[8]), _sleep_timer_cb, message->script->SID); | ||
24 | else | ||
25 | sendBack(message->script->game, message->script->client, message->script->SID, message->message); | ||
14 | free(message); | 26 | free(message); |
15 | } | 27 | } |
16 | 28 | ||