summaryrefslogtreecommitdiffstats
path: root/src/PatchedClonkParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/PatchedClonkParser.cpp')
-rw-r--r--src/PatchedClonkParser.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/PatchedClonkParser.cpp b/src/PatchedClonkParser.cpp
index d8e13f4..e5abd7d 100644
--- a/src/PatchedClonkParser.cpp
+++ b/src/PatchedClonkParser.cpp
@@ -6,12 +6,12 @@ PatchedClonkParser::PatchedClonkParser(CRSMSession& session) : ClonkParser(sessi
}
namespace {
- void parseClientInfo(QString& message, QString& pcName, int& CUID, QString& user)
+ void parseClientInfo(QString& message, QString& pcName, QString& user)
{
if(message.length() > 5 && message.at(0) == '\\')
{
- QString parts[3];
- for(int i = 1, part = 0; i < message.length() && part < 3; ++i)
+ QString parts[2];
+ for(int i = 1, part = 0; i < message.length() && part < 2; ++i)
{
bool last = (i == message.length() -1);
QChar c = message.at(i);
@@ -22,13 +22,12 @@ namespace {
}
if(c == '\\')
{
- if((last || next == ' ') && part == 2)
+ if((last || next == ' ') && part == 1)
{
message = message.mid(i + 2);
pcName = parts[0];
- CUID = parts[1].toInt();
- user = parts[2];
+ user = parts[1];
return;
}
else
@@ -117,14 +116,13 @@ void PatchedClonkParser::parseMessage(const QString &line)
}
QString pcName, user;
- int CUID = 0;
- parseClientInfo(what, pcName, CUID, user);
+ parseClientInfo(what, pcName, user);
if(pcName.isEmpty())
{
return;
}
- ClientInfo& client = getClientInfo(pcName, CUID, user);
+ ClientInfo& client = getClientInfo(pcName, user);
if(type == "Pli" || type == "Pla")
{
@@ -197,7 +195,7 @@ void PatchedClonkParser::parseMessage(const QString &line)
}
}
-ClientInfo &PatchedClonkParser::getClientInfo(const QString &pcName, int CUID, const QString &user)
+ClientInfo &PatchedClonkParser::getClientInfo(const QString &pcName, const QString &user)
{
if(pcName == Session.Clonk.Server.pcName)
{
@@ -206,7 +204,7 @@ ClientInfo &PatchedClonkParser::getClientInfo(const QString &pcName, int CUID, c
if(!Session.Clonk.Clients.contains(pcName))
{
- Session.Clonk.Clients.insert(pcName, ClientInfo::clonkClient(user, pcName, CUID));
+ Session.Clonk.Clients.insert(pcName, ClientInfo::clonkClient(user, pcName));
}
return Session.Clonk.Clients[pcName];
}