aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go26
1 files changed, 16 insertions, 10 deletions
diff --git a/main.go b/main.go
index d25a3d6..514bd4c 100644
--- a/main.go
+++ b/main.go
@@ -15,17 +15,22 @@ import (
)
type ConfigFile struct {
- LogLevel string `json:"log_level"`
- ASBindAddr string `json:"appservice_bind_addr"`
- WebBindAddr string `json:"web_bind_addr"`
- WebURL string `json:"web_url"`
+ LogLevel string `json:"log_level"`
+
Registration string `json:"registration"`
+ ASBindAddr string `json:"appservice_bind_addr"`
Server string `json:"homeserver_url"`
- DbType string `json:"db_type"`
- DbPath string `json:"db_path"`
MatrixDomain string `json:"matrix_domain"`
- SessionKey string `json:"web_session_key"`
- AvatarFile string `json:"easybridge_avatar"`
+ NameFormat string `json:"name_format"`
+
+ WebBindAddr string `json:"web_bind_addr"`
+ WebURL string `json:"web_url"`
+ SessionKey string `json:"web_session_key"`
+
+ DbType string `json:"db_type"`
+ DbPath string `json:"db_path"`
+
+ AvatarFile string `json:"easybridge_avatar"`
}
var configFlag = flag.String("config", "./config.json", "Configuration file path")
@@ -43,6 +48,7 @@ func readConfig() ConfigFile {
WebBindAddr: "0.0.0.0:8281",
Registration: "./registration.yaml",
Server: "http://localhost:8008",
+ NameFormat: "{}_ezbr_",
DbType: "sqlite3",
DbPath: "easybridge.db",
AvatarFile: "./easybridge.jpg",
@@ -102,13 +108,13 @@ func readRegistration(file string) mxlib.Registration {
Users: []mxlib.RegistrationNamespace{
mxlib.RegistrationNamespace{
Exclusive: true,
- Regex: "@_ezbr_.*",
+ Regex: "@.*_ezbr_",
},
},
Aliases: []mxlib.RegistrationNamespace{
mxlib.RegistrationNamespace{
Exclusive: true,
- Regex: "#_ezbr_.*",
+ Regex: "#.*_ezbr_",
},
},
Rooms: []mxlib.RegistrationNamespace{},