本文整理汇总了C++中LPDESC::IsAdminMode方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDESC::IsAdminMode方法的具体用法?C++ LPDESC::IsAdminMode怎么用?C++ LPDESC::IsAdminMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDESC
的用法示例。
在下文中一共展示了LPDESC::IsAdminMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Analyze
//.........这里部分代码省略.........
TPacketGGCheckAwakeness packet;
packet.bHeader = HEADER_GG_CHECK_AWAKENESS;
P2P_MANAGER::instance().Send(&packet, sizeof(packet));
}
else if (!stBuf.compare("PACKET_INFO"))
{
m_pMainPacketInfo->Log("packet_info.txt");
stResult = "OK";
}
else if (!stBuf.compare("PROFILE"))
{
CProfiler::instance().Log("profile.txt");
stResult = "OK";
}
//gift notify delete command
else if (!stBuf.compare(0,15,"DELETE_AWARDID "))
{
char szTmp[64];
std::string msg = stBuf.substr(15,26); // item_award의 id범위?
TPacketDeleteAwardID p;
p.dwID = (DWORD)(atoi(msg.c_str()));
snprintf(szTmp,sizeof(szTmp),"Sent to DB cache to delete ItemAward, id: %d",p.dwID);
//sys_log(0,"%d",p.dwID);
// strlcpy(p.login, msg.c_str(), sizeof(p.login));
db_clientdesc->DBPacket(HEADER_GD_DELETE_AWARDID, 0, &p, sizeof(p));
stResult += szTmp;
}
else
{
stResult = "UNKNOWN";
if (d->IsAdminMode())
{
// 어드민 명령들
if (!stBuf.compare(0, 7, "NOTICE "))
{
std::string msg = stBuf.substr(7, 50);
LogManager::instance().CharLog(0, 0, 0, 1, "NOTICE", msg.c_str(), d->GetHostName());
BroadcastNotice(msg.c_str());
}
else if (!stBuf.compare("CLOSE_PASSPOD"))
{
g_bNoPasspod = true;
stResult += "CLOSE_PASSPOD";
}
else if (!stBuf.compare("OPEN_PASSPOD"))
{
g_bNoPasspod = false;
stResult += "OPEN_PASSPOD";
}
else if (!stBuf.compare("SHUTDOWN"))
{
LogManager::instance().CharLog(0, 0, 0, 2, "SHUTDOWN", "", d->GetHostName());
TPacketGGShutdown p;
p.bHeader = HEADER_GG_SHUTDOWN;
P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShutdown));
sys_err("Accept shutdown command from %s.", d->GetHostName());
Shutdown(10);
}
else if (!stBuf.compare("SHUTDOWN_ONLY"))
{
LogManager::instance().CharLog(0, 0, 0, 2, "SHUTDOWN", "", d->GetHostName());
sys_err("Accept shutdown only command from %s.", d->GetHostName());
Shutdown(10);