mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-12 06:29:54 -05:00
test
This commit is contained in:
parent
be2d0eea2a
commit
400c08af90
@ -23,6 +23,9 @@ class SpiceBot_AI_MainSection(StaticSection):
|
||||
class SpiceBot_AI():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
botconfig.define_section("SpiceBot_AI", SpiceBot_AI_MainSection, validate=False)
|
||||
|
||||
self.braindirs = []
|
||||
self.dict = {
|
||||
"counts": 0,
|
||||
@ -49,9 +52,6 @@ class SpiceBot_AI():
|
||||
# Load bot values
|
||||
self.load_bot_values()
|
||||
|
||||
def botai_config(self):
|
||||
botconfig.define_section("SpiceBot_AI", SpiceBot_AI_MainSection, validate=False)
|
||||
|
||||
def load_saved_brain(self):
|
||||
if os.path.isfile(botconfig.config.aibrain):
|
||||
self.aiml_kernel.bootstrap(brainFile=botconfig.config.aibrain)
|
||||
|
||||
@ -77,20 +77,20 @@ class BotChannels():
|
||||
self.lock.release()
|
||||
|
||||
def join_all_channels(self, bot):
|
||||
if bot.config.SpiceBot_Channels.joinall:
|
||||
if botconfig.SpiceBot_Channels.joinall:
|
||||
for channel in self.dict['list'].keys():
|
||||
if channel.startswith("#"):
|
||||
if channel not in bot.channels.keys() and channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||
if channel not in bot.channels.keys() and channel not in botconfig.SpiceBot_Channels.chanignore:
|
||||
bot.write(('JOIN', bot.nick, self.dict['list'][channel]['name']))
|
||||
if channel not in bot.channels.keys() and bot.config.SpiceBot_Channels.operadmin:
|
||||
if channel not in bot.channels.keys() and botconfig.SpiceBot_Channels.operadmin:
|
||||
bot.write(('SAJOIN', bot.nick, self.dict['list'][channel]['name']))
|
||||
|
||||
def chanadmin_all_channels(self, bot):
|
||||
# Chan ADMIN +a
|
||||
for channel in bot.channels.keys():
|
||||
if channel.startswith("#"):
|
||||
if channel not in bot.config.SpiceBot_Channels.chanignore:
|
||||
if bot.config.SpiceBot_Channels.operadmin:
|
||||
if channel not in bot.configSpiceBot_Channels.chanignore:
|
||||
if botconfig.SpiceBot_Channels.operadmin:
|
||||
if not bot.channels[channel].privileges[bot.nick] < sopel.module.ADMIN:
|
||||
bot.write(('SAMODE', channel, "+a", bot.nick))
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user