mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
string
This commit is contained in:
parent
4af9696c6c
commit
3feeeb28ed
@ -129,6 +129,7 @@ class BotChannels():
|
|||||||
return nick_id
|
return nick_id
|
||||||
|
|
||||||
def add_to_channel(self, channel, nick, nick_id=None):
|
def add_to_channel(self, channel, nick, nick_id=None):
|
||||||
|
channel = str(channel)
|
||||||
if not nick_id:
|
if not nick_id:
|
||||||
nick_id = self.whois_ident(nick)
|
nick_id = self.whois_ident(nick)
|
||||||
if channel.lower() not in list(self.dict['list'].keys()):
|
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))
|
self.dict['list'][channel.lower()]['users'].append(int(nick_id))
|
||||||
|
|
||||||
def remove_from_channel(self, channel, nick, nick_id=None):
|
def remove_from_channel(self, channel, nick, nick_id=None):
|
||||||
|
channel = str(channel)
|
||||||
if not nick_id:
|
if not nick_id:
|
||||||
nick_id = self.whois_ident(nick)
|
nick_id = self.whois_ident(nick)
|
||||||
if channel.lower() not in list(self.dict['list'].keys()):
|
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)
|
self.dict['list'][channel.lower()]['users'].remove(nick_id)
|
||||||
|
|
||||||
def remove_all_from_channel(self, channel):
|
def remove_all_from_channel(self, channel):
|
||||||
|
channel = str(channel)
|
||||||
if channel.lower() not in list(self.dict['list'].keys()):
|
if channel.lower() not in list(self.dict['list'].keys()):
|
||||||
self.dict['list'][channel.lower()] = dict()
|
self.dict['list'][channel.lower()] = dict()
|
||||||
if 'users' not in self.dict['list'][channel.lower()]:
|
if 'users' not in self.dict['list'][channel.lower()]:
|
||||||
|
|||||||
@ -228,5 +228,8 @@ class BotUsers():
|
|||||||
def mode(self, bot, trigger):
|
def mode(self, bot, trigger):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def targetcheck(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
users = BotUsers()
|
users = BotUsers()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user