cmdchanneltalk.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:20k
- #include "stdafx.h"
- #include "XmudOS.h"
- #include "CommandCheck.h"
- #include "CmdPlayerLogon.h"
- #include "CmdEmote.h"
- #include "Common.h"
- #include "npcnpc.h"
- #include "mapmapinfo.h"
- extern rmfullglobals myglobs;
- extern CList <TChatChannel*,TChatChannel*>chatchannellist;
- extern CList <TClientConData *,TClientConData* >playersocketlist;
- extern CList <TAdminConData *,TAdminConData* >adminsocketlist;
- void CCommandCheck::ExitChannelProc(CPlayerInfo *lpPlayerInfo, char *Result)
- {
- TChatChannel* lpChatChannel;
- EnterCriticalSection(&myglobs.csChatChannel);
- POSITION pos, lastpos;
- pos = chatchannellist.GetHeadPosition();
- while(pos) {
- lastpos = pos;
- lpChatChannel = chatchannellist.GetNext(pos);
- if (lpChatChannel->lpPlayerInfo->szUserName == lpPlayerInfo->szUserName) {
- chatchannellist.RemoveAt(lastpos);
- delete lpChatChannel;
- LeaveCriticalSection(&myglobs.csChatChannel);
- sprintf(Result, "%s