diff --git a/sweebot.py b/sweebot.py index bc686a6..3b2bd10 100644 --- a/sweebot.py +++ b/sweebot.py @@ -41,6 +41,8 @@ class config: except: print(traceback.format_exc()) return False + def cflagexist(self, chan:str, flag:str): + return flag in self.chansettings(chan) # Code snippet from my buddy Irish @@ -556,10 +558,10 @@ while True: elif command[0] == ":3": - if not "-colonthree" in sbconfig.chansettings(channel): + if not sbconfig.cflagexist(channel, "-colonthree"): multiline(":3", channel) elif ":3c" in command: - if not "-colonthree" in sbconfig.chansettings(channel): + if not sbconfig.cflagexist(channel, "-colonthree"): multiline(choice(threes), channel) elif "JOIN" in text and "#nixsanctuary" in text: nick = text.split(":")[1].split("!")[0]