summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-12 23:43:43 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-12 23:48:10 +0100
commit5817a95b5ee89480788832be35679dfcd2ed833b (patch)
treeb4db0db18a195b11f820247b78bfc4df5dba8c14 /src/bridge
parentb60cbda4f93bb83e36b29f5cba975b94b833663d (diff)
downloadbiboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.gz
biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.bz2
biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.xz
biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.zip
Basic handling of modes, both ways
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index d292af3..0b26a7f 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -4,6 +4,7 @@
#include <network/poller.hpp>
#include <utils/encoding.hpp>
+#include <utils/split.hpp>
#include <iostream>
static const char* action_prefix = "\01ACTION ";
@@ -83,6 +84,12 @@ void Bridge::send_channel_message(const Iid& iid, const std::string& body)
std::cout << "Cannot send message: no client exist for server " << iid.server << std::endl;
return;
}
+ if (body.substr(0, 6) == "/mode ")
+ {
+ std::vector<std::string> args = utils::split(body.substr(6), ' ', false);
+ irc->send_mode_command(iid.chan, args);
+ return;
+ }
if (body.substr(0, 4) == "/me ")
irc->send_channel_message(iid.chan, action_prefix + body.substr(4) + "\01");
else