mirror of
https://github.com/fluffle/goirc
synced 2026-01-20 00:38:04 +00:00
Add an config param allowing to delay renicking if the previously tried nick was already in use
This commit is contained in:
parent
de089e2f58
commit
75f575eb20
2 changed files with 6 additions and 0 deletions
|
|
@ -310,6 +310,9 @@ func (conn *Conn) h_001(line *Line) {
|
|||
|
||||
// Handler to deal with "433 :Nickname already in use"
|
||||
func (conn *Conn) h_433(line *Line) {
|
||||
// Delay trying again if a non-zero delay was set
|
||||
time.Sleep(conn.cfg.ReNickDelay)
|
||||
|
||||
// Args[1] is the new nick we were attempting to acquire
|
||||
me := conn.Me()
|
||||
neu := conn.cfg.NewNick(line.Args[1])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue