Merge merge urlbot-mcabber to subdir
This commit is contained in:
50
urlbot-mcabber/local_config.py.skel
Normal file
50
urlbot-mcabber/local_config.py.skel
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import time, sys
|
||||
|
||||
def _logger(a, b): sys.stderr.write('logger: %s::%s\n' %(a, b))
|
||||
try: logger
|
||||
except NameError: logger = _logger
|
||||
|
||||
if '__main__' == __name__:
|
||||
print('''this is a config file, which is not meant to be executed''')
|
||||
exit(-1)
|
||||
|
||||
config = {
|
||||
'src-url': 'FIXME',
|
||||
|
||||
'bot_user': 'urlbot',
|
||||
'bot_owner': 'FIXME',
|
||||
|
||||
'hist_max_count': 5,
|
||||
'hist_max_time': 10 * 60,
|
||||
|
||||
'uptime': -time.time(),
|
||||
'request_counter': 0,
|
||||
|
||||
'path_event_files': 'event_files',
|
||||
'path_cmdfifo': 'cmdfifo',
|
||||
'persistent_storage': 'urlbot.persistent',
|
||||
|
||||
'url_blacklist': [
|
||||
r'^.*heise\.de/[^/]+/meldung/.*$',
|
||||
r'^.*wikipedia\.org/wiki/.*$'
|
||||
],
|
||||
|
||||
# the "dice" feature will use more efficient random data (0) for given users
|
||||
'enhanced-random-user': ( 'FIXME', 'FIXME' ),
|
||||
|
||||
'tea_steep_time': (3*60 + 40),
|
||||
|
||||
'image_preview': True
|
||||
}
|
||||
|
||||
def conf(val):
|
||||
if val in list(config.keys()):
|
||||
return config[val]
|
||||
logger('warn', 'conf(): unknown key ' + str(val))
|
||||
return None
|
||||
|
||||
def set_conf(key, val):
|
||||
config[key] = val
|
||||
return None
|
||||
Reference in New Issue
Block a user