mirror of
https://git.ferricyanide.solutions/A_D/irc-webhooks.git
synced 2024-12-22 02:57:03 +00:00
made servers configurable
This commit is contained in:
parent
d8d8afd94a
commit
e110560515
@ -5,6 +5,9 @@
|
|||||||
"nick": "ADGitea",
|
"nick": "ADGitea",
|
||||||
"ident": "gitea",
|
"ident": "gitea",
|
||||||
"realname": "gitea",
|
"realname": "gitea",
|
||||||
|
"server_host": "irc.snoonet.org",
|
||||||
|
"server_port": "6697",
|
||||||
|
"ssl": true,
|
||||||
"ns_nick": "",
|
"ns_nick": "",
|
||||||
"ns_passwd": "",
|
"ns_passwd": "",
|
||||||
"chans_to_join": [
|
"chans_to_join": [
|
||||||
|
@ -7,14 +7,18 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Secret string `json:"secret"`
|
Secret string `json:"secret"`
|
||||||
BindHost string `json:"bind_host"`
|
BindHost string `json:"bind_host"`
|
||||||
BindPort string `json:"bind_port"`
|
BindPort string `json:"bind_port"`
|
||||||
Nick string `json:"nick"`
|
ServerHost string `json:"server_host"`
|
||||||
Ident string `json:"ident"`
|
ServerPort string `json:"server_port"`
|
||||||
Realname string `json:"realname"`
|
ServerSSL bool `json:"server_ssl"`
|
||||||
NsNick string `json:"ns_nick"`
|
ServerName string `json:"server_name"`
|
||||||
NsPasswd string `json:"ns_passwd"`
|
Nick string `json:"nick"`
|
||||||
|
Ident string `json:"ident"`
|
||||||
|
Realname string `json:"realname"`
|
||||||
|
NsNick string `json:"ns_nick"`
|
||||||
|
NsPasswd string `json:"ns_passwd"`
|
||||||
ChansToJoin []string `json:"chans_to_join"`
|
ChansToJoin []string `json:"chans_to_join"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ func main() {
|
|||||||
MsgChan: msgChan,
|
MsgChan: msgChan,
|
||||||
}
|
}
|
||||||
|
|
||||||
bot := newBot(bc, "chimera.snoonet.org", "6697", "snoonet", true)
|
bot := newBot(bc, config.ServerHost, config.ServerPort, config.ServerName, config.ServerSSL)
|
||||||
|
|
||||||
go bot.run()
|
go bot.run()
|
||||||
ListenForWebHook(config, msgChan)
|
ListenForWebHook(config, msgChan)
|
||||||
|
Loading…
Reference in New Issue
Block a user