diff options
author | Tim Cooper <tim.cooper@layeh.com> | 2015-02-20 05:34:34 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-03-18 22:16:43 +0300 |
commit | 9ba92b584e2a47e33b8dae8fb20526f319092df7 (patch) | |
tree | 166468e83f111e506374663ff05c67e763ef8c50 /src/murmur/Messages.cpp | |
parent | dede31785ffcf701c0b568790bd940b0f1d2562e (diff) |
Add user friendly UserRemove message when disconnecting a ghost user.
This commit adds a user friendly UserRemove message
when a username is reused from the same IP-address.
Diffstat (limited to 'src/murmur/Messages.cpp')
-rw-r--r-- | src/murmur/Messages.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp index ffb9969df..c6d9b32c0 100644 --- a/src/murmur/Messages.cpp +++ b/src/murmur/Messages.cpp @@ -192,6 +192,11 @@ void Server::msgAuthenticate(ServerUser *uSource, MumbleProto::Authenticate &msg // Kick ghost if (uOld) { log(uSource, "Disconnecting ghost"); + MumbleProto::UserRemove mpur; + mpur.set_session(uOld->uiSession); + mpur.set_reason("You connected to the server from another device"); + sendMessage(uOld, mpur); + uOld->forceFlush(); uOld->disconnectSocket(true); } |