import importlib, sys # default config file, copy the contents into local_config.py and modify if __name__ == "local_config": config = importlib.reload(sys.modules["config"]).config else: class config: # dummy, so the local config can simply be a copy of this template ... class config(config): class self: nick = "pawbot" username = "pawky_bot" # you should probably indicate yourself to be the owner of the bot, in username, or realname, or both realname = "pawky's bot" source = "/home/pawky/git/sotdbot" # so far only used for ctcp response gitdir = "./" # where is the bot git dir? currently only used for version (git commit hash, assuming latest commit == latest version) class server: name = "town" host = "localhost" port = 6667 ssl = False nickserv_auth = False nickserv_mask = ( "NickServ!NickServ@localhost" # the mask you receive from server ) nickserv_squery = False # squery seems to only be a thing on ngircd nickserv_path = "NickServ@localhost" # the mask you actually send commands to # get password from secret file nickserv_pass = open("pass.txt", "r").read().strip() if nickserv_auth else "" nickserv_recover = "RECOVER" # I recall it being GHOST on some networks? channel = "#bots" autojoin = [] blacklisted_channels = [] class admin: # ircv3 account-tag based admin accounts = ["pawky", "sotdboat"] # hostmask-based admin, if at all possible, you should try to use a vhost or reverse dns, or identd, to prevent fakery hostmasks = ["pawky!pawky@localhost", "*!pawky@localhost"] class cmd: # right now, single-character prefixes only (plus bot's own nick) prefixes = ["!"] # disabled commands, won't run via normal means...probably disabled = [] # admin-only override, # useful for testing broken commands which should still be normal-user accessible # commands which should only ever be used by admins, should be designated as such in code, not through here (e.g. exit) admin_only = [] ignored_nicks = [] # try to read youtube page only up to tag, maybe it's faster? # premature optimization is the root of all evil yt_premature_opt = True capabilities = [ # what capabilities shall we request? "message-tags", # needed for account-tag! "account-tag", # account tag allows us to identify people without needing custom login! "multi-prefix", # perhaps eventually useful for detecting people's status, such as +v AND +o ? not currently needed "batch", # we wouldn't want to trigger on historic message playback (only usage of it I've seen) "away-notify", # no functionality deals with away status yet, but could be interesting "account-notify", # I don't remember why I try requesting this lol, I think it's to do with account-tag "chghost", # uh, same, I think? ] # cap-notify draft/account-registration draft/channel-rename draft/persistence draft/read-marker echo-message ergo.chat/nope extended-join extended-monitor invite-notify labeled-response sasl=PLAIN,EXTERNAL server-time setname userhost-in-names znc.in/self-message # message-tags multi-prefix account-tag batch away-notify account-notify chghost # you should remove the following lines if you're editing local_config.py if __name__ == "config": try: config = importlib.reload(sys.modules["local_config"]).config except ModuleNotFoundError: print("\x1b[31m!!! you should probably set up local config !!!\x1b[0m") except KeyError: try: from local_config import config except ModuleNotFoundError: print("\x1b[31m!!! you should probably set up local config !!!\x1b[0m")