diff options
| author | 2018-09-01 20:40:26 +0100 | |
|---|---|---|
| committer | 2018-09-01 20:40:26 +0100 | |
| commit | 93a818ed977e57b27f23e72a52455dd6fc4a1a57 (patch) | |
| tree | 04737dd04ff027d72719eb3a93dfdba9c3a1bea7 /modules | |
| parent | Toast off ducks.py with .duckstats (diff) | |
| signature | ||
Revert "Toast off ducks.py with .duckstats"
This reverts commit 3044b83
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/ducks.py | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/modules/ducks.py b/modules/ducks.py index 20621212..3056d7bb 100644 --- a/modules/ducks.py +++ b/modules/ducks.py @@ -28,11 +28,8 @@ class Module(object): help="See who the friendliest people to ducks are!") events.on("received.command.killers").hook(self.duck_enemies, help="See who shoots the most amount of ducks.") - events.on("received.command.duckstats").hook(self.duck_stats, - help="Shows the total " - "amount of ducks " - "you've shot and " - "befriended") + # events.on("received.command.ducks").hook(self.duck_list, + # help="Shows a list of the most popular duck superstars.") events.on("postboot").on("configure").on( @@ -222,42 +219,3 @@ class Module(object): next_decoy_time = self.get_random_duck_time() self.bot.add_timer("duck-decoy", next_decoy_time, persist=False, server=event["server"], channel=event["target"]) - - def duck_stats(self, event): - user = event["user"] - channel = event["target"].name - nick = user.nickname - id = user.id - - poached = user.get_channel_settings_per_setting("ducks-shot", 0 - ) - friends = user.get_channel_settings_per_setting( - "ducks-befriended", 0 - ) - - channel_friends = 0 - channel_poached = 0 - - total_friends = 0 - total_poached = 0 - - for room, number in friends: - if room == channel: - channel_friends = number - total_friends += number - else: - total_friends += number - - for room, number in poached: - if room == channel: - channel_poached = number - total_poached += number - else: - total_poached += number - - event["stdout"].write( - nick + ": " + str(total_poached) + " ducks killed (" + str( - channel_poached) + " in " + channel + "), and " + str( - total_friends) + " ducks befriended (" + str(channel_friends) - + " in " + channel + ")") - |
