mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(irc): run nickserv identify with password only (#191)
This commit is contained in:
parent
22f768148c
commit
4e4e498cc3
2 changed files with 4 additions and 4 deletions
|
@ -246,7 +246,7 @@ func (h *Handler) onConnect(m ircmsg.Message) {
|
||||||
time.Sleep(4 * time.Second)
|
time.Sleep(4 * time.Second)
|
||||||
|
|
||||||
if h.network.NickServ.Password != "" {
|
if h.network.NickServ.Password != "" {
|
||||||
err := h.HandleNickServIdentify(h.network.NickServ.Account, h.network.NickServ.Password)
|
err := h.HandleNickServIdentify(h.network.NickServ.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Stack().Err(err).Msgf("error nickserv: %v", h.network.Name)
|
log.Error().Stack().Err(err).Msgf("error nickserv: %v", h.network.Name)
|
||||||
return
|
return
|
||||||
|
@ -496,10 +496,10 @@ func (h *Handler) handleInvite(msg ircmsg.Message) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handler) HandleNickServIdentify(nick, password string) error {
|
func (h *Handler) HandleNickServIdentify(password string) error {
|
||||||
m := ircmsg.Message{
|
m := ircmsg.Message{
|
||||||
Command: "PRIVMSG",
|
Command: "PRIVMSG",
|
||||||
Params: []string{"NickServ", "IDENTIFY", nick, password},
|
Params: []string{"NickServ", "IDENTIFY", password},
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug().Msgf("%v: NickServ: %v", h.network.Server, m)
|
log.Debug().Msgf("%v: NickServ: %v", h.network.Server, m)
|
||||||
|
|
|
@ -205,7 +205,7 @@ func (s *service) checkIfNetworkRestartNeeded(network *domain.IrcNetwork) error
|
||||||
} else if handler.NickServ.Password != network.NickServ.Password {
|
} else if handler.NickServ.Password != network.NickServ.Password {
|
||||||
log.Debug().Msg("nickserv: changing password")
|
log.Debug().Msg("nickserv: changing password")
|
||||||
|
|
||||||
err := existingHandler.HandleNickServIdentify(network.NickServ.Account, network.NickServ.Password)
|
err := existingHandler.HandleNickServIdentify(network.NickServ.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Stack().Err(err).Msgf("failed to identify with nickserv %q", network.NickServ.Account)
|
log.Error().Stack().Err(err).Msgf("failed to identify with nickserv %q", network.NickServ.Account)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue