diff --git a/.gitignore b/.gitignore index eb1d5827938d71b807602b3ef249faed7a6ee534..a445c5eca2a9b6605260a1b04c58bb921734985b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.sqlite *.pid *.pyc +bot.cfg build/ logs/ diff --git a/ffpb.cfg b/bot.cfg.example similarity index 84% rename from ffpb.cfg rename to bot.cfg.example index a569dfbe21e435be1730f21c3371a8237498ff34..d047d02acc6d1f81f7fd3e0852a15c06dadda5ce 100644 --- a/ffpb.cfg +++ b/bot.cfg.example @@ -13,7 +13,7 @@ port = 9999 owner = HeJ admins = oscar-, Barbarossa -channels = #ffpb-gurus, #ffpb +channels = #ffpb prefix = ! enable = admin,ffpb,ip,reload timeout = 120 @@ -26,3 +26,7 @@ pid_dir = . userdb_type = sqlite userdb_file = ffpb.sqlite +[ffpb] +msg_enable = 1 +msg_port = 2342 +msg_target = #ffpb diff --git a/bot.sh b/bot.sh index e2ca1ddb95967d4ec7e885a82960f35700ce9979..8040203a51898ba44c42cb92ad1b66b9c4d967b0 100755 --- a/bot.sh +++ b/bot.sh @@ -12,14 +12,19 @@ if [ -z "$python3" ]; then fi fi +if [ ! -r "${mydir}/bot.cfg" ]; then + echo "'bot.cfg' is missing. Have you copied 'bot.cfg.example'?" + exit 2 +fi + case $1 in start) [ ! -d "${mydir}/logs" ] && mkdir "${mydir}/logs" - $python3 "${mydir}/willie/willie.py" -c "${mydir}/ffpb.cfg" --fork + $python3 "${mydir}/willie/willie.py" -c "${mydir}/bot.cfg" --fork ;; stop) - $python3 "${mydir}/willie/willie.py" -c "${mydir}/ffpb.cfg" --quit + $python3 "${mydir}/willie/willie.py" -c "${mydir}/bot.cfg" --quit ;; restart)