mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +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)
|
||||
|
||||
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 {
|
||||
log.Error().Stack().Err(err).Msgf("error nickserv: %v", h.network.Name)
|
||||
return
|
||||
|
@ -496,10 +496,10 @@ func (h *Handler) handleInvite(msg ircmsg.Message) {
|
|||
return
|
||||
}
|
||||
|
||||
func (h *Handler) HandleNickServIdentify(nick, password string) error {
|
||||
func (h *Handler) HandleNickServIdentify(password string) error {
|
||||
m := ircmsg.Message{
|
||||
Command: "PRIVMSG",
|
||||
Params: []string{"NickServ", "IDENTIFY", nick, password},
|
||||
Params: []string{"NickServ", "IDENTIFY", password},
|
||||
}
|
||||
|
||||
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 {
|
||||
log.Debug().Msg("nickserv: changing password")
|
||||
|
||||
err := existingHandler.HandleNickServIdentify(network.NickServ.Account, network.NickServ.Password)
|
||||
err := existingHandler.HandleNickServIdentify(network.NickServ.Password)
|
||||
if err != nil {
|
||||
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