generated from public/aoc_template
sasl authentication
This commit is contained in:
parent
c44a4cf451
commit
686746cd1f
@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import argparse
|
import argparse
|
||||||
import os.path
|
import os.path
|
||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
@ -40,6 +42,10 @@ class AOCBot:
|
|||||||
self.__aoc_session_file = config["AOC"]["session_file"]
|
self.__aoc_session_file = config["AOC"]["session_file"]
|
||||||
self.__aoc_user_agent = config["AOC"]["user_agent"]
|
self.__aoc_user_agent = config["AOC"]["user_agent"]
|
||||||
self.__cache_file = config["AOC"]["cache_file"]
|
self.__cache_file = config["AOC"]["cache_file"]
|
||||||
|
if "sasl_password" in config["IRC"]:
|
||||||
|
self.__sasl_password = config["IRC"]["sasl_password"]
|
||||||
|
else:
|
||||||
|
self.__sasl_password = None
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
print("CONFIGURATION ERROR: %s" % e)
|
print("CONFIGURATION ERROR: %s" % e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -226,6 +232,7 @@ class AOCBot:
|
|||||||
nick=self.__irc_nick,
|
nick=self.__irc_nick,
|
||||||
username=self.__irc_user,
|
username=self.__irc_user,
|
||||||
realname=self.__irc_real_name,
|
realname=self.__irc_real_name,
|
||||||
|
sasl_password=self.__sasl_password,
|
||||||
)
|
)
|
||||||
|
|
||||||
print("[AoCBot] Joining Channel %s" % self.__irc_channel)
|
print("[AoCBot] Joining Channel %s" % self.__irc_channel)
|
||||||
|
|||||||
@ -11,7 +11,10 @@
|
|||||||
// The Bots IRC identity
|
// The Bots IRC identity
|
||||||
"nick": "AoCBot",
|
"nick": "AoCBot",
|
||||||
"user": "aucbot",
|
"user": "aucbot",
|
||||||
"name": "Advent of Code Leaderboard Announcer"
|
"name": "Advent of Code Leaderboard Announcer",
|
||||||
|
|
||||||
|
// If your IRC server requires SASL authentication, set the password here,
|
||||||
|
"sasl_password": null
|
||||||
},
|
},
|
||||||
"AOC": {
|
"AOC": {
|
||||||
// The content of your aoc session cookie should be stored in this file
|
// The content of your aoc session cookie should be stored in this file
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user