From b8dc4ea2af56884d0908d1c9261f23c76951c567 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 --- config.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'config.py') diff --git a/config.py b/config.py index 928c49d..88ae837 100644 --- a/config.py +++ b/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