diff options
| author | 2018-08-31 10:50:37 +0100 | |
|---|---|---|
| committer | 2018-08-31 10:50:37 +0100 | |
| commit | abed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch) | |
| tree | 3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/channel_save.py | |
| parent | Fix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff) | |
Reformat
Diffstat (limited to 'modules/channel_save.py')
| -rw-r--r-- | modules/channel_save.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/channel_save.py b/modules/channel_save.py index c70d8751..34307b30 100644 --- a/modules/channel_save.py +++ b/modules/channel_save.py @@ -1,5 +1,3 @@ - - class Module(object): def __init__(self, bot): bot.events.on("received.numeric.001").hook( @@ -8,14 +6,15 @@ class Module(object): bot.events.on("self.kick").hook(self.on_kick) def on_connect(self, event): - channels = event["server"].get_setting("autojoin", []) + channels = event["server"].get_setting("autojoin", []) chan_keys = event["server"].get_setting("channel_keys", {}) channels_sorted = sorted(channels, - key=lambda x: 0 if x in chan_keys else 1) + key=lambda x: 0 if x in chan_keys else 1) keys_sorted = list(map(lambda x: x[1], - sorted(chan_keys.items(), - key=lambda x: channels_sorted.index(x[0])))) + sorted(chan_keys.items(), + key=lambda x: channels_sorted.index( + x[0])))) for i in range(len(channels_sorted)): channel = channels_sorted[i] |
