summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-12-27 15:34:58 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-01-04 01:59:35 +0100
commit43cc60e4a9e2859fdf67c89e58ee18cf7571f186 (patch)
treefcf3335a4bc80a825a798cf80dec97fbe06182c7 /src/bridge
parente8e592d1ace5413a1e7d8b59b9467c78d8d68ea9 (diff)
downloadbiboumi-43cc60e4a9e2859fdf67c89e58ee18cf7571f186.tar.gz
biboumi-43cc60e4a9e2859fdf67c89e58ee18cf7571f186.tar.bz2
biboumi-43cc60e4a9e2859fdf67c89e58ee18cf7571f186.tar.xz
biboumi-43cc60e4a9e2859fdf67c89e58ee18cf7571f186.zip
Handle nickname conflicts by sending the correct XMPP error presence
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp5
-rw-r--r--src/bridge/bridge.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index c93d710..7f245db 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -216,3 +216,8 @@ void Bridge::kick_muc_user(Iid&& iid, const std::string& target, const std::stri
{
this->xmpp->kick_user(iid.chan + "%" + iid.server, target, reason, author, this->user_jid);
}
+
+void Bridge::send_nickname_conflict_error(const Iid& iid, const std::string& nickname)
+{
+ this->xmpp->send_nickname_conflict_error(iid.chan + "%" + iid.server, nickname, this->user_jid);
+}
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index 1e1149b..b5bee9e 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -89,6 +89,7 @@ public:
*/
void send_nick_change(Iid&& iid, const std::string& old_nick, const std::string& new_nick, const bool self);
void kick_muc_user(Iid&& iid, const std::string& target, const std::string& reason, const std::string& author);
+ void send_nickname_conflict_error(const Iid& iid, const std::string& nickname);
/**
* Misc