parent
1c7da47b09
commit
95389601c5
@ -139,6 +139,7 @@ type Protocol struct {
|
|||||||
NickServPassword string // IRC
|
NickServPassword string // IRC
|
||||||
NicksPerRow int // mattermost, slack
|
NicksPerRow int // mattermost, slack
|
||||||
NoHomeServerSuffix bool // matrix
|
NoHomeServerSuffix bool // matrix
|
||||||
|
NodeConfigFile string // status
|
||||||
NoSendJoinPart bool // all protocols
|
NoSendJoinPart bool // all protocols
|
||||||
NoTLS bool // mattermost, xmpp
|
NoTLS bool // mattermost, xmpp
|
||||||
Password string // IRC,mattermost,XMPP,matrix
|
Password string // IRC,mattermost,XMPP,matrix
|
||||||
|
@ -55,7 +55,8 @@ type Bstatus struct {
|
|||||||
statusListenPort int
|
statusListenPort int
|
||||||
statusListenAddr string
|
statusListenAddr string
|
||||||
|
|
||||||
statusDataDir string
|
statusDataDir string
|
||||||
|
statusNodeConfigFile string
|
||||||
|
|
||||||
privateKey *ecdsa.PrivateKey
|
privateKey *ecdsa.PrivateKey
|
||||||
nodeConfig *params.NodeConfig
|
nodeConfig *params.NodeConfig
|
||||||
@ -67,12 +68,13 @@ type Bstatus struct {
|
|||||||
|
|
||||||
func New(cfg *bridge.Config) bridge.Bridger {
|
func New(cfg *bridge.Config) bridge.Bridger {
|
||||||
return &Bstatus{
|
return &Bstatus{
|
||||||
Config: cfg,
|
Config: cfg,
|
||||||
fetchDone: make(chan bool),
|
fetchDone: make(chan bool),
|
||||||
statusListenPort: 30303,
|
statusListenPort: 30303,
|
||||||
statusListenAddr: "0.0.0.0",
|
statusListenAddr: "0.0.0.0",
|
||||||
statusDataDir: cfg.GetString("DataDir"),
|
statusDataDir: cfg.GetString("DataDir"),
|
||||||
fetchInterval: 500 * time.Millisecond,
|
statusNodeConfigFile: cfg.GetString("NodeConfigFile"),
|
||||||
|
fetchInterval: 500 * time.Millisecond,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +83,7 @@ func (b *Bstatus) generateNodeConfig() (*params.NodeConfig, error) {
|
|||||||
options := []params.Option{
|
options := []params.Option{
|
||||||
b.withListenAddr(),
|
b.withListenAddr(),
|
||||||
}
|
}
|
||||||
configFiles := []string{"./fleet.json"}
|
configFiles := []string{b.statusNodeConfigFile}
|
||||||
config, err := params.NewNodeConfigWithDefaultsAndFiles(
|
config, err := params.NewNodeConfigWithDefaultsAndFiles(
|
||||||
b.statusDataDir,
|
b.statusDataDir,
|
||||||
params.MainNetworkID,
|
params.MainNetworkID,
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
Token=""
|
Token=""
|
||||||
RemoteNickFormat="{NICK}"
|
RemoteNickFormat="{NICK}"
|
||||||
DataDir="path to status data dir"
|
DataDir="path to status data dir"
|
||||||
|
NodeConfigFile="path to json with node config and fleets"
|
||||||
|
|
||||||
[discord]
|
[discord]
|
||||||
[discord.mydiscord]
|
[discord.mydiscord]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user