From c5accb6ea72ac9612dddf37541661fa544d5b872 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 25 Mar 2014 15:35:52 +0100 Subject: add authentication to Reaktor using /query identify configuration contains commands and public_commands --- Reaktor/config.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Reaktor/config.py') 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.*))?$', '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.*))?$', + 'argv' : [ 'commands/identify' ]} +] +commands = [ + default_command('reload') ] -- cgit v1.2.3