From e956408e9145282a77159517f170c0d007eb718e Mon Sep 17 00:00:00 2001 From: 0xd3d0c3d <0xd3d0c3d@protonmail.com> Date: Sun, 24 Jul 2022 19:48:13 -0500 Subject: [PATCH] sed_plugin:ACTION_exception_handling__automatior_error --- plugins/sed_plugin.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/sed_plugin.py b/plugins/sed_plugin.py index fcbde6d..03fbfe9 100644 --- a/plugins/sed_plugin.py +++ b/plugins/sed_plugin.py @@ -83,11 +83,14 @@ class Plugin: irc_message = "{}: {}".format(self.d.buffer_nick[itwist],self.d.buffer_text[itwist]) else: irc_message = f"TCPDIRECT/SED - Error: no result for: {data}" - if irc_message.find('\x01ACTION'): - nick,msg=irc_message.split(': ') - msg="\x01ACTION "+nick+": "+msg.split('\x01ACTION ')[1] - self.bot.privmsg(target,msg) - else: + try: + if irc_message.find('\x01ACTION'): + nick,msg=irc_message.split(': ') + msg="\x01ACTION "+nick+": "+msg.split('\x01ACTION ')[1] + self.bot.privmsg(target,msg) + else: + self.bot.privmsg(target,self.bot.emo(irc_message)) + except: self.bot.privmsg(target,self.bot.emo(irc_message)) ####################################################################################### #######################################################################################