Skip to content

Commit

Permalink
Pass a name to AbstractDummyPlayer's constructor in RconDummyPlayer, …
Browse files Browse the repository at this point in the history
…and implemented the "channel" property.
  • Loading branch information
MinoMino committed Dec 4, 2015
1 parent d58128f commit fb917f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/minqlx/_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,16 @@ def tell(self, msg):
raise NotImplementedError("tell() needs to be implemented.")

class RconDummyPlayer(AbstractDummyPlayer):
def __init__(self):
super().__init__(name=self.__class__.__name__)

@property
def steam_id(self):
return minqlx.owner()

@property
def channel(self):
return minqlx.CONSOLE_CHANNEL

def tell(self, msg):
minqlx.CONSOLE_CHANNEL.reply(msg)
self.channel.reply(msg)

0 comments on commit fb917f1

Please sign in to comment.