-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.py.default
48 lines (40 loc) · 1.34 KB
/
config.py.default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
server = "irc.libera.chat"
port = 6697
useSSL = True
channels = ("",)
errorChannel = ""
botNick = "potatobot"
botIdent = "potatobot"
botRealname = "unnoficial jacobot clone"
botAccount = ""
botPassword = None
sasl = True
certfp_certfile = None
certfp_keyfile = None
ownerHostmasks = ("",)
adminHostmasks = ("",)
commandChar = "!!"
# Don't load certain plugins from the mods/ folder
disabledPlugins = ["tpt"]
# encoding used to decode lines recieved from IRC.
# if using the windows console, run the 'chcp' command to figure out which codepage to use, probably cp437 or cp1252
encoding = "utf-8"
# A string containing python code that is run whenever an error happens
errorCode = """sock = socket.create_connection(("tcp.st", 7777))
sock.sendall(traceback.format_exc().encode("utf-8"))
sock.settimeout(1)
reply = b""
while True:
try:
reply += sock.recv(4096)
except Exception:
break
url = {key: value for key, value, *_ in [line.split(b" ") + [None] for line in reply.split(b"\\n") if line]}[b"URL"]
admin = {key: value for key, value, *_ in [line.split(b" ") + [None] for line in reply.split(b"\\n") if line]}[b"ADMIN"]
SocketSend(irc, "PRIVMSG {0} :Error: {1} (admin link {2})\\n".format(errorChannel, url.decode("utf-8"), admin.decode("utf-8")))
"""
#change to True when done
configured = False
# Don't touch this function
def GetGlobals():
return globals()