mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
Merge pull request #1051 from ajaspers/services
Ignore non-privmsg commands to services.
This commit is contained in:
commit
29165ded62
@ -1906,18 +1906,25 @@ func dispatchMessageToTarget(client *Client, tags map[string]string, histType hi
|
|||||||
}
|
}
|
||||||
channel.SendSplitMessage(command, lowestPrefix, tags, client, message, rb)
|
channel.SendSplitMessage(command, lowestPrefix, tags, client, message, rb)
|
||||||
} else {
|
} else {
|
||||||
// NOTICE and TAGMSG to services are ignored
|
lowercaseTarget := strings.ToLower(target)
|
||||||
|
service, isService := OragonoServices[lowercaseTarget]
|
||||||
|
_, isZNC := zncHandlers[lowercaseTarget]
|
||||||
|
|
||||||
if histType == history.Privmsg {
|
if histType == history.Privmsg {
|
||||||
lowercaseTarget := strings.ToLower(target)
|
if isService {
|
||||||
if service, isService := OragonoServices[lowercaseTarget]; isService {
|
|
||||||
servicePrivmsgHandler(service, server, client, message.Message, rb)
|
servicePrivmsgHandler(service, server, client, message.Message, rb)
|
||||||
return
|
return
|
||||||
} else if _, isZNC := zncHandlers[lowercaseTarget]; isZNC {
|
} else if isZNC {
|
||||||
zncPrivmsgHandler(client, lowercaseTarget, message.Message, rb)
|
zncPrivmsgHandler(client, lowercaseTarget, message.Message, rb)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTICE and TAGMSG to services are ignored
|
||||||
|
if isService || isZNC {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
user := server.clients.Get(target)
|
user := server.clients.Get(target)
|
||||||
if user == nil {
|
if user == nil {
|
||||||
if histType != history.Notice {
|
if histType != history.Notice {
|
||||||
|
Loading…
Reference in New Issue
Block a user