test
This commit is contained in:
parent
6ea9dd94e8
commit
92c47a28ee
10
bot.go
10
bot.go
@ -134,7 +134,7 @@ func botTest(m *tb.Message) {
|
|||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _, ok := clientsKeepAlive[m.Chat.ID]; ok {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); ok {
|
||||||
clientSendCWMsg(m.Chat.ID, "🏅Me")
|
clientSendCWMsg(m.Chat.ID, "🏅Me")
|
||||||
|
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
@ -160,7 +160,7 @@ func botMsgRescan(m *tb.Message) {
|
|||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _, ok := clientsKeepAlive[m.Chat.ID]; !ok && m.Chat.ID != cfg.Bot.Admin {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); !ok && m.Chat.ID != cfg.Bot.Admin {
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "Client not registered",
|
Text: "Client not registered",
|
||||||
@ -210,7 +210,7 @@ func botMsgRescanAll(m *tb.Message) {
|
|||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _, ok := clientsKeepAlive[m.Chat.ID]; !ok && m.Chat.ID != cfg.Bot.Admin {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); !ok && m.Chat.ID != cfg.Bot.Admin {
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "Client not registered",
|
Text: "Client not registered",
|
||||||
@ -253,7 +253,7 @@ func botBackupExport(m *tb.Message) {
|
|||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _, ok := clientsKeepAlive[m.Chat.ID]; !ok && m.Chat.ID != cfg.Bot.Admin {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); !ok && m.Chat.ID != cfg.Bot.Admin {
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "Client not registered",
|
Text: "Client not registered",
|
||||||
@ -279,7 +279,7 @@ func botBackupImport(m *tb.Message) {
|
|||||||
if !m.Private() {
|
if !m.Private() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _, ok := clientsKeepAlive[m.Chat.ID]; !ok && m.Chat.ID != cfg.Bot.Admin {
|
if _, ok := clientsKeepAlive.Load(m.Chat.ID); !ok && m.Chat.ID != cfg.Bot.Admin {
|
||||||
c := TGCommand{
|
c := TGCommand{
|
||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "Client not registered",
|
Text: "Client not registered",
|
||||||
|
1
main.go
1
main.go
@ -154,7 +154,6 @@ func main() {
|
|||||||
MQTGCmdQueue = make(chan TGCommand, MQTGCmdQueueSize)
|
MQTGCmdQueue = make(chan TGCommand, MQTGCmdQueueSize)
|
||||||
JobQueue = make(chan Job, JobQueueSize)
|
JobQueue = make(chan Job, JobQueueSize)
|
||||||
clientsQueue = make(map[int64]*MQClient)
|
clientsQueue = make(map[int64]*MQClient)
|
||||||
clientsKeepAlive = make(map[int64]*MQKeepAlive)
|
|
||||||
clientsCW = new(sync.Map)
|
clientsCW = new(sync.Map)
|
||||||
clientsKeepAlive = new(sync.Map)
|
clientsKeepAlive = new(sync.Map)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user