Improve port handling
This commit is contained in:
parent
2bffef825d
commit
13a3d96b44
7 changed files with 48 additions and 43 deletions
|
@ -2,6 +2,7 @@ package server
|
|||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"net"
|
||||
|
||||
"github.com/khlieng/dispatch/irc"
|
||||
"github.com/khlieng/dispatch/storage"
|
||||
|
@ -28,13 +29,13 @@ func reconnectIRC() {
|
|||
}
|
||||
}
|
||||
|
||||
i.Connect(server.Address)
|
||||
session.setIRC(i.Host, i)
|
||||
session.setIRC(server.Host, i)
|
||||
i.Connect(net.JoinHostPort(server.Host, server.Port))
|
||||
go newIRCHandler(i, session).run()
|
||||
|
||||
var joining []string
|
||||
for _, channel := range channels {
|
||||
if channel.Server == server.Address {
|
||||
if channel.Server == server.Host {
|
||||
joining = append(joining, channel.Name)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue