This commit is contained in:
deathbybandaid 2019-06-11 08:04:47 -04:00
parent 4af9696c6c
commit 3feeeb28ed
2 changed files with 6 additions and 0 deletions

View File

@ -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()]:

View File

@ -228,5 +228,8 @@ class BotUsers():
def mode(self, bot, trigger):
return
def targetcheck(self):
return True
users = BotUsers()