mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
More stuff
This commit is contained in:
parent
7b9174b692
commit
16dfbb003b
3 changed files with 7 additions and 8 deletions
|
@ -2722,7 +2722,7 @@ dclass DistributedBlackCatMgr : DistributedObject {
|
|||
};
|
||||
|
||||
dclass DistributedReportMgr : DistributedObject {
|
||||
sendRequest(uint32, string) airecv;
|
||||
sendReport(uint32, string) airecv clsend;
|
||||
};
|
||||
|
||||
dclass DistributedPolarBearMgr : DistributedObject {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue