diff options
author | makefu <github@syntax-fehler.de> | 2014-03-25 15:35:52 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-03-25 15:35:52 +0100 |
commit | c5accb6ea72ac9612dddf37541661fa544d5b872 (patch) | |
tree | 5e9aa86d33804e49a11acd3169f6d388eaeb4107 /Reaktor/config.py | |
parent | 5d778bfb0fadd073e1e5ff324f00a2ea460ba843 (diff) |
add authentication to Reaktor
using /query <reaktor> identify <password>
configuration contains commands and public_commands
Diffstat (limited to 'Reaktor/config.py')
-rw-r--r-- | Reaktor/config.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Reaktor/config.py b/Reaktor/config.py index 928c49d7..88ae837c 100644 --- a/Reaktor/config.py +++ b/Reaktor/config.py @@ -10,21 +10,21 @@ irc_kill_timeout = 360 irc_nickname = name irc_server = 'irc.freenode.org' irc_port = 6667 -#irc_restart_timeout = 5 +irc_restart_timeout = 5 irc_channels = [ '#krebs' ] - +admin_file='admin.lst' +auth_file='auth.lst' def default_command(cmd): return { 'capname': cmd, 'pattern': '^(?:' + name + '|\\*):\\s*' + cmd + '\\s*(?:\\s+(?P<args>.*))?$', 'argv': [ 'commands/' + cmd ] } -commands = [ +public_commands = [ default_command('caps'), default_command('hello'), - default_command('reload'), default_command('badcommand'), default_command('rev'), default_command('uptime'), @@ -34,5 +34,12 @@ commands = [ 'argv': [ 'commands/respond','You are made of stupid!'] }, # "highlight" { 'pattern': '.*\\b' + name + '\\b.*', - 'argv': [ 'commands/say', 'I\'m famous' ] } + 'argv': [ 'commands/say', 'I\'m famous' ] }, + # identify via direct connect + { 'capname': 'identify', + 'pattern': 'identify' + '\\s*(?:\\s+(?P<args>.*))?$', + 'argv' : [ 'commands/identify' ]} +] +commands = [ + default_command('reload') ] |