From 97c4a616c9444bcef1b12378bf712ec70fc36b32 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 1 Jun 2020 11:04:22 +0100 Subject: [PATCH] `channels` needs to be a list and needs enumerate() --- ircrobots/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircrobots/server.py b/ircrobots/server.py index c2deee1..d75e257 100644 --- a/ircrobots/server.py +++ b/ircrobots/server.py @@ -468,8 +468,8 @@ class Server(IServer): elif line.command == RPL_WHOISACCOUNT: obj.account = line.params[2] elif line.command == RPL_WHOISCHANNELS: - channels = filter(bool, line.params[2].split(" ")) - for i, channel in channels: + channels = list(filter(bool, line.params[2].split(" "))) + for i, channel in enumerate(channels): while channel[0] in self.isupport.prefix.prefixes: channel = channel[1:] channels[i] = channel