diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-04-24 01:24:02 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-04-24 01:24:45 +0400 |
commit | 139d4e0dac87569916d75086bc6829618e21fa51 (patch) | |
tree | 639c14856420cd1ab922fc49bb7ffa6b7267135b /src/murmur/RPC.cpp | |
parent | b038dac437a1fcb230de3f8d9e37382ecd445674 (diff) |
Ice comment support
Diffstat (limited to 'src/murmur/RPC.cpp')
-rw-r--r-- | src/murmur/RPC.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/murmur/RPC.cpp b/src/murmur/RPC.cpp index 477de2221..5f1fc4d6e 100644 --- a/src/murmur/RPC.cpp +++ b/src/murmur/RPC.cpp @@ -35,7 +35,7 @@ #include "Meta.h" #include "Version.h" -void Server::setPlayerState(Player *pPlayer, Channel *cChannel, bool mute, bool deaf, bool suppressed) { +void Server::setPlayerState(Player *pPlayer, Channel *cChannel, bool mute, bool deaf, bool suppressed, const QString &comment) { bool changed = false; if (deaf) @@ -57,6 +57,15 @@ void Server::setPlayerState(Player *pPlayer, Channel *cChannel, bool mute, bool changed = true; mpus.set_suppressed(suppressed); } + if (! comment.isNull() && comment != pPlayer->qsComment) { + changed = true; + mpus.set_comment(u8(comment)); + if (pPlayer->iId >= 0) { + QMap<QString, QString> info; + info.insert("comment", comment); + setInfo(pPlayer->iId, info); + } + } pPlayer->bDeaf = deaf; pPlayer->bMute = mute; |