aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/purkle/purkle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/purkle/purkle.c')
-rw-r--r--src/purkle/purkle.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/purkle/purkle.c b/src/purkle/purkle.c
index 01053fe..62f78a2 100644
--- a/src/purkle/purkle.c
+++ b/src/purkle/purkle.c
@@ -56,14 +56,15 @@ static int say(lua_State *L)
56 char *name = "", *id = NULL, *text = NULL, buf[PATH_MAX]; 56 char *name = "", *id = NULL, *text = NULL, buf[PATH_MAX];
57 int channel; 57 int channel;
58 58
59printf("PURKLE.SAY .....\n");
60 // TODO - Should include origin and distance? 59 // TODO - Should include origin and distance?
61 pull_lua(L, 1, "%channel $name $id $text", &channel, &name, &id, &text); 60 pull_lua(L, 1, "%channel $name $id $text", &channel, &name, &id, &text);
62 if (id && text) 61 if (id && text)
63 { 62 {
64 snprintf(buf, sizeof(buf), "events.listen(%d, %s, %s, %s)", channel, name, id, text); 63 snprintf(buf, sizeof(buf), "events.listen(%d, '%s', '%s', '%s')", channel, name, id, text);
65printf("PURKLE.SAY -%s.%s\n", id, buf); 64 if (server)
66 if (server) sendForth(server, id, buf); 65 sendForth(server, id, buf);
66 else
67 printf("PURKLE NOT SAY, no where to send %s", buf);
67 } 68 }
68 return 0; 69 return 0;
69} 70}