void CUser::DelCharToAgent(Packet & pkt) { Packet result(WIZ_DEL_CHAR); std::string strUserID, strSocNo; uint8 bCharIndex; pkt >> bCharIndex >> strUserID >> strSocNo; if (bCharIndex > 2 || strUserID.empty() || strUserID.size() > MAX_ID_SIZE || strSocNo.empty() || strSocNo.size() > 15 || isClanLeader()) { result << uint8(0) << uint8(-1); Send(&result); return; } // Process the deletion request in the database result << bCharIndex << strUserID << strSocNo; g_pMain->AddDatabaseRequest(result, this); }
void CUser::DelCharToAgent(Packet & pkt) { Packet result(WIZ_DEL_CHAR); std::string strUserID, strSocNo; uint8 bCharIndex; pkt >> bCharIndex >> strUserID >> strSocNo; if (bCharIndex > 2 || strUserID.empty() || strUserID.size() > MAX_ID_SIZE || strSocNo.empty() || strSocNo.size() > 15 || isClanLeader()) { result << uint8(0) << uint8(-1); Send(&result); return; } // Send packet to Aujard result << m_strAccountID << bCharIndex << strUserID << strSocNo; g_pMain->m_LoggerSendQueue.PutData(&result, GetSocketID()); }