mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 16:57:54 +00:00
20 lines
675 B
Python
20 lines
675 B
Python
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
|
from pandac.PandaModules import *
|
|
from otp.otpbase import OTPGlobals
|
|
|
|
class ChatAgent(DistributedObjectGlobal):
|
|
def __init__(self, cr):
|
|
DistributedObjectGlobal.__init__(self, cr)
|
|
|
|
def delete(self):
|
|
self.ignoreAll()
|
|
self.cr.chatManager = None
|
|
DistributedObjectGlobal.delete(self)
|
|
return
|
|
|
|
def adminChat(self, aboutId, message):
|
|
self.notify.warning('Admin Chat(%s): %s' % (aboutId, message))
|
|
messenger.send('adminChat', [aboutId, message])
|
|
|
|
def sendChatMessage(self, message):
|
|
self.sendUpdate('chatMessage', [message])
|