Add control-socket to bot.conf.example, only start up control socket is a unix
domain socket location is provided
This commit is contained in:
parent
69eda4bf1b
commit
825fb15c87
2 changed files with 8 additions and 5 deletions
|
@ -3,6 +3,8 @@ tls-key =
|
|||
tls-certificate =
|
||||
tls-api-key =
|
||||
tls-api-certificate =
|
||||
# unix domain socket location for ControlSocket
|
||||
control-socket =
|
||||
# https://openweathermap.org/api
|
||||
openweathermap-api-key =
|
||||
# https://products.wolframalpha.com/api/
|
||||
|
|
|
@ -23,9 +23,10 @@ class Bot(object):
|
|||
|
||||
self.servers = {}
|
||||
self.other_sockets = {}
|
||||
|
||||
if "contorl-socket" in self.config:
|
||||
self.control_socket = ControlSocket.ControlSocket(self)
|
||||
self.add_socket(self.control_socket)
|
||||
|
||||
self._control_sclient = socket.socket(
|
||||
socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
self._control_client.connect(self.config["control-socket"])
|
||||
|
|
Loading…
Reference in a new issue