mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
allow empty server password
This commit is contained in:
parent
8c43e6d2ed
commit
832a5e1e19
@ -44,11 +44,14 @@ func NewServer(config *Config) *Server {
|
|||||||
name: config.Server.Name,
|
name: config.Server.Name,
|
||||||
newConns: make(chan net.Conn, 16),
|
newConns: make(chan net.Conn, 16),
|
||||||
operators: config.Operators(),
|
operators: config.Operators(),
|
||||||
password: config.Server.PasswordBytes(),
|
|
||||||
signals: make(chan os.Signal, 1),
|
signals: make(chan os.Signal, 1),
|
||||||
timeout: make(chan *Client, 16),
|
timeout: make(chan *Client, 16),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.Server.Password != "" {
|
||||||
|
server.password = config.Server.PasswordBytes()
|
||||||
|
}
|
||||||
|
|
||||||
server.loadChannels()
|
server.loadChannels()
|
||||||
|
|
||||||
for _, addr := range config.Server.Listen {
|
for _, addr := range config.Server.Listen {
|
||||||
|
Loading…
Reference in New Issue
Block a user