From 3feeeb28ed43b72bc61a591f874345b9a154fd1d Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 11 Jun 2019 08:04:47 -0400 Subject: [PATCH] string --- sopel_modules/SpiceBot/Channels.py | 3 +++ sopel_modules/SpiceBot/Users.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sopel_modules/SpiceBot/Channels.py b/sopel_modules/SpiceBot/Channels.py index aac6c93..22dcc6e 100644 --- a/sopel_modules/SpiceBot/Channels.py +++ b/sopel_modules/SpiceBot/Channels.py @@ -129,6 +129,7 @@ class BotChannels(): return nick_id def add_to_channel(self, channel, nick, nick_id=None): + channel = str(channel) if not nick_id: nick_id = self.whois_ident(nick) if channel.lower() not in list(self.dict['list'].keys()): @@ -139,6 +140,7 @@ class BotChannels(): self.dict['list'][channel.lower()]['users'].append(int(nick_id)) def remove_from_channel(self, channel, nick, nick_id=None): + channel = str(channel) if not nick_id: nick_id = self.whois_ident(nick) if channel.lower() not in list(self.dict['list'].keys()): @@ -149,6 +151,7 @@ class BotChannels(): self.dict['list'][channel.lower()]['users'].remove(nick_id) def remove_all_from_channel(self, channel): + channel = str(channel) if channel.lower() not in list(self.dict['list'].keys()): self.dict['list'][channel.lower()] = dict() if 'users' not in self.dict['list'][channel.lower()]: diff --git a/sopel_modules/SpiceBot/Users.py b/sopel_modules/SpiceBot/Users.py index b246318..6a54912 100644 --- a/sopel_modules/SpiceBot/Users.py +++ b/sopel_modules/SpiceBot/Users.py @@ -228,5 +228,8 @@ class BotUsers(): def mode(self, bot, trigger): return + def targetcheck(self): + return True + users = BotUsers()