aboutsummaryrefslogtreecommitdiffstats
path: root/config.py
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-25 15:35:52 +0100
committermakefu <github@syntax-fehler.de>2014-03-25 15:35:52 +0100
commitb8dc4ea2af56884d0908d1c9261f23c76951c567 (patch)
tree22a72f1231121dfc0cf217e5ecaf6bedcab466f4 /config.py
parent41170dbfd9bebfc591eb0988d6bfec62707d5982 (diff)
add authentication to Reaktor
using /query <reaktor> identify <password> configuration contains commands and public_commands
Diffstat (limited to 'config.py')
-rw-r--r--config.py17
1 files changed, 12 insertions, 5 deletions
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<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')
]