Skip to content

Commit

Permalink
Merge pull request #338 from PyPlanet/bugfix/328
Browse files Browse the repository at this point in the history
Bugfix/328
  • Loading branch information
tomvlk committed Jun 2, 2017
2 parents 808a061 + 93a4ae8 commit b016c1a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pyplanet/apps/contrib/dedimania/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,10 @@ async def map_begin(self, map, **kwargs):
self.map_uid = self.instance.map_manager.current_map.uid

# Set map status.
self.map_status = map.time_author > 6200 and map.num_checkpoints > 1
self.map_status = map.author_login == 'nadeo' or map.time_author > 6200 and map.num_checkpoints > 1
if not self.map_status:
message = '$f90This map is not supported by Dedimania (min 1 checkpoint + 6.2 seconds or higher author time).'
await self.widget.hide()
return await self.instance.chat(message)

# Refresh script.
Expand Down Expand Up @@ -266,13 +267,10 @@ async def podium_start(self, force=False, **kwargs):
self.ghost_replay = replay

async def map_end(self, map):
if not self.map_status:
logger.warning('Don\'t send dedi records, map not supported or we are offline!')
if self.map_status is False:
logger.warning('Don\'t send dedi records, map not supported!')
return

# Clear the current map status.
self.map_status = None

if not self.v_replay:
return

Expand Down

0 comments on commit b016c1a

Please sign in to comment.