mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
DANIEL: remove adminChat
This commit is contained in:
parent
898d57dc1f
commit
d4b13efef8
2 changed files with 2 additions and 11 deletions
1
dependencies/astron/dclass/stride.dc
vendored
1
dependencies/astron/dclass/stride.dc
vendored
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue