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/Swiftob.cpp
parent2a690f23a71f5f24550df112e0544b32826655db (diff)
downloadswift-12024c66fe21c62b158552abe26b1bcfa142ffe8.zip
swift-12024c66fe21c62b158552abe26b1bcfa142ffe8.tar.bz2
Allowing generic message listeners for Swiftob bots
Diffstat (limited to 'Swiftob/Swiftob.cpp')
-rw-r--r--Swiftob/Swiftob.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiftob/Swiftob.cpp b/Swiftob/Swiftob.cpp
index 331e55e..6f36b3d 100644
--- a/Swiftob/Swiftob.cpp
+++ b/Swiftob/Swiftob.cpp
@@ -87,6 +87,10 @@ void Swiftob::handleMessageReceived(Swift::Message::ref message) {
std::cout << "Not handling empty body" << std::endl;
return;
}
+
+ /* Run through any full-message listeners */
+ commands_->runListeners(message);
+
/*Convert body into !command if it's not a MUC, and it misses the bang*/
std::string bangBody(body);
if (type != Swift::Message::Groupchat && body[0] != '!') {