禁言相关修改
parent
d26f1239ab
commit
5383dbade1
|
@ -95,17 +95,13 @@ public class ChatLogic {
|
|||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
if(playerInfoManager.getSilence()==1){
|
||||
MessageUtil.sendErrorResponse(iSession,0,msgId,"您已被系统禁言");
|
||||
return;
|
||||
}
|
||||
FriendManager friendManager = user.getFriendManager();
|
||||
|
||||
long nowTime = System.currentTimeMillis();
|
||||
String tmp = SensitivewordFilter.replaceSensitiveWord(message, 1, "*");
|
||||
|
||||
|
||||
if(!tmp.equals(message)){
|
||||
if(!tmp.equals(message)||playerInfoManager.getSilence()==1){
|
||||
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,tmp,nowTime,-1);
|
||||
ChatProto.SendChatInfoResponse response = ChatProto.SendChatInfoResponse.newBuilder().setChatInfo(chatInfo).build();
|
||||
MessageUtil.sendMessage(iSession,1,msgId,response,true);
|
||||
|
|
Loading…
Reference in New Issue