summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-07-21 18:15:37 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-07-21 18:56:03 (GMT)
commit12024c66fe21c62b158552abe26b1bcfa142ffe8 (patch)
treecfedc6e34b147bbb05fedfd69eeaad27bd5eadbd /Swiftob/scripts/logAllMessages.lua
parent2a690f23a71f5f24550df112e0544b32826655db (diff)
downloadswift-contrib-12024c66fe21c62b158552abe26b1bcfa142ffe8.zip
swift-contrib-12024c66fe21c62b158552abe26b1bcfa142ffe8.tar.bz2
Allowing generic message listeners for Swiftob bots
Diffstat (limited to 'Swiftob/scripts/logAllMessages.lua')
-rw-r--r--Swiftob/scripts/logAllMessages.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiftob/scripts/logAllMessages.lua b/Swiftob/scripts/logAllMessages.lua
new file mode 100644
index 0000000..a14c0f3
--- /dev/null
+++ b/Swiftob/scripts/logAllMessages.lua
@@ -0,0 +1,6 @@
+function log_a_message(body, muc, nick, message)
+ print("Received line from '" .. nick .. "' in '" .. muc .. "':")
+ print(body)
+end
+
+swiftob_register_listener(log_a_message)