import socket, datetime, os
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
from direct.distributed.DistributedObject import DistributedObject
from toontown.toonbase import ToontownGlobals
from toontown.uberdog import InGameNewsResponses

class DistributedInGameNewsMgr(DistributedObject):
    notify = directNotify.newCategory('InGameNewsMgr')
    neverDisable = 1

    def __init__(self, cr):
        DistributedObject.__init__(self, cr)
        base.cr.inGameNewsMgr = self

    def delete(self):
        DistributedObject.delete(self)
        self.cr.inGameNewsMgr = None
        return

    def disable(self):
        self.notify.debug("i'm disabling InGameNewsMgr  rightnow.")
        DistributedObject.disable(self)

    def generate(self):
        self.notify.debug('BASE: generate')
        DistributedObject.generate(self)

    def setLatestIssueStr(self, issueStr):
        self.latestIssueStr = issueStr
        self.latestIssue = base.cr.toontownTimeManager.convertUtcStrToToontownTime(issueStr)
        messenger.send('newIssueOut')
        self.notify.info('latestIssue=%s' % self.latestIssue)

    def getLatestIssueStr(self):
        pass

    def getLatestIssue(self):
        return self.latestIssue

[((12, 8, 12, 44), 'direct.distributed.DistributedObject.DistributedObject.__init__', 'DistributedObject.__init__', ({(12, 35, 12, 39): 'self', (12, 41, 12, 43): 'cr'}, {}), '(self, cr)', False, 'from direct.distributed.DistributedObject import DistributedObject\n'), ((16, 8, 16, 38), 'direct.distributed.DistributedObject.DistributedObject.delete', 'DistributedObject.delete', ({(16, 33, 16, 37): 'self'}, {}), '(self)', False, 'from direct.distributed.DistributedObject import DistributedObject\n'), ((22, 8, 22, 39), 'direct.distributed.DistributedObject.DistributedObject.disable', 'DistributedObject.disable', ({(22, 34, 22, 38): 'self'}, {}), '(self)', False, 'from direct.distributed.DistributedObject import DistributedObject\n'), ((26, 8, 26, 40), 'direct.distributed.DistributedObject.DistributedObject.generate', 'DistributedObject.generate', ({(26, 35, 26, 39): 'self'}, {}), '(self)', False, 'from direct.distributed.DistributedObject import DistributedObject\n')]