mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
fix
This commit is contained in:
parent
2d59d187a7
commit
86ff8547bd
@ -62,8 +62,21 @@ def bot_command_damnlazy_b(bot, trigger):
|
|||||||
@sopel.module.nickname_commands('(.*)')
|
@sopel.module.nickname_commands('(.*)')
|
||||||
def bot_command_nick(bot, trigger):
|
def bot_command_nick(bot, trigger):
|
||||||
|
|
||||||
triggerargs, triggercommand, fulltrigger, canrun = bot_command_nick_setup(bot, trigger)
|
while not bot_events_check(bot, ['1004', '2002']):
|
||||||
if not canrun:
|
pass
|
||||||
|
|
||||||
|
triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command')
|
||||||
|
|
||||||
|
if not triggercommand:
|
||||||
|
return
|
||||||
|
|
||||||
|
if triggercommand in bot.memory['SpiceBot_CommandsQuery']['commands']["nickname"].keys():
|
||||||
|
return
|
||||||
|
triggerargs.insert(0, triggercommand)
|
||||||
|
|
||||||
|
fulltrigger = spicemanip.main(triggerargs, 0).lower()
|
||||||
|
|
||||||
|
if fulltrigger in bot.memory['SpiceBot_CommandsQuery']['nickrules']:
|
||||||
return
|
return
|
||||||
|
|
||||||
if fulltrigger.lower().startswith("what is"):
|
if fulltrigger.lower().startswith("what is"):
|
||||||
@ -198,27 +211,3 @@ def bot_command_nick(bot, trigger):
|
|||||||
else:
|
else:
|
||||||
bot.osd("I don't know what you are asking me to do!")
|
bot.osd("I don't know what you are asking me to do!")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def bot_command_nick_setup(bot, trigger):
|
|
||||||
|
|
||||||
while not bot_events_check(bot, ['1004', '2002']):
|
|
||||||
pass
|
|
||||||
|
|
||||||
canrun = True
|
|
||||||
|
|
||||||
triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command')
|
|
||||||
|
|
||||||
if not triggercommand:
|
|
||||||
return '', '', '', False
|
|
||||||
|
|
||||||
if triggercommand in bot.memory['SpiceBot_CommandsQuery']['commands']["nickname"].keys():
|
|
||||||
return
|
|
||||||
triggerargs.insert(0, triggercommand)
|
|
||||||
|
|
||||||
fulltrigger = spicemanip.main(triggerargs, 0).lower()
|
|
||||||
|
|
||||||
if fulltrigger in bot.memory['SpiceBot_CommandsQuery']['nickrules']:
|
|
||||||
return '', '', '', False
|
|
||||||
|
|
||||||
return triggerargs, triggercommand, fulltrigger, canrun
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user