diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-02-20 02:31:16 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-02-20 02:31:16 +0100 |
commit | 61ca40fa0e6c819aa72f3f2364667c7b990855d4 (patch) | |
tree | a3cb056d886529a5ea145d43d2bc93845a38e9d1 /src/bridge | |
parent | 190c4ff1762e5e762e913f98033369ed75ed5291 (diff) | |
download | biboumi-61ca40fa0e6c819aa72f3f2364667c7b990855d4.tar.gz biboumi-61ca40fa0e6c819aa72f3f2364667c7b990855d4.tar.bz2 biboumi-61ca40fa0e6c819aa72f3f2364667c7b990855d4.tar.xz biboumi-61ca40fa0e6c819aa72f3f2364667c7b990855d4.zip |
Delete empty bridges objects
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 5 | ||||
-rw-r--r-- | src/bridge/bridge.hpp | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 5122a69..bb3bfb0 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -249,6 +249,11 @@ std::string Bridge::get_own_nick(const Iid& iid) return ""; } +size_t Bridge::connected_clients() const +{ + return this->irc_clients.size(); +} + void Bridge::kick_muc_user(Iid&& iid, const std::string& target, const std::string& reason, const std::string& author) { this->xmpp->kick_user(iid.chan + "%" + iid.server, target, reason, author, this->user_jid); diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index b3a5d02..58ca24c 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -104,6 +104,10 @@ public: * Misc */ std::string get_own_nick(const Iid& iid); + /** + * Get the number of server to which this bridge is connected. + */ + size_t connected_clients() const; private: /** |