当前位置: 首页>>代码示例>>C++>>正文


C++ CString::AsUpper方法代码示例

本文整理汇总了C++中CString::AsUpper方法的典型用法代码示例。如果您正苦于以下问题:C++ CString::AsUpper方法的具体用法?C++ CString::AsUpper怎么用?C++ CString::AsUpper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CString的用法示例。


在下文中一共展示了CString::AsUpper方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HandleMessage

 void HandleMessage(CNick& Nick, const CString& sMessage) {
     CString sNickServName = (!GetNV("NickServName").empty())
                                 ? GetNV("NickServName")
                                 : "NickServ";
     if (!GetNV("Password").empty() && Nick.NickEquals(sNickServName) &&
         (sMessage.find("msg") != CString::npos ||
          sMessage.find("authenticate") != CString::npos ||
          sMessage.find("choose a different nickname") != CString::npos ||
          sMessage.find("please choose a different nick") != CString::npos ||
          sMessage.find("If this is your nick, identify yourself with") !=
              CString::npos ||
          sMessage.find("If this is your nick, type") != CString::npos ||
          sMessage.find("This is a registered nickname, please identify") !=
              CString::npos ||
          sMessage.StripControls_n().find(
              "type /NickServ IDENTIFY password") != CString::npos ||
          sMessage.StripControls_n().find(
              "type /msg NickServ IDENTIFY password") != CString::npos) &&
         sMessage.AsUpper().find("IDENTIFY") != CString::npos &&
         sMessage.find("help") == CString::npos) {
         MCString msValues;
         msValues["password"] = GetNV("Password");
         PutIRC(CString::NamedFormat(GetNV("IdentifyCmd"), msValues));
     }
 }
开发者ID:sctigercat1,项目名称:znc,代码行数:25,代码来源:nickserv.cpp

示例2: IsCtcpNotifier

    bool IsCtcpNotifier(const CString& sCtcp) {
        // Return true if we want all ctcps notified to us, or if "ctcp_"+sCtcp exists.
        // CTCP ACTIONs are the only CTCP query we choose to ignore all the time.
        if (sCtcp.Equals("ACTION"))
            return false;

        return !GetNV("ctcp_showall").empty() || !GetNV("ctcp_" + sCtcp.AsUpper()).empty();
    }
开发者ID:ChaoticDividend,项目名称:znc-modules,代码行数:8,代码来源:ctcp_notifier.cpp

示例3: AddCTCPReply

bool CUser::AddCTCPReply(const CString& sCTCP, const CString& sReply) {
	if (sCTCP.empty()) {
		return false;
	}

	m_mssCTCPReplies[sCTCP.AsUpper()] = sReply;
	return true;
}
开发者ID:BGCX261,项目名称:znc-msvc-svn-to-git,代码行数:8,代码来源:User.cpp

示例4: GetISupport

CString CIRCSock::GetISupport(const CString& sKey, const CString& sDefault) const {
    MCString::const_iterator i = m_mISupport.find(sKey.AsUpper());
    if (i == m_mISupport.end()) {
        return sDefault;
    } else {
        return i->second;
    }
}
开发者ID:qermit,项目名称:znc,代码行数:8,代码来源:IRCSock.cpp

示例5: HandleMessage

	void HandleMessage(CNick& Nick, const CString& sMessage)
	{
		if (!m_sPass.empty()
				&& Nick.GetNick().Equals("NickServ")
				&& (sMessage.find("msg") != CString::npos
				 || sMessage.find("authenticate") != CString::npos)
				&& sMessage.AsUpper().find("IDENTIFY") != CString::npos
				&& sMessage.find("help") == CString::npos) {
			PutIRC("PRIVMSG NickServ :IDENTIFY " + m_sPass);
		}
	}
开发者ID:ZachBeta,项目名称:znc,代码行数:11,代码来源:nickserv.cpp

示例6: AddCTCPReply

bool CUser::AddCTCPReply(const CString& sCTCP, const CString& sReply) {
	// Reject CTCP requests containing spaces
	if (sCTCP.find_first_of(' ') != CString::npos) {
		return false;
	}
	// Reject empty CTCP requests
	if (sCTCP.empty()) {
		return false;
	}
	m_mssCTCPReplies[sCTCP.AsUpper()] = sReply;
	return true;
}
开发者ID:b3rend,项目名称:znc,代码行数:12,代码来源:User.cpp

