Use nick as username and realname if they are missing

This commit is contained in:
Ken-Håvard Lieng 2018-05-18 03:14:22 +02:00
parent 8f8adc37e7
commit 9806d6c12f
1 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,13 @@ func connectIRC(server storage.Server, session *Session) *irc.Client {
address = net.JoinHostPort(server.Host, server.Port)
}
if i.Username == "" {
i.Username = server.Nick
}
if i.Realname == "" {
i.Realname = server.Nick
}
if server.Password == "" &&
viper.GetString("defaults.password") != "" &&
address == viper.GetString("defaults.address") {