DANIEL: Whisper shit

This commit is contained in:
John 2015-06-04 19:24:47 +03:00 committed by Loudrob
parent ea03518ab3
commit eab3216fd8
4 changed files with 2 additions and 20 deletions

View file

@ -165,7 +165,6 @@ dclass MagicWordManager : DistributedObject {
dclass ChatAgent : DistributedObject {
chatMessage(string(0-256) message, uint8 chatMode) clsend;
whisperMessage(uint32 receiverAvId, string(0-256) message) clsend;
};
dclass FriendManager : DistributedObject {

View file

@ -189,6 +189,8 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
return
if base.localAvatar.isIgnored(avId):
return
if base.whiteList:
chat = base.whiteList.processThroughAll(chat, self.chatGarbler)
self.displayTalkWhisper(avId, chat)
def displayTalk(self, chat):

View file

@ -25,11 +25,6 @@ class ChatAgent(DistributedObjectGlobal):
return
self.sendUpdate('chatMessage', [message, self.chatMode])
def sendWhisperMessage(self, receiverAvId, message):
if not self.verifyMessage(message):
return
self.sendUpdate('whisperMessage', [receiverAvId, message])
@magicWord(category=CATEGORY_MODERATOR, types=[int])
def chatmode(mode=-1):
""" Set the chat mode of the current avatar. """

View file

@ -37,18 +37,4 @@ class ChatAgentUD(DistributedObjectGlobalUD):
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
dg = DistributedAvatar.aiFormatUpdate('setTalk', sender, self.chatMode2channel.get(chatMode, sender), self.air.ourChannel, [message])
self.air.send(dg)
def whisperMessage(self, receiverAvId, message):
sender = self.air.getAvatarIdFromSender()
if sender == 0:
self.air.writeServerEvent('suspicious', accId=self.air.getAccountIdFromSender(),
issue='Account sent chat without an avatar', message=message)
return
self.air.writeServerEvent('whisper-said', avId=sender, reciever=receiverAvId, msg=message)
DistributedAvatar = self.air.dclassesByName['DistributedAvatarUD']
dg = DistributedAvatar.aiFormatUpdate('setTalkWhisper', receiverAvId, receiverAvId, self.air.ourChannel, [sender, message])
self.air.send(dg)