cmdchanneltalk.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:20k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. #include "stdafx.h"
  2. #include "XmudOS.h"
  3. #include "CommandCheck.h"
  4. #include "CmdPlayerLogon.h"
  5. #include "CmdEmote.h"
  6. #include "Common.h"
  7. #include "npcnpc.h"
  8. #include "mapmapinfo.h"
  9. extern rmfullglobals myglobs;
  10. extern CList <TChatChannel*,TChatChannel*>chatchannellist;
  11. extern CList <TClientConData *,TClientConData* >playersocketlist;
  12. extern CList <TAdminConData *,TAdminConData* >adminsocketlist;
  13. void CCommandCheck::ExitChannelProc(CPlayerInfo *lpPlayerInfo, char *Result)
  14. {
  15. TChatChannel* lpChatChannel;
  16. EnterCriticalSection(&myglobs.csChatChannel);
  17. POSITION pos, lastpos;
  18. pos = chatchannellist.GetHeadPosition();
  19. while(pos) {
  20. lastpos = pos;
  21. lpChatChannel = chatchannellist.GetNext(pos);
  22. if (lpChatChannel->lpPlayerInfo->szUserName == lpPlayerInfo->szUserName) {
  23. chatchannellist.RemoveAt(lastpos);
  24. delete lpChatChannel;
  25. LeaveCriticalSection(&myglobs.csChatChannel);
  26. sprintf(Result, "%s