Use CString::StartsWith()

Replace the use of deprecated CString::Equals(str,bool,int) by
CString::StartsWith(str,cs) which is more pleasant to read.
This commit is contained in:
J-P Nurmi
2015-02-18 00:42:25 +01:00
parent a8b9542925
commit 00b1a7eedf
15 changed files with 24 additions and 28 deletions

View File

@@ -147,7 +147,7 @@ public:
virtual EModRet OnUserRaw(CString & sLine) override
{
if (sLine.Equals("schat ", false, 6)) {
if (sLine.StartsWith("schat ")) {
OnModCommand("chat " + sLine.substr(6));
return(HALT);
@@ -240,7 +240,7 @@ public:
PutModule("No SDCCs currently in session");
} else if (sCom.Equals("close")) {
if (!sArgs.Equals("(s)", false, 3))
if (!sArgs.StartsWith("(s)"))
sArgs = "(s)" + sArgs;
set<CSocket*>::const_iterator it;
@@ -321,7 +321,7 @@ public:
virtual EModRet OnPrivCTCP(CNick& Nick, CString& sMessage) override
{
if (sMessage.Equals("DCC SCHAT ", false, 10)) {
if (sMessage.StartsWith("DCC SCHAT ")) {
// chat ip port
unsigned long iIP = sMessage.Token(3).ToULong();
unsigned short iPort = sMessage.Token(4).ToUShort();