mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test
This commit is contained in:
parent
4bcd12aa60
commit
c8be560387
@ -38,29 +38,33 @@ class BotServer():
|
||||
|
||||
parameters = trigger.args[1:-1]
|
||||
for param in parameters:
|
||||
|
||||
# check for value associated with the parameter
|
||||
if '=' in param:
|
||||
if param.startswith("TARGMAX"):
|
||||
param = str(param).split('=')[1]
|
||||
settings = str(param).split(',')
|
||||
for setting in settings:
|
||||
settingname = str(setting).split(':')[0]
|
||||
if settingname.upper() in ['NOTICE', 'PRIVMSG']:
|
||||
try:
|
||||
value = str(setting).split(':')[1] or None
|
||||
except IndexError:
|
||||
value = None
|
||||
if value:
|
||||
if settingname.upper() == 'NOTICE':
|
||||
botconfig.SpiceBot_OSD.notice = int(value)
|
||||
elif settingname.upper() == 'PRIVMSG':
|
||||
botconfig.SpiceBot_OSD.privmsg = int(value)
|
||||
if settingname.upper() in ['KICK']:
|
||||
try:
|
||||
value = str(setting).split(':')[1] or None
|
||||
except IndexError:
|
||||
value = None
|
||||
if value:
|
||||
botconfig.SpiceBot_Kick.kick = int(value)
|
||||
paramname = str(param).split('=')[0]
|
||||
if param in list(self.isupport.keys()):
|
||||
if param.startswith("TARGMAX"):
|
||||
param = str(param).split('=')[1]
|
||||
settings = str(param).split(',')
|
||||
for setting in settings:
|
||||
settingname = str(setting).split(':')[0]
|
||||
if settingname.upper() in ['NOTICE', 'PRIVMSG']:
|
||||
try:
|
||||
value = str(setting).split(':')[1] or None
|
||||
except IndexError:
|
||||
value = None
|
||||
if value:
|
||||
if settingname.upper() == 'NOTICE':
|
||||
botconfig.SpiceBot_OSD.notice = int(value)
|
||||
elif settingname.upper() == 'PRIVMSG':
|
||||
botconfig.SpiceBot_OSD.privmsg = int(value)
|
||||
if settingname.upper() in ['KICK']:
|
||||
try:
|
||||
value = str(setting).split(':')[1] or None
|
||||
except IndexError:
|
||||
value = None
|
||||
if value:
|
||||
botconfig.SpiceBot_Kick.kick = int(value)
|
||||
|
||||
|
||||
server = BotServer()
|
||||
|
||||
@ -23,4 +23,7 @@ def parse_event_005(bot, trigger):
|
||||
SpiceBot.server.linenumber += 1
|
||||
parameters = trigger.args[1:-1]
|
||||
for param in parameters:
|
||||
bot.osd(str(param), "#deathbybandaid")
|
||||
if '=' in param:
|
||||
paramname = str(param).split('=')[0]
|
||||
paramvalue = str(param).split('=')[1]
|
||||
bot.osd([str(paramname), "=", str(paramvalue)], "#deathbybandaid")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user