随笔 - 298  文章 - 377  trackbacks - 0
<2012年4月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

常用链接

留言簿(34)

随笔分类

随笔档案

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜

Index: C:/ascent svn/src/game/ChatHandler.cpp
===================================================================
--- C:/ascent svn/src/game/ChatHandler.cpp    (revision 1033)
+++ C:/ascent svn/src/game/ChatHandler.cpp    (working copy)
@@ 
-159,7 +159,7 @@
             {
                 pGroup
->SendPacketToAll(data);
             }
-            //sLog.outString("[party] %s: %s", _player->GetName(), msg.c_str());
+            sLog.outString("[party] %s: %s", _player->GetName(), msg.c_str());
             delete data;
             pMsg
=msg.c_str();
             pMisc
=0;
@@ 
-188,7 +188,8 @@
                         data2 
<< uint32(C_R_DONT_HAVE_PERMISSION);
                         SendPacket(
&data2);
                     }
-                }
+                    sLog.outString("[gld:%s] %s: %s", pGuild->GetGuildName().c_str(), _player->GetName(), msg.c_str());
+                } 
             }
             pMsg
=msg.c_str();
             pMisc
=0;
@@ 
-216,6 +217,7 @@
                         data2 
<< uint32(C_R_DONT_HAVE_PERMISSION);
                         SendPacket(
&data2);
                     }
+                    sLog.outString("[off:%s] %s: %s", pGuild->GetGuildName().c_str(), _player->GetName(), msg.c_str());
                 }
             }
             pMsg
=msg.c_str();
@@ 
-323,7 +325,7 @@
             
if(chn) 
                 chn
->Say(GetPlayer(),msg.c_str());
 
-            //sLog.outString("[%s] %s: %s", channel.c_str(), _player->GetName(), msg.c_str());
+            sLog.outString("[chn:%s] %s: %s", channel.c_str(), _player->GetName(), msg.c_str());
             pMsg
=msg.c_str();
             pMisc
=channel.c_str();
posted on 2007-08-26 15:07 聂文龙 阅读(489) 评论(2)  编辑 收藏 引用 所属分类: ascent

FeedBack:
# re: [代码]增加控制台的 聊天记录 功能 2007-08-26 20:40 rocketman
Nice blog and great work,Keep going!  回复  更多评论
  
# re: [代码]增加控制台的 聊天记录 功能 2007-08-30 04:41 antrix
怎么实现聊天纪录呢?纪录到哪里了?搞不定  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理