示例7: HandleMessage

	void HandleMessage(CNick& Nick, const CString& sMessage) {
		CString sNickServName = (!GetNV("NickServName").empty()) ? GetNV("NickServName") : "NickServ";
		if (!GetNV("Password").empty()
				&& Nick.GetNick().Equals(sNickServName)
				&& (sMessage.find("msg") != CString::npos
				 || sMessage.find("authenticate") != CString::npos
				 || sMessage.find("choose a different nickname") != CString::npos
				 || sMessage.find("If this is your nick, type") != CString::npos
				 || sMessage.find("type /NickServ IDENTIFY password") != CString::npos)
				&& sMessage.AsUpper().find("IDENTIFY") != CString::npos
				&& sMessage.find("help") == CString::npos) {
			MCString msValues;
			msValues["password"] = GetNV("Password");
			PutIRC(CString::NamedFormat(GetNV("IdentifyCmd"), msValues));
		}
	}
开发者ID:KTE,项目名称:znc,代码行数:16,代码来源:nickserv.cpp

示例8: OnModCommand

	void OnModCommand(const CString& sCommand) {
		CString sCmd = sCommand.AsUpper();

		if (sCmd == "ENABLE") {
			Enable();
			PutModule("Trying to get your primary nick");
		} else if (sCmd == "DISABLE") {
			Disable();
			PutModule("No longer trying to get your primary nick");
		} else if (sCmd == "STATE") {
			if (m_pTimer)
				PutModule("Currently trying to get your primary nick");
			else
				PutModule("Currently disabled, try 'enable'");
		} else {
			PutModule("Commands: Enable, Disable, State");
		}
	}
开发者ID:HaleBob,项目名称:znc,代码行数:18,代码来源:keepnick.cpp

示例9: CS

TEST(StringTest, Case) {
	CString x = CS("xx");
	CString X = CS("XX");
	EXPECT_EQ(X, x.AsUpper());
	EXPECT_EQ(x, X.AsLower());
}
开发者ID:54lman,项目名称:znc,代码行数:6,代码来源:StringTest.cpp

示例10: DelCTCPReply

bool CUser::DelCTCPReply(const CString& sCTCP) {
    return m_mssCTCPReplies.erase(sCTCP.AsUpper()) > 0;
}
开发者ID:Un1matr1x,项目名称:znc,代码行数:3,代码来源:User.cpp

示例11: UserCommand


//.........这里部分代码省略.........
			CZNC::Get().SetMotd(sMessage);
			PutStatus("MOTD set to [" + sMessage + "]");
		}
	} else if (m_pUser->IsAdmin() && sCommand.Equals("AddMOTD")) {
		CString sMessage = sLine.Token(1, true);

		if (sMessage.empty()) {
			PutStatus("Usage: AddMOTD <Message>");
		} else {
			CZNC::Get().AddMotd(sMessage);
			PutStatus("Added [" + sMessage + "] to MOTD");
		}
	} else if (m_pUser->IsAdmin() && sCommand.Equals("ClearMOTD")) {
		CZNC::Get().ClearMotd();
		PutStatus("Cleared MOTD");
	} else if (m_pUser->IsAdmin() && sCommand.Equals("BROADCAST")) {
		CZNC::Get().Broadcast(sLine.Token(1, true));
	} else if (m_pUser->IsAdmin() && (sCommand.Equals("SHUTDOWN") || sCommand.Equals("RESTART"))) {
		bool bRestart = sCommand.Equals("RESTART");
		CString sMessage = sLine.Token(1, true);
		bool bForce = false;

		if (sMessage.Token(0).Equals("FORCE")) {
			bForce = true;
			sMessage = sMessage.Token(1, true);
		}

		if (sMessage.empty()) {
			sMessage = (bRestart ? "ZNC is being restarted NOW!" : "ZNC is being shut down NOW!");
		}

		if(!CZNC::Get().WriteConfig() && !bForce) {
			PutStatus("ERROR: Writing config file to disk failed! Aborting. Use " +
				sCommand.AsUpper() + " FORCE to ignore.");
		} else {
			CZNC::Get().Broadcast(sMessage);
			throw CException(bRestart ? CException::EX_Restart : CException::EX_Shutdown);
		}
	} else if (sCommand.Equals("JUMP") || sCommand.Equals("CONNECT")) {
		if (!m_pNetwork) {
			PutStatus("You must be connected with a network to use this command");
			return;
		}

		if (!m_pNetwork->HasServers()) {
			PutStatus("You don't have any servers added.");
			return;
		}

		CString sArgs = sLine.Token(1, true);
		CServer *pServer = NULL;

		if (!sArgs.empty()) {
			pServer = m_pNetwork->FindServer(sArgs);
			if (!pServer) {
				PutStatus("Server [" + sArgs + "] not found");
				return;
			}
			m_pNetwork->SetNextServer(pServer);

			// If we are already connecting to some server,
			// we have to abort that attempt
			Csock *pIRCSock = GetIRCSock();
			if (pIRCSock && !pIRCSock->IsConnected()) {
				pIRCSock->Close();
			}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:67,代码来源:ClientCommand.cpp


注:本文中的CString::AsUpper方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。