mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user