From d4b13efef85f0895756ce63e7d8bf572634d43d0 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 3 Jun 2015 22:15:01 +0300 Subject: [PATCH] DANIEL: remove adminChat --- dependencies/astron/dclass/stride.dc | 1 - otp/chat/ChatAgent.py | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/dependencies/astron/dclass/stride.dc b/dependencies/astron/dclass/stride.dc index 8635cc7f..084814b2 100644 --- a/dependencies/astron/dclass/stride.dc +++ b/dependencies/astron/dclass/stride.dc @@ -164,7 +164,6 @@ dclass MagicWordManager : DistributedObject { }; dclass ChatAgent : DistributedObject { - adminChat(uint32 aboutId, string message); chatMessage(string(0-256) message, uint8 chatMode) clsend; whisperMessage(uint32 receiverAvId, string(0-256) message) clsend; }; diff --git a/otp/chat/ChatAgent.py b/otp/chat/ChatAgent.py index 4b75c258..15a277a5 100755 --- a/otp/chat/ChatAgent.py +++ b/otp/chat/ChatAgent.py @@ -1,19 +1,17 @@ from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal -from pandac.PandaModules import * -from otp.otpbase import OTPGlobals from otp.ai.MagicWordGlobal import * class ChatAgent(DistributedObjectGlobal): + def __init__(self, cr): DistributedObjectGlobal.__init__(self, cr) + self.cr.chatAgent = self self.chatMode = 0 def delete(self): self.ignoreAll() - self.cr.chatManager = None self.cr.chatAgent = None DistributedObjectGlobal.delete(self) - return def verifyMessage(self, message): try: @@ -21,12 +19,6 @@ class ChatAgent(DistributedObjectGlobal): return True except: return False - - def adminChat(self, aboutId, message): - if not self.verifyMessage(message): - return - self.notify.warning('Admin Chat(%s): %s' % (aboutId, message)) - messenger.send('adminChat', [aboutId, message]) def sendChatMessage(self, message): if not self.verifyMessage(message):