Only use the default password when connecting to the default server
This commit is contained in:
parent
2e8418516a
commit
f678aaed8e
|
@ -94,10 +94,11 @@ func (h *wsHandler) connect(b []byte) {
|
|||
|
||||
i := irc.NewClient(data.Nick, data.Username)
|
||||
i.TLS = data.TLS
|
||||
i.Password = data.Password
|
||||
i.Realname = data.Realname
|
||||
|
||||
if data.Password == "" && viper.GetString("defaults.password") != "" {
|
||||
if data.Password == "" &&
|
||||
viper.GetString("defaults.password") != "" &&
|
||||
data.Server == viper.GetString("defaults.address") {
|
||||
i.Password = viper.GetString("defaults.password")
|
||||
} else {
|
||||
i.Password = data.Password
|
||||
|
|
Loading…
Reference in New Issue