diff options
-rw-r--r-- | src/LuaSL/LuaSL_main.c | 20 | ||||
-rw-r--r-- | src/extantz/extantz.c | 23 | ||||
-rw-r--r-- | src/libraries/SledjHamr.c | 2 | ||||
-rw-r--r-- | src/love/love.c | 123 |
4 files changed, 82 insertions, 86 deletions
diff --git a/src/LuaSL/LuaSL_main.c b/src/LuaSL/LuaSL_main.c index b72a155..d7223f9 100644 --- a/src/LuaSL/LuaSL_main.c +++ b/src/LuaSL/LuaSL_main.c | |||
@@ -69,7 +69,7 @@ static script *findThem(gameGlobals *ourGlobals, const char *base, const char *t | |||
69 | return eina_hash_find(ourGlobals->names, name); | 69 | return eina_hash_find(ourGlobals->names, name); |
70 | } | 70 | } |
71 | 71 | ||
72 | void send2server(script *me, const char *message) | 72 | static void send2server(script *me, const char *message) |
73 | { | 73 | { |
74 | gameGlobals *ourGlobals = me->data; | 74 | gameGlobals *ourGlobals = me->data; |
75 | 75 | ||
@@ -224,13 +224,13 @@ static Eina_Bool parser(void *data, Connection *connection, char *SID, char *com | |||
224 | char buf[PATH_MAX]; | 224 | char buf[PATH_MAX]; |
225 | 225 | ||
226 | //PD("PARSE COMMAND - %s", command); | 226 | //PD("PARSE COMMAND - %s", command); |
227 | if (0 == strncmp(command, "compile(", 8)) | 227 | if (0 == strcmp(command, "compile")) |
228 | { | 228 | { |
229 | char *temp; | 229 | char *temp; |
230 | char *file; | 230 | char *file; |
231 | LuaCompiler *compiler; | 231 | LuaCompiler *compiler; |
232 | 232 | ||
233 | strcpy(buf, &command[8]); | 233 | strcpy(buf, arguments); |
234 | temp = buf; | 234 | temp = buf; |
235 | file = temp; | 235 | file = temp; |
236 | while (')' != temp[0]) | 236 | while (')' != temp[0]) |
@@ -242,13 +242,13 @@ static Eina_Bool parser(void *data, Connection *connection, char *SID, char *com | |||
242 | PI("Compiling script %s", file); | 242 | PI("Compiling script %s", file); |
243 | compileScript(compiler, TRUE); | 243 | compileScript(compiler, TRUE); |
244 | } | 244 | } |
245 | else if (0 == strncmp(command, "run(", 4)) | 245 | else if (0 == strcmp(command, "run")) |
246 | { | 246 | { |
247 | char *temp; | 247 | char *temp; |
248 | char *file; | 248 | char *file; |
249 | script *me; | 249 | script *me; |
250 | 250 | ||
251 | strcpy(buf, &command[4]); | 251 | strcpy(buf, arguments); |
252 | temp = buf; | 252 | temp = buf; |
253 | file = temp; | 253 | file = temp; |
254 | while (')' != temp[0]) | 254 | while (')' != temp[0]) |
@@ -268,15 +268,19 @@ static Eina_Bool parser(void *data, Connection *connection, char *SID, char *com | |||
268 | else | 268 | else |
269 | PE("Failed to run script %s", me->fileName); | 269 | PE("Failed to run script %s", me->fileName); |
270 | } | 270 | } |
271 | else if (0 == strcmp(command, "exit()")) | 271 | else if (0 == strcmp(command, "exit")) |
272 | { | 272 | { |
273 | PI("Told to exit."); | 273 | PI("Told to exit."); |
274 | ecore_main_loop_quit(); | 274 | ecore_main_loop_quit(); |
275 | } | 275 | } |
276 | else | 276 | else |
277 | { | 277 | { |
278 | //PD("Sending -> script %s : %s", SID, command); | 278 | if (0 == strcmp("return", command)) |
279 | send2script(SID, command); | 279 | snprintf(buf, sizeof(buf), "%s %s", command, arguments); |
280 | else | ||
281 | snprintf(buf, sizeof(buf), "%s(%s", command, arguments); | ||
282 | //PD("Sending -> script %s : %s", SID, buf); | ||
283 | send2script(SID, buf); | ||
280 | } | 284 | } |
281 | 285 | ||
282 | return ECORE_CALLBACK_RENEW; | 286 | return ECORE_CALLBACK_RENEW; |
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index f9b638a..f4f602e 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -37,12 +37,12 @@ static Eina_Bool clientParser(void *data, Connection *connection, char *SID, cha | |||
37 | globals *ourGlobals = data; | 37 | globals *ourGlobals = data; |
38 | char buf[PATH_MAX]; | 38 | char buf[PATH_MAX]; |
39 | 39 | ||
40 | if ((0 == strncmp(command, "llOwnerSay(", 11)) | 40 | if ((0 == strcmp(command, "llOwnerSay")) |
41 | || (0 == strncmp(command, "llWhisper(", 10)) | 41 | || (0 == strcmp(command, "llWhisper")) |
42 | || (0 == strncmp(command, "llSay(", 6)) | 42 | || (0 == strcmp(command, "llSay")) |
43 | || (0 == strncmp(command, "llShout(", 8))) | 43 | || (0 == strcmp(command, "llShout"))) |
44 | { | 44 | { |
45 | sprintf(buf, "%s: %s", SID, command); | 45 | sprintf(buf, "%s: %s(%s", SID, command, arguments); |
46 | if (ourGlobals->purkle) | 46 | if (ourGlobals->purkle) |
47 | { | 47 | { |
48 | int _P; | 48 | int _P; |
@@ -54,7 +54,7 @@ static Eina_Bool clientParser(void *data, Connection *connection, char *SID, cha | |||
54 | else | 54 | else |
55 | PE("No purkle to put - %s", buf); | 55 | PE("No purkle to put - %s", buf); |
56 | } | 56 | } |
57 | else if (0 == strncmp(command, "llDialog(", 9)) | 57 | else if (0 == strcmp(command, "llDialog")) |
58 | { | 58 | { |
59 | if (ourGlobals->LSLGuiMess) | 59 | if (ourGlobals->LSLGuiMess) |
60 | { | 60 | { |
@@ -64,12 +64,13 @@ static Eina_Bool clientParser(void *data, Connection *connection, char *SID, cha | |||
64 | _M = lua_gettop(ourGlobals->LSLGuiMess->L); | 64 | _M = lua_gettop(ourGlobals->LSLGuiMess->L); |
65 | 65 | ||
66 | // TODO - Somewhere in the chain the new lines that MLP likes to put into llDialog's message munge things. Fix that. | 66 | // TODO - Somewhere in the chain the new lines that MLP likes to put into llDialog's message munge things. Fix that. |
67 | push_lua(ourGlobals->LSLGuiMess->L, "@ ( $ )", _M, "doLua", command, 0); | 67 | sprintf(buf, "%s(%s", command, arguments); |
68 | push_lua(ourGlobals->LSLGuiMess->L, "@ ( $ )", _M, "doLua", buf, 0); | ||
68 | } | 69 | } |
69 | else | 70 | else |
70 | PE("No LSLGuiMess to send - %s", command); | 71 | PE("No LSLGuiMess to send - %s(%s", command, arguments); |
71 | } | 72 | } |
72 | else if (0 == strncmp(command, "loadSim(", 8)) | 73 | else if (0 == strcmp(command, "loadSim")) |
73 | { | 74 | { |
74 | #if USE_EVAS_3D | 75 | #if USE_EVAS_3D |
75 | char *p, *t; | 76 | char *p, *t; |
@@ -80,7 +81,7 @@ static Eina_Bool clientParser(void *data, Connection *connection, char *SID, cha | |||
80 | strcpy(ourGlobals->uuid, SID); | 81 | strcpy(ourGlobals->uuid, SID); |
81 | PI("Your UUID is %s.", ourGlobals->uuid); | 82 | PI("Your UUID is %s.", ourGlobals->uuid); |
82 | #if USE_EVAS_3D | 83 | #if USE_EVAS_3D |
83 | strcpy(buf, &command[8]); | 84 | strcpy(buf, arguments); |
84 | p = buf; | 85 | p = buf; |
85 | while ('"' == p[0]) | 86 | while ('"' == p[0]) |
86 | p++; | 87 | p++; |
@@ -109,7 +110,7 @@ static Eina_Bool clientParser(void *data, Connection *connection, char *SID, cha | |||
109 | #endif | 110 | #endif |
110 | } | 111 | } |
111 | else | 112 | else |
112 | PI("Some random command %s", command); | 113 | PI("Some random command %s(%s", command, arguments); |
113 | 114 | ||
114 | return ECORE_CALLBACK_RENEW; | 115 | return ECORE_CALLBACK_RENEW; |
115 | } | 116 | } |
diff --git a/src/libraries/SledjHamr.c b/src/libraries/SledjHamr.c index 4d0efbc..abd5b1c 100644 --- a/src/libraries/SledjHamr.c +++ b/src/libraries/SledjHamr.c | |||
@@ -159,7 +159,7 @@ static Eina_Bool parseStream(void *data, int type, void *evData, int evSize, voi | |||
159 | { | 159 | { |
160 | streamParser func = eina_hash_find(conn->commands, command); | 160 | streamParser func = eina_hash_find(conn->commands, command); |
161 | 161 | ||
162 | // ext[0] = '\0'; | 162 | ext[0] = '\0'; |
163 | // Need a callback if we can't find the command. | 163 | // Need a callback if we can't find the command. |
164 | if (NULL == func) | 164 | if (NULL == func) |
165 | func = conn->unknownCommand; | 165 | func = conn->unknownCommand; |
diff --git a/src/love/love.c b/src/love/love.c index e6f5b6e..9ad9842 100644 --- a/src/love/love.c +++ b/src/love/love.c | |||
@@ -199,14 +199,14 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
199 | 199 | ||
200 | //PD("COMMAND - %s - %s", SID, command); | 200 | //PD("COMMAND - %s - %s", SID, command); |
201 | me = eina_hash_find(ourGlobals->scripts, SID); | 201 | me = eina_hash_find(ourGlobals->scripts, SID); |
202 | if (0 == strncmp(command, "compilerWarning(", 16)) | 202 | if (0 == strcmp(command, "compilerWarning")) |
203 | { | 203 | { |
204 | char *temp; | 204 | char *temp; |
205 | char *line; | 205 | char *line; |
206 | char *column; | 206 | char *column; |
207 | char *text; | 207 | char *text; |
208 | 208 | ||
209 | strcpy(buf, &command[16]); | 209 | strcpy(buf, arguments); |
210 | temp = buf; | 210 | temp = buf; |
211 | line = temp; | 211 | line = temp; |
212 | while (',' != temp[0]) | 212 | while (',' != temp[0]) |
@@ -224,14 +224,14 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
224 | if (me) | 224 | if (me) |
225 | me->warnings++; | 225 | me->warnings++; |
226 | } | 226 | } |
227 | else if (0 == strncmp(command, "compilerError(", 14)) | 227 | else if (0 == strcmp(command, "compilerError")) |
228 | { | 228 | { |
229 | char *temp; | 229 | char *temp; |
230 | char *line; | 230 | char *line; |
231 | char *column; | 231 | char *column; |
232 | char *text; | 232 | char *text; |
233 | 233 | ||
234 | strcpy(buf, &command[14]); | 234 | strcpy(buf, arguments); |
235 | temp = buf; | 235 | temp = buf; |
236 | line = temp; | 236 | line = temp; |
237 | while (',' != temp[0]) | 237 | while (',' != temp[0]) |
@@ -249,9 +249,8 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
249 | if (me) | 249 | if (me) |
250 | me->bugs++; | 250 | me->bugs++; |
251 | } | 251 | } |
252 | else if (0 == strcmp(command, "compiled(false)")) | 252 | else if (0 == strcmp(command, "compiled")) |
253 | { | 253 | { |
254 | // PE("The compile of %s failed!", SID); | ||
255 | if (me) | 254 | if (me) |
256 | { | 255 | { |
257 | struct timeval now; | 256 | struct timeval now; |
@@ -263,67 +262,61 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
263 | PI("Compile speed scripts: %d time: %fs total: %f scripts per second", compiledCount, total, compiledCount / total); | 262 | PI("Compile speed scripts: %d time: %fs total: %f scripts per second", compiledCount, total, compiledCount / total); |
264 | } | 263 | } |
265 | } | 264 | } |
266 | } | ||
267 | else if (0 == strcmp(command, "compiled(true)")) | ||
268 | { | ||
269 | if (me) | ||
270 | { | ||
271 | struct timeval now; | ||
272 | 265 | ||
273 | compiledCount++; | 266 | if ('t' == arguments[0]) |
274 | if (compiledCount == scriptCount) | 267 | { |
275 | { | ||
276 | float total = timeDiff(&now, &startTime); | ||
277 | PI("Compile speed scripts: %d time: %fs total: %f scripts per second", compiledCount, total, compiledCount / total); | ||
278 | } | ||
279 | } | ||
280 | //PD("About to run %s", me->fileName); | 268 | //PD("About to run %s", me->fileName); |
281 | send2(ourGlobals->serverLuaSL, SID, "run(%s)", me->fileName); | 269 | send2(ourGlobals->serverLuaSL, SID, "run(%s)", me->fileName); |
270 | } | ||
271 | else | ||
272 | { | ||
273 | // PE("The compile of %s failed!", SID); | ||
274 | } | ||
282 | } | 275 | } |
283 | else | 276 | else |
284 | { | 277 | { |
285 | //PD("FAKING (maybe) %s", command); | 278 | //PD("FAKING (maybe) %s", command); |
286 | // Send back some random or fixed values for testing. | 279 | // Send back some random or fixed values for testing. |
287 | if (0 == strcmp(command, "llGetKey()")) | 280 | if (0 == strcmp(command, "llGetKey")) |
288 | send2(ourGlobals->serverLuaSL, SID, "return \"%08lx-%04lx-%04lx-%04lx-%012lx\"", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); | 281 | send2(ourGlobals->serverLuaSL, SID, "return \"%08lx-%04lx-%04lx-%04lx-%012lx\"", random(), random() % 0xFFFF, random() % 0xFFFF, random() % 0xFFFF, random()); |
289 | else if (0 == strcmp(command, "llGetOwner()")) | 282 | else if (0 == strcmp(command, "llGetOwner")) |
290 | send2(ourGlobals->serverLuaSL, SID, "return \"%s\"", ownerKey); | 283 | send2(ourGlobals->serverLuaSL, SID, "return \"%s\"", ownerKey); |
291 | else if (0 == strcmp(command, "llGetPermissionsKey()")) | 284 | else if (0 == strcmp(command, "llGetPermissionsKey")) |
292 | send2(ourGlobals->serverLuaSL, SID, "return \"%s\"", ownerKey); | 285 | send2(ourGlobals->serverLuaSL, SID, "return \"%s\"", ownerKey); |
293 | else if (0 == strncmp(command, "llRequestPermissions(", 21)) | 286 | else if (0 == strcmp(command, "llRequestPermissions")) |
294 | PI("Faked %s", command); | 287 | PI("Faked %s(%s", command, arguments); |
295 | else if (0 == strcmp(command, "llGetPos()")) | 288 | else if (0 == strcmp(command, "llGetPos")) |
296 | send2(ourGlobals->serverLuaSL, SID, "return {x=128.0, y=128.0, z=128.0}"); | 289 | send2(ourGlobals->serverLuaSL, SID, "return {x=128.0, y=128.0, z=128.0}"); |
297 | else if (0 == strcmp(command, "llGetRot()")) | 290 | else if (0 == strcmp(command, "llGetRot")) |
298 | send2(ourGlobals->serverLuaSL, SID, "return {x=0.0, y=0.0, z=0.0, s=1.0}"); | 291 | send2(ourGlobals->serverLuaSL, SID, "return {x=0.0, y=0.0, z=0.0, s=1.0}"); |
299 | else if (0 == strcmp(command, "llGetFreeMemory()")) | 292 | else if (0 == strcmp(command, "llGetFreeMemory")) |
300 | send2(ourGlobals->serverLuaSL, SID, "return 654321"); | 293 | send2(ourGlobals->serverLuaSL, SID, "return 654321"); |
301 | else if (0 == strcmp(command, "llGetObjectDesc()")) | 294 | else if (0 == strcmp(command, "llGetObjectDesc")) |
302 | send2(ourGlobals->serverLuaSL, SID, "return \"\""); | 295 | send2(ourGlobals->serverLuaSL, SID, "return \"\""); |
303 | else if (0 == strncmp(command, "llGetAlpha(", 11)) | 296 | else if (0 == strcmp(command, "llGetAlpha")) |
304 | send2(ourGlobals->serverLuaSL, SID, "return 1.0"); | 297 | send2(ourGlobals->serverLuaSL, SID, "return 1.0"); |
305 | else if (0 == strcmp(command, "llGetInventoryNumber(7)")) | 298 | else if (0 == strcmp(command, "llGetInventoryNumber") && (0 == strcmp(arguments, "7)"))) |
306 | send2(ourGlobals->serverLuaSL, SID, "return 3"); | 299 | send2(ourGlobals->serverLuaSL, SID, "return 3"); |
307 | else if (0 == strcmp(command, "llGetLinkNumber()")) | 300 | else if (0 == strcmp(command, "llGetLinkNumber")) |
308 | send2(ourGlobals->serverLuaSL, SID, "return 1"); | 301 | send2(ourGlobals->serverLuaSL, SID, "return 1"); |
309 | else if (0 == strcmp(command, "llGetInventoryName(7, 2)")) | 302 | else if (0 == strcmp(command, "llGetInventoryName") && (0 == strcmp(arguments, "7, 2)"))) |
310 | send2(ourGlobals->serverLuaSL, SID, "return \".readme\""); | 303 | send2(ourGlobals->serverLuaSL, SID, "return \".readme\""); |
311 | else if (0 == strcmp(command, "llGetInventoryName(7, 1)")) | 304 | else if (0 == strcmp(command, "llGetInventoryName") && (0 == strcmp(arguments, "7, 1)"))) |
312 | send2(ourGlobals->serverLuaSL, SID, "return \".POSITIONS\""); | 305 | send2(ourGlobals->serverLuaSL, SID, "return \".POSITIONS\""); |
313 | else if (0 == strcmp(command, "llGetInventoryName(7, 0)")) | 306 | else if (0 == strcmp(command, "llGetInventoryName") && (0 == strcmp(arguments, "7, 0)"))) |
314 | send2(ourGlobals->serverLuaSL, SID, "return \".MENUITEMS\""); | 307 | send2(ourGlobals->serverLuaSL, SID, "return \".MENUITEMS\""); |
315 | else if (0 == strncmp(command, "llListen(", 9)) | 308 | else if (0 == strcmp(command, "llListen")) |
316 | { | 309 | { |
317 | PI("Faked %s", command); | 310 | PI("Faked %s(%s", command, arguments); |
318 | send2(ourGlobals->serverLuaSL, SID, "return %d", random()); | 311 | send2(ourGlobals->serverLuaSL, SID, "return %d", random()); |
319 | } | 312 | } |
320 | else if (0 == strncmp(command, "llSameGroup(", 12)) | 313 | else if (0 == strcmp(command, "llSameGroup")) |
321 | send2(ourGlobals->serverLuaSL, SID, "return true"); | 314 | send2(ourGlobals->serverLuaSL, SID, "return true"); |
322 | else if (0 == strncmp(command, "llKey2Name(", 11)) | 315 | else if (0 == strcmp(command, "llKey2Name")) |
323 | { | 316 | { |
324 | char *temp; | 317 | char *temp; |
325 | 318 | ||
326 | strcpy(buf, &command[12]); | 319 | strcpy(buf, arguments); |
327 | temp = buf; | 320 | temp = buf; |
328 | while (')' != temp[0]) | 321 | while (')' != temp[0]) |
329 | temp++; | 322 | temp++; |
@@ -342,57 +335,55 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
342 | // Extantz registering any channel it wants to listen to, mostly for client side scripts. | 335 | // Extantz registering any channel it wants to listen to, mostly for client side scripts. |
343 | // Extantz is then only responsible for the registered channels, it can do what it likes with them. | 336 | // Extantz is then only responsible for the registered channels, it can do what it likes with them. |
344 | // Dialogs, notifications, and other stuff goes through some other functions. | 337 | // Dialogs, notifications, and other stuff goes through some other functions. |
345 | else if (0 == strncmp(command, "llOwnerSay(", 11)) | 338 | else if (0 == strcmp(command, "llOwnerSay")) |
346 | { | 339 | { |
347 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 340 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
348 | else PW("No where to send %s", command); | 341 | else PW("No where to send %s(%s", command, arguments); |
349 | } | 342 | } |
350 | else if (0 == strncmp(command, "llWhisper(", 10)) | 343 | else if (0 == strcmp(command, "llWhisper")) |
351 | { | 344 | { |
352 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 345 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
353 | else PW("No where to send %s", command); | 346 | else PW("No where to send %s(%s", command, arguments); |
354 | } | 347 | } |
355 | else if (0 == strncmp(command, "llRegionSay(", 12)) | 348 | else if (0 == strcmp(command, "llRegionSay")) |
356 | { | 349 | { |
357 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 350 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
358 | else PW("No where to send %s", command); | 351 | else PW("No where to send %s(%s", command, arguments); |
359 | } | 352 | } |
360 | else if (0 == strncmp(command, "llSay(", 6)) | 353 | else if (0 == strcmp(command, "llSay")) |
361 | { | 354 | { |
362 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 355 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
363 | else PW("No where to send %s", command); | 356 | else PW("No where to send %s(%s", command, arguments); |
364 | } | 357 | } |
365 | else if (0 == strncmp(command, "llShout(", 8)) | 358 | else if (0 == strcmp(command, "llShout")) |
366 | { | 359 | { |
367 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 360 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
368 | else PW("No where to send %s", command); | 361 | else PW("No where to send %s(%s", command, arguments); |
369 | // TODO - Temporary so we have a place to log stuff from LSL. | 362 | // TODO - Temporary so we have a place to log stuff from LSL. |
370 | PD("SHOUTING %s", command); | 363 | PD("SHOUTING %s", command); |
371 | } | 364 | } |
372 | else if (0 == strncmp(command, "llDialog(", 9)) | 365 | else if (0 == strcmp(command, "llDialog")) |
373 | { | 366 | { |
374 | if (ourGlobals->client) send2(ourGlobals->client, SID, command); | 367 | if (ourGlobals->client) send2(ourGlobals->client, SID, "%s(%s", command, arguments); |
375 | else PW("No where to send %s", command); | ||
376 | } | 368 | } |
377 | else if (0 == strncmp(command, "llMessageLinked(", 16)) | 369 | else if (0 == strcmp(command, "llMessageLinked")) |
378 | { | 370 | { |
379 | Eina_Iterator *scripts; | 371 | Eina_Iterator *scripts; |
380 | LoveScript *me; | 372 | LoveScript *me; |
381 | |||
382 | // TODO - For now, just send it to everyone. | 373 | // TODO - For now, just send it to everyone. |
383 | scripts = eina_hash_iterator_data_new(ourGlobals->scripts); | 374 | scripts = eina_hash_iterator_data_new(ourGlobals->scripts); |
384 | while(eina_iterator_next(scripts, (void **) &me)) | 375 | while(eina_iterator_next(scripts, (void **) &me)) |
385 | { | 376 | { |
386 | send2(ourGlobals->serverLuaSL, me->SID, "events.link_message%s", &command[15]); | 377 | send2(ourGlobals->serverLuaSL, me->SID, "events.link_message(%s", arguments); |
387 | } | 378 | } |
388 | eina_iterator_free(scripts); | 379 | eina_iterator_free(scripts); |
389 | } | 380 | } |
390 | else if (0 == strncmp(command, "llGetNotecardLine(", 18)) | 381 | else if (0 == strcmp(command, "llGetNotecardLine")) |
391 | { | 382 | { |
392 | char *notecard, *temp, *line, key[PATH_MAX]; | 383 | char *notecard, *temp, *line, key[PATH_MAX]; |
393 | int lineNo, fd; | 384 | int lineNo, fd; |
394 | 385 | ||
395 | strcpy(buf, &command[19]); | 386 | strcpy(buf, &arguments[1]); |
396 | notecard = buf; | 387 | notecard = buf; |
397 | temp = notecard; | 388 | temp = notecard; |
398 | while ('"' != temp[0]) | 389 | while ('"' != temp[0]) |
@@ -462,7 +453,7 @@ static Eina_Bool LuaSLParser(void *data, Connection *conn, char *SID, char *comm | |||
462 | 453 | ||
463 | } | 454 | } |
464 | else | 455 | else |
465 | PI("Script %s sent command %s", SID, command); | 456 | PI("Script %s sent command %s(%s", SID, command, arguments); |
466 | } | 457 | } |
467 | 458 | ||
468 | return ECORE_CALLBACK_RENEW; | 459 | return ECORE_CALLBACK_RENEW; |
@@ -502,7 +493,7 @@ static Eina_Bool clientParser(void *data, Connection *conn, char *SID, char *com | |||
502 | { | 493 | { |
503 | gameGlobals *ourGlobals = data; | 494 | gameGlobals *ourGlobals = data; |
504 | 495 | ||
505 | if (0 == strncmp(command, "events.touch_start(", 19)) | 496 | if (0 == strcmp(command, "events.touch_start")) |
506 | { | 497 | { |
507 | Eina_Iterator *scripts; | 498 | Eina_Iterator *scripts; |
508 | LoveScript *me; | 499 | LoveScript *me; |
@@ -517,7 +508,7 @@ static Eina_Bool clientParser(void *data, Connection *conn, char *SID, char *com | |||
517 | } | 508 | } |
518 | eina_iterator_free(scripts); | 509 | eina_iterator_free(scripts); |
519 | } | 510 | } |
520 | else if (0 == strncmp(command, "events.listen(", 14)) | 511 | else if (0 == strcmp(command, "events.listen")) |
521 | { | 512 | { |
522 | Eina_Iterator *scripts; | 513 | Eina_Iterator *scripts; |
523 | LoveScript *me; | 514 | LoveScript *me; |