summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift/Examples/Wonderland.lua')
-rwxr-xr-xSluift/Examples/Wonderland.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/Sluift/Examples/Wonderland.lua b/Sluift/Examples/Wonderland.lua
index 58c00ca..235d8d0 100755
--- a/Sluift/Examples/Wonderland.lua
+++ b/Sluift/Examples/Wonderland.lua
@@ -44,9 +44,9 @@ end
print("Done. Waiting ...")
while true do
for _, client in ipairs(clients) do
- client:for_event(function(e)
- if e["type"] == "message" then client:send_message(e["from"], "Off with their heads!") end
- end, 1000)
+ for message in client:messages {timeout = 1000} do
+ client:send_message{to = e["from"], body = "Off with their heads!"}
+ end
end
sluift.sleep(1000)
end