diff options
author | Kissaki <kissaki@gmx.de> | 2013-06-29 00:02:48 +0400 |
---|---|---|
committer | Kissaki <kissaki@gmx.de> | 2013-06-29 00:02:48 +0400 |
commit | b951fc352b3317b7b5c87303908de54932200ae7 (patch) | |
tree | 55b02b768fa3206f23c9e594917cf927ecc08bc0 /src/murmur/ServerDB.cpp | |
parent | f6ceaf9d2bd706149b1887c4f4cc9e9145a32f41 (diff) |
Userlist Improvements: Use RPC callbacks as well.
* Make getRegisteredUsersEx use RPC callbacks
* Implement UserInfo constructors
Diffstat (limited to 'src/murmur/ServerDB.cpp')
-rw-r--r-- | src/murmur/ServerDB.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp index 9093ef753..b23a84836 100644 --- a/src/murmur/ServerDB.cpp +++ b/src/murmur/ServerDB.cpp @@ -731,7 +731,16 @@ bool Server::unregisterUserDB(int id) { } QList<UserInfo> Server::getRegisteredUsersEx() { - QList<UserInfo> m; + + QMap<int, QString> rpcUsers; + emit getRegisteredUsersSig(QString(), rpcUsers); + + QList<UserInfo> users; + QMap<int, QString>::iterator it = rpcUsers.begin(); + for (; it != rpcUsers.end(); ++it) + { + users.insert(it.key(), UserInfo(it.key(), it.value())); + } TransactionHolder th; @@ -747,10 +756,10 @@ QList<UserInfo> Server::getRegisteredUsersEx() { userinfo.last_channel = query.value(2).toInt(); userinfo.last_active = query.value(3).toString(); - m << userinfo; + users << userinfo; } - return m; + return users; } QMap<int, QString > Server::getRegisteredUsers(const QString &filter) { |