2021-10-15 18:59:22 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import json
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import pinhook.bot
|
|
|
|
|
|
|
|
with open('config.json') as c:
|
|
|
|
config = json.load(c)
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if len(sys.argv) > 1:
|
|
|
|
if sys.argv[1] == '--test-mode':
|
2023-06-19 18:53:22 +00:00
|
|
|
channels = ['#jmjl-devel']
|
|
|
|
nick = 'ju[dev]'
|
|
|
|
prefix_plugins = True
|
|
|
|
cmd_prefix='^'
|
2021-10-15 18:59:22 +00:00
|
|
|
else:
|
|
|
|
channels = config['channels']
|
2023-06-19 18:53:22 +00:00
|
|
|
prefix_plugins = False
|
|
|
|
cmd_prefix='&'
|
|
|
|
nick = 'ju'
|
2021-10-15 18:59:22 +00:00
|
|
|
else:
|
|
|
|
channels = config['channels']
|
2023-06-19 18:53:22 +00:00
|
|
|
nick = 'ju'
|
|
|
|
prefix_plugins = False
|
|
|
|
cmd_prefix='&'
|
2021-10-15 18:59:22 +00:00
|
|
|
bot = pinhook.bot.Bot(
|
|
|
|
channels,
|
2023-06-19 18:53:22 +00:00
|
|
|
nick,
|
2021-10-15 18:59:22 +00:00
|
|
|
'localhost',
|
|
|
|
ops=['jmjl'],
|
2023-06-19 18:53:22 +00:00
|
|
|
ns_pass='ju {}'.format(config['password']),
|
|
|
|
#ns_pass=config['password'],
|
2021-10-15 18:59:22 +00:00
|
|
|
nickserv='nickserv',
|
2023-06-19 18:53:22 +00:00
|
|
|
cmd_prefix=cmd_prefix,
|
|
|
|
use_prefix_for_plugins=prefix_plugins
|
2021-10-15 18:59:22 +00:00
|
|
|
)
|
|
|
|
bot.start()
|