feat: irc reconnect (#148)

* chore: add and update deps

* feat(irc): change lib add reconnect

* feat: remove irc caps

* feat: add sleep fix irc stop restart
This commit is contained in:
Ludvig Lundgren 2022-02-26 14:12:21 +01:00 committed by GitHub
parent 03ca3ed49a
commit 3759964ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 271 additions and 367 deletions

View file

@ -35,23 +35,18 @@ type IrcNetwork struct {
}
type IrcNetworkWithHealth struct {
ID int64 `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Server string `json:"server"`
Port int `json:"port"`
TLS bool `json:"tls"`
Pass string `json:"pass"`
InviteCommand string `json:"invite_command"`
NickServ NickServ `json:"nickserv,omitempty"`
//Channels []IrcChannel `json:"channels"`
Channels []ChannelWithHealth `json:"channels"`
//Channels []struct {
// IrcChannel
// ChannelHealth
//} `json:"channels"`
Connected bool `json:"connected"`
ConnectedSince time.Time `json:"connected_since"`
ID int64 `json:"id"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Server string `json:"server"`
Port int `json:"port"`
TLS bool `json:"tls"`
Pass string `json:"pass"`
InviteCommand string `json:"invite_command"`
NickServ NickServ `json:"nickserv,omitempty"`
Channels []ChannelWithHealth `json:"channels"`
Connected bool `json:"connected"`
ConnectedSince time.Time `json:"connected_since"`
}
type ChannelWithHealth struct {