diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index 3cd69b7a..3c9a91f3 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -2722,7 +2722,7 @@ dclass DistributedBlackCatMgr : DistributedObject { }; dclass DistributedReportMgr : DistributedObject { - sendRequest(uint32, string) airecv; + sendReport(uint32, string) airecv clsend; }; dclass DistributedPolarBearMgr : DistributedObject { diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index bb1fee0d..697c0fb6 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 3773405074L +hashVal = 3611798738L from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot diff --git a/toontown/ai/DistributedReportMgrAI.py b/toontown/ai/DistributedReportMgrAI.py index 842aa37f..53205440 100644 --- a/toontown/ai/DistributedReportMgrAI.py +++ b/toontown/ai/DistributedReportMgrAI.py @@ -1,32 +1,31 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.uberdog.ClientServicesManagerUD import executeHttpRequestAndLog -import ReportGlobals, threading +import ReportGlobals, threading, time class DistributedReportMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedReportMgrAI") def __init__(self, air): - DistributedObjectAI.DistributedObjectAI(self, air) + DistributedObjectAI.__init__(self, air) self.reports = [] self.interval = config.GetInt('report-interval', 600) self.scheduleReport() def scheduleReport(self): - threading.Timer(self.interval, self.sendAllReports) + threading.Timer(self.interval, self.sendAllReports).start() def sendReport(self, avId, category): if not ReportGlobals.isValidCategoryName(category) or not len(str(avId)) == 9: return - reporterId = self.air.getAvatarIdFromSender() - reporter = self.air.doId2do.get(reporterId) + reporter = self.air.doId2do.get(self.air.getAvatarIdFromSender()) if not reporter or reporter.isReported(avId): return timestamp = int(round(time.time() * 1000)) - self.reports.append('%s|%s|%s|%s' % (timestamp, reporterId, avId, category)) + self.reports.append('%s|%s|%s|%s' % (timestamp, reporter.doId, avId, category)) def sendAllReports(self): if not self.reports or config.GetString('accountdb-type', 'developer') != 'remote':