Fix filling presence db, fix ban by useragent
This commit is contained in:
@@ -15,8 +15,9 @@ type (
|
||||
Loglevel string `json:"loglevel,omitempty"`
|
||||
Log string `json:"log,omitempty"`
|
||||
Debug struct {
|
||||
Lib bool `json:"lib,omitempty"`
|
||||
Ping bool `json:"ping,omitempty"`
|
||||
Lib bool `json:"lib,omitempty"`
|
||||
Ping bool `json:"ping,omitempty"`
|
||||
PresenceDB bool `json:"presence_db,omitempty"`
|
||||
} `json:"debug"`
|
||||
Version string `json:"version,omitempty"`
|
||||
ExeName string `json:"exe_name,omitempty"`
|
||||
@@ -69,7 +70,7 @@ type (
|
||||
// MyWhiteList прототип структурки с белым списком jid-ов.
|
||||
MyWhiteList struct {
|
||||
Whitelist []struct {
|
||||
RoomName string `json:"room_name,omitempty"`
|
||||
RoomName string `json:"room_name"`
|
||||
Jid []string `json:"jid,omitempty"`
|
||||
WipeBans bool `json:"wipe_bans,omitempty"`
|
||||
} `json:"whitelist,omitempty"`
|
||||
@@ -77,18 +78,24 @@ type (
|
||||
|
||||
// MyBlackList прототип структурки с чёрным списком jid-ов.
|
||||
MyBlackList struct {
|
||||
Blacklist []struct {
|
||||
RoomName string `json:"room_name,omitempty"`
|
||||
JidRe []string `json:"jid_re,omitempty"`
|
||||
NickRe []string `json:"nick_re,omitempty"`
|
||||
PhraseRe []string `json:"phrase_re,omitempty"`
|
||||
UserAgent []struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Os string `json:"os,omitempty"`
|
||||
} `json:"user_agent"`
|
||||
ReasonEnable bool `json:"reason_enable,omitempty"`
|
||||
} `json:"blacklist"`
|
||||
Blacklist []MyBlackListEntry `json:"blacklist"`
|
||||
}
|
||||
|
||||
// MyBlackListEntry вложенная структура для MyBlackList.
|
||||
MyBlackListEntry struct {
|
||||
RoomName string `json:"room_name"`
|
||||
JidRe []string `json:"jid_re"`
|
||||
NickRe []string `json:"nick_re"`
|
||||
PhraseRe []string `json:"phrase_re"`
|
||||
UserAgent []MyBlackListEntryUserAgent `json:"user_agent"`
|
||||
ReasonEnable bool `json:"reason_enable,omitempty"`
|
||||
}
|
||||
|
||||
// MyBlackListEntryUserAgent вложенная структура для MyBlackListEntry.
|
||||
MyBlackListEntryUserAgent struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Os string `json:"os"`
|
||||
}
|
||||
|
||||
// Jabber основная структура-объект, содержащая стейты и проч.
|
||||
|
||||
Reference in New Issue
Block a user