Respect !simple for !gstats/!pstats

This commit is contained in:
nyuszika7h 2014-02-21 10:25:53 +01:00
parent d051330b0f
commit 35a7e02f81

View File

@ -2965,6 +2965,9 @@ def game_stats(cli, nick, chan, rest):
# List all games sizes and totals if no size is given.
if rest == "":
if chan == nick:
pm(cli, nick, var.get_game_totals())
else:
cli.msg(chan, var.get_game_totals())
return
@ -2975,6 +2978,9 @@ def game_stats(cli, nick, chan, rest):
return
# Attempt to find game stats for the given game size.
if chan == nick:
pm(nick, var.get_game_stats(int(rest)))
else:
cli.msg(chan, var.get_game_stats(int(rest)))
@pmcmd("gamestats", "gstats")
@ -3015,10 +3021,16 @@ def player_stats(cli, nick, chan, rest):
# List the player's total games for all roles if no role is given
if len(params) < 2:
if chan == nick:
pm(cli, nick, var.get_player_totals(acc))
else:
cli.msg(chan, var.get_player_totals(acc))
else:
role = " ".join(params[1:]).lower()
# Attempt to find the player's stats.
if chan == nick:
pm(cli, nick, var.get_player_stats(acc, role))
else:
cli.msg(chan, var.get_player_stats(acc, role))
@pmcmd("playerstats", "pstats", "player", "p")