Take correct amount of arguments

(otherwise string isn't fetched and world crashes)
This commit is contained in:
rsakeys 2019-09-23 01:50:18 +04:00
parent e228262b0d
commit 96109b5b3c

View File

@ -40,13 +40,13 @@ class Room(db.Model):
p.room = self p.room = self
if p.client_type == ClientType.Vanilla: if p.client_type == ClientType.Vanilla:
if p.data.stealth_moderator: if p.data.stealth_moderator:
await p.send_xt('jr', self.id, (await self.get_string(p) + await p.string)) await p.send_xt('jr', self.id, (await self.get_string() + await p.string))
await p.send_xt('ap', await p.string) await p.send_xt('ap', await p.string)
else: else:
await p.send_xt('jr', self.id, await self.get_string(p)) await p.send_xt('jr', self.id, await self.get_string())
await self.send_xt('ap', await p.string) await self.send_xt('ap', await p.string)
else: else:
await p.send_xt('jr', self.id, await self.get_string(p)) await p.send_xt('jr', self.id, await self.get_string())
await self.send_xt('ap', await p.string) await self.send_xt('ap', await p.string)
if self.game: if self.game:
@ -74,8 +74,8 @@ class Room(db.Model):
async def refresh(self, p): async def refresh(self, p):
if p.client_type == ClientType.Vanilla: if p.client_type == ClientType.Vanilla:
return await p.send_xt('grs', self.id, (await self.get_string(p) + await p.string)) return await p.send_xt('grs', self.id, (await self.get_string() + await p.string))
await p.send_xt('grs', self.id, await self.get_string(p)) await p.send_xt('grs', self.id, await self.get_string())
async def get_string(self): async def get_string(self):
return '%'.join([await p.string for p in self.penguins_by_id.values()]) return '%'.join([await p.string for p in self.penguins_by_id.values()])