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 {
|
dclass ChatAgent : DistributedObject {
|
||||||
adminChat(uint32 aboutId, string message);
|
|
||||||
chatMessage(string(0-256) message, uint8 chatMode) clsend;
|
chatMessage(string(0-256) message, uint8 chatMode) clsend;
|
||||||
whisperMessage(uint32 receiverAvId, string(0-256) message) clsend;
|
whisperMessage(uint32 receiverAvId, string(0-256) message) clsend;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||||
from pandac.PandaModules import *
|
|
||||||
from otp.otpbase import OTPGlobals
|
|
||||||
from otp.ai.MagicWordGlobal import *
|
from otp.ai.MagicWordGlobal import *
|
||||||
|
|
||||||
class ChatAgent(DistributedObjectGlobal):
|
class ChatAgent(DistributedObjectGlobal):
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
DistributedObjectGlobal.__init__(self, cr)
|
DistributedObjectGlobal.__init__(self, cr)
|
||||||
|
self.cr.chatAgent = self
|
||||||
self.chatMode = 0
|
self.chatMode = 0
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
self.cr.chatManager = None
|
|
||||||
self.cr.chatAgent = None
|
self.cr.chatAgent = None
|
||||||
DistributedObjectGlobal.delete(self)
|
DistributedObjectGlobal.delete(self)
|
||||||
return
|
|
||||||
|
|
||||||
def verifyMessage(self, message):
|
def verifyMessage(self, message):
|
||||||
try:
|
try:
|
||||||
|
@ -22,12 +20,6 @@ class ChatAgent(DistributedObjectGlobal):
|
||||||
except:
|
except:
|
||||||
return False
|
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):
|
def sendChatMessage(self, message):
|
||||||
if not self.verifyMessage(message):
|
if not self.verifyMessage(message):
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue