Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PyPlanet/PyPlanet
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvlk committed Jun 21, 2017
2 parents a3c7aff + 40dadbe commit c354c43
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pyplanet/apps/contrib/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,21 @@ async def on_chat(self, player, text, cmd, **kwargs):
))

async def set_mode(self, player, data, **kwargs):
mode = (' '.join(data.mode)).lower()
mode = (' '.join(data.mode))
lower_mode = mode.lower()

if mode == 'ta' or mode == 'timeattack':
if lower_mode == 'ta' or lower_mode == 'timeattack':
mode = 'TimeAttack.Script.txt'
elif mode == 'laps':
elif lower_mode == 'laps':
mode = 'Laps.Script.txt'
elif mode == 'rounds':
elif lower_mode == 'rounds':
mode = 'Rounds.Script.txt'
elif mode == 'cup':
elif lower_mode == 'cup':
mode = 'Cup.Script.txt'
elif mode == 'chase':
elif lower_mode == 'chase':
mode = 'Chase.Script.txt'
elif lower_mode == 'team':
mode = 'Team.Script.txt'

try:
await self.instance.mode_manager.set_next_script(mode)
Expand Down

0 comments on commit c354c43

Please sign in to comment.