Add SVSCTRL command to let services control services join requests and configuration files
To enable services join requests, services will send:
SVSCTRL server.dal.net SJR 1
To disable services join requests, services will send:
SVSCTRL server.dal.net SJR 0
(server.dal.net can be replaced by * to send it to all servers)
To get the list of supported configuration files, services will send:
SVSCTRL server.dal.net CONF STATUS *
The server will reply:
PRIVMSG <sender> :CONF STATUS <file1> <file-size> <modified-time> <md5-sha>
PRIVMSG <sender> :CONF STATUS <file2> <file-size> <modified-time> <md5-sha>
PRIVMSG <sender> :CONF STATUS <file3> <file-size> <modified-time> <md5-sha>
To get the status of ircd.conf, services will send:
SVSCTRL server.dal.net CONF STATUS ircd.conf
The server will reply:
PRIVMSG <sender> :CONF STATUS ircd.conf <file-size> <modified-time> <md5-sha>
To get the ircd.conf file from the server, services will send:
SVSCTRL server.dal.net CONF READ ircd.conf
The server will send:
PRIVMSG <sender> :CONF <file> SOF <file-size> <modified-time>
PRIVMSG <sender> :CONF <file> <line-number> :<line-text>
PRIVMSG <sender> :CONF <file> EOF <number-of-lines> <file-size> <md5-sha>
To update the ircd.conf file, services will send:
SVSCTRL server.dal.net CONF WRITE ircd.conf SOF
SVSCTRL server.dal.net CONF WRITE ircd.conf <line-number> :<line-text>
SVSCTRL server.dal.net CONF WRITE ircd.conf EOF <number-of-lines> <file-size> <md5-sha>
The server will reply:
PRIVMSG <sender> :CONF WRITE ircd.conf EOF OK
or:
PRIVMSG <sender> :CONF WRITE ircd.conf EOF ERROR :<reason>
-Kobi.
Interesting. Lots to digest here. How has testing gone for this?
Interesting. Lots to digest here. How has testing gone for this?
I did a few quick sanity checks on the testnet for it, i.e.:
- Get a file status:
:OperServ SVSCTRL test1.* CONF STATUS /etc/rc.conf - Get the status of all files:
:OperServ SVSCTRL hideout.* CONF STATUS * - Write a test conf file:
:OperServ SVSCTRL test1.* CONF WRITE dalnet.conf SOF
:OperServ SVSCTRL test1.* CONF WRITE dalnet.conf 1 :This is a test...
:OperServ SVSCTRL test1.* CONF WRITE dalnet.conf EOF 1 18 c56c8063d58e9bc9b3fb0dc03fe531b0
- Read a file:
:OperServ SVSCTRL test1.* CONF READ /etc/rc.conf - Tried to break ircd.conf to make sure it reverts the previous config back.
It looks fine but I will do more tests once stats.* will support it :)
-Kobi.
Great! I will hold off merging until you have
Is this still needed?
Is this still needed?
Yes, I reviewed it again and did a few more sanity checks and it looks fine.
-Kobi.
Some conflicts that need to be resolved, can you please check?
Stale pull request message