Пример #1
0
        private void ICD_Logout(int clientID, HEADER obj)
        {
            DelUser(obj.msgUser);
            HEADER pack = new HEADER();

            pack.FillServerHeader(DEF.CMD_Logout);
            ICDPacketMgr.GetInst().sendMsgToClient(clientID, pack);
        }
Пример #2
0
        private void ICD_NewUser(int clientID, HEADER obj)
        {
            User msg = obj as User;

            if (DatabaseMgr.GetUserInfo(msg.userID) != null)
            {
                HEADER pack = new HEADER();
                pack.FillServerHeader(DEF.CMD_NewUser);
                pack.msgErr = DEF.ERR_HaveID;
                ICDPacketMgr.GetInst().sendMsgToClient(clientID, pack);
            }
            else
            {
                DatabaseMgr.NewUser(msg);

                HEADER pack = new HEADER();
                pack.FillServerHeader(DEF.CMD_NewUser);
                ICDPacketMgr.GetInst().sendMsgToClient(clientID, pack);
            }
        }