mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-11-01 01:07:54 +00:00
21 lines
675 B
Python
21 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])
|