summaryrefslogtreecommitdiffstats
path: root/src/ClientInfo.hpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2016-12-30 00:14:31 +0100
committerMarkus Mittendrein <git@maxmitti.tk>2016-12-30 13:12:35 +0100
commit67d4e252066d49a72fc7c62d6abe4aebc4ff20e7 (patch)
treee8da8a8a68a1ad73fbade3896e56f62da3c7bffc /src/ClientInfo.hpp
parent811b4654140d11d273f407b5728d4816de2125df (diff)
downloadmanager-67d4e252066d49a72fc7c62d6abe4aebc4ff20e7.tar.gz
manager-67d4e252066d49a72fc7c62d6abe4aebc4ff20e7.zip
Track players of clients
Diffstat (limited to 'src/ClientInfo.hpp')
-rw-r--r--src/ClientInfo.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ClientInfo.hpp b/src/ClientInfo.hpp
index 711bc71..c29ea40 100644
--- a/src/ClientInfo.hpp
+++ b/src/ClientInfo.hpp
@@ -31,6 +31,7 @@ public:
ManagementConnection management;
QString pcName = "";
+ QStringList players;
ClientInterface interface = Clonk;
int CUID = 0;
@@ -165,11 +166,12 @@ public:
case Auto: break;
case Clonk:
{
- if(parts.length() != 5) throw ConfigException("Cannot read corrupt ClientInfo with Clonk-ClientInterface: " + string.toStdString());
+ if(parts.length() != 6) throw ConfigException("Cannot read corrupt ClientInfo with Clonk-ClientInterface: " + string.toStdString());
info.pcName = parts.at(1);
info.CUID = parts.at(2).toInt();
info.nick = parts.at(3);
info.activated = ConfigValueBase::getValue<bool>(parts.at(4));
+ info.players = ConfigValueBase::getValue<QList<QString>>(parts.at(5));
break;
}
case IRC:
@@ -196,7 +198,7 @@ public:
switch(info.interface)
{
case Auto: break;
- case Clonk: ret.append(info.pcName); ret.append(QString::number(info.CUID)); ret.append(info.nick); ret.append(ConfigValueBase::getStringValue(info.activated)); break;
+ case Clonk: ret.append(info.pcName); ret.append(QString::number(info.CUID)); ret.append(info.nick); ret.append(ConfigValueBase::getStringValue(info.activated)); ret.append(ConfigValueBase::getStringValue<QList<QString>>(info.players)); break;
case IRC: ret.append(info.nick); break;
case Management: ret.append(info.management.name); break;
}