Get rid of most strtoul() and atoi() calls and use CString's features instead

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1320 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-01-04 10:48:02 +00:00
parent cae48ab256
commit 607a7f1c16
11 changed files with 29 additions and 27 deletions
+3 -3
View File
@@ -1158,7 +1158,7 @@ bool CZNC::DoRehash(CString& sError)
if (pUser) {
if (pChan) {
if (sName.Equals("Buffer")) {
pChan->SetBufferCount(strtoul(sValue.c_str(), NULL, 10));
pChan->SetBufferCount(sValue.ToUInt());
continue;
} else if (sName.Equals("KeepBuffer")) {
pChan->SetKeepBuffer(sValue.Equals("true"));
@@ -1180,7 +1180,7 @@ bool CZNC::DoRehash(CString& sError)
}
} else {
if (sName.Equals("Buffer")) {
pUser->SetBufferCount(strtoul(sValue.c_str(), NULL, 10));
pUser->SetBufferCount(sValue.ToUInt());
continue;
} else if (sName.Equals("KeepBuffer")) {
pUser->SetKeepBuffer(sValue.Equals("true"));
@@ -1380,7 +1380,7 @@ bool CZNC::DoRehash(CString& sError)
sIPV6Comment = " using ipv6";
}
unsigned short uPort = strtol(sPort.c_str(), NULL, 10);
unsigned short uPort = sPort.ToUShort();
CUtils::PrintAction("Binding to port [" + CString((bSSL) ? "+" : "") + CString(uPort) + "]" + sHostComment + sIPV6Comment);
#ifndef HAVE_IPV6