diff --git a/sweebot.py b/sweebot.py index 3b2bd10..99a37df 100644 --- a/sweebot.py +++ b/sweebot.py @@ -35,8 +35,9 @@ class config: try: if self.chansettings(chan) == []: print("[!!!] Channel doesn't exist in config") - self.database.execute("INSERT INTO chans (chan, flags) values(?, '+config');", [chan]) - self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", [",".join(flags),chan]) + self.database.execute("INSERT INTO chans (chan, flags) values(?, ?);", [chan, ["+config"] + ",".join(flags)]) + else: + self.database.execute("UPDATE chans SET FLAGS = ? WHERE chan = ?", [",".join(flags),chan]) self.conn.commit() except: print(traceback.format_exc())