Made the lastseen table look better by applying more grammarz.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1986 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-05-14 08:59:19 +00:00
parent 472ee9795e
commit 7e062b086a

View File

@@ -115,7 +115,8 @@ public:
Row["LastSeen"] = buf;
}
Row["Info"] = CString(pUser->GetClients().size()) + " client(s)";
Row["Info"] = CString(pUser->GetClients().size()) +
" client" + CString(pUser->GetClients().size() == 1 ? "" : "s");
if(!pUser->GetCurrentServer()) {
Row["Info"] += ", not connected to IRC";
} else {
@@ -124,9 +125,13 @@ public:
for (unsigned int a = 0; a < vChans.size(); ++a) {
if (vChans[a]->IsOn()) ++uChans;
}
unsigned int n = uChans;
Row["Info"] += ", joined to " + CString(uChans);
if(uChans != vChans.size()) Row["Info"] += " out of " + CString(vChans.size()) + " configured";
Row["Info"] += " channel(s)";
if(uChans != vChans.size()) {
Row["Info"] += " out of " + CString(vChans.size()) + " configured";
n = vChans.size();
}
Row["Info"] += " channel" + CString(n == 1 ? "" : "s");
}
}