pygbot - simple irc bot in python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

28 lines
521 B

import json
def changeobj(config, obj, value):
config[obj] = value
writeconfig("config.json", config)
return config
def readobj(config, obj):
return config[obj]
def writeconfig(configfile, data):
with open(configfile, 'w') as f:
json.dump(data, f)
def readconfig(configfile):
with open(configfile, 'r') as f:
config = json.load(f)
return config
class pygbot:
nick = ""
host = ""
port = 0
tls = False
prefix = ""
channels = []
admins = []