mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
patch
This commit is contained in:
parent
69594b9e4f
commit
a65b7dcfae
@ -5,11 +5,14 @@ This is the SpiceBot Server system.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from .Config import config as botconfig
|
from .Config import config as botconfig
|
||||||
|
from .osd import SpiceBot_OSD
|
||||||
|
from .Kick import SpiceBot_Kick
|
||||||
|
|
||||||
|
|
||||||
class BotServer():
|
class BotServer():
|
||||||
"""This Logs all server values of relevance'"""
|
"""This Logs all server values of relevance'"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.setup_isupport()
|
||||||
self.linenumber = 0
|
self.linenumber = 0
|
||||||
self.dict = {
|
self.dict = {
|
||||||
"host_connect": botconfig.core.host,
|
"host_connect": botconfig.core.host,
|
||||||
@ -23,6 +26,10 @@ class BotServer():
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def setup_isupport(self):
|
||||||
|
botconfig.define_section("SpiceBot_OSD", SpiceBot_OSD, validate=False)
|
||||||
|
botconfig.define_section("SpiceBot_Kick", SpiceBot_Kick, validate=False)
|
||||||
|
|
||||||
def rpl_welcome(self, trigger):
|
def rpl_welcome(self, trigger):
|
||||||
self.dict["host"] = str(trigger.sender).lower()
|
self.dict["host"] = str(trigger.sender).lower()
|
||||||
|
|
||||||
@ -42,6 +49,8 @@ class BotServer():
|
|||||||
|
|
||||||
key, raw_value = param.split('=')
|
key, raw_value = param.split('=')
|
||||||
if ',' not in raw_value:
|
if ',' not in raw_value:
|
||||||
|
if str(raw_value).isdigit():
|
||||||
|
setting_value = int(raw_value)
|
||||||
self.isupport[key] = raw_value
|
self.isupport[key] = raw_value
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,6 @@ def setup_osd(bot):
|
|||||||
# verify config settings for server
|
# verify config settings for server
|
||||||
logs.log('SpiceBot_OSD', "Checking for config settings")
|
logs.log('SpiceBot_OSD', "Checking for config settings")
|
||||||
bot.config.define_section("SpiceBot_OSD", SpiceBot_OSD, validate=False)
|
bot.config.define_section("SpiceBot_OSD", SpiceBot_OSD, validate=False)
|
||||||
botconfig.define_section("SpiceBot_OSD", SpiceBot_OSD, validate=False)
|
|
||||||
|
|
||||||
|
|
||||||
def setup_kick(bot):
|
def setup_kick(bot):
|
||||||
@ -149,7 +148,6 @@ def setup_kick(bot):
|
|||||||
# verify config settings for server
|
# verify config settings for server
|
||||||
logs.log('SpiceBot_Kick', "Checking for config settings")
|
logs.log('SpiceBot_Kick', "Checking for config settings")
|
||||||
bot.config.define_section("SpiceBot_Kick", SpiceBot_Kick, validate=False)
|
bot.config.define_section("SpiceBot_Kick", SpiceBot_Kick, validate=False)
|
||||||
botconfig.define_section("SpiceBot_Kick", SpiceBot_Kick, validate=False)
|
|
||||||
|
|
||||||
|
|
||||||
def setup_gif(bot):
|
def setup_gif(bot):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user