mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
DANIEL: Whisper shit
This commit is contained in:
parent
ea03518ab3
commit
eab3216fd8
4 changed files with 2 additions and 20 deletions
1
dependencies/astron/dclass/stride.dc
vendored
1
dependencies/astron/dclass/stride.dc
vendored
|
@ -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 {
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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. """
|
||||
|
|
|
@ -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)
|
Loading…
Reference in a new issue