|
|
|
|
2159
|
channel.SendSplitMessage(command, lowestPrefix, tags, client, message, rb)
|
2159
|
channel.SendSplitMessage(command, lowestPrefix, tags, client, message, rb)
|
2160
|
} else if target[0] == '$' && len(target) > 2 && client.Oper().HasRoleCapab("massmessage") {
|
2160
|
} else if target[0] == '$' && len(target) > 2 && client.Oper().HasRoleCapab("massmessage") {
|
2161
|
details := client.Details()
|
2161
|
details := client.Details()
|
2162
|
- matcher, err := utils.CompileGlob(target[1:], false)
|
|
|
|
|
2162
|
+ matcher, err := utils.CompileGlob(target[2:], false)
|
2163
|
if err != nil {
|
2163
|
if err != nil {
|
2164
|
rb.Add(nil, server.name, ERR_UNKNOWNERROR, details.nick, command, client.t("Erroneous target"))
|
2164
|
rb.Add(nil, server.name, ERR_UNKNOWNERROR, details.nick, command, client.t("Erroneous target"))
|
2165
|
return
|
2165
|
return
|
|
|
|
|
2169
|
accountName := details.accountName
|
2169
|
accountName := details.accountName
|
2170
|
isBot := client.HasMode(modes.Bot)
|
2170
|
isBot := client.HasMode(modes.Bot)
|
2171
|
for _, tClient := range server.clients.AllClients() {
|
2171
|
for _, tClient := range server.clients.AllClients() {
|
2172
|
- if matcher.MatchString(fmt.Sprintf("$%s", tClient.server.name)) || // $$servername
|
|
|
2173
|
- matcher.MatchString(fmt.Sprintf("#%s", tClient.Hostname())) { // $#hostname
|
|
|
|
|
2172
|
+ if (target[1] == '$' && matcher.MatchString(tClient.server.name)) || // $$servername
|
|
|
2173
|
+ (target[1] == '#' && matcher.MatchString(tClient.Hostname())) { // $#hostname
|
2174
|
|
2174
|
|
2175
|
- tnick := tClient.Details().nick
|
|
|
|
|
2175
|
+ tnick := tClient.Nick()
|
2176
|
for _, session := range tClient.Sessions() {
|
2176
|
for _, session := range tClient.Sessions() {
|
2177
|
session.sendSplitMsgFromClientInternal(false, nickMaskString, accountName, isBot, nil, command, tnick, message)
|
2177
|
session.sendSplitMsgFromClientInternal(false, nickMaskString, accountName, isBot, nil, command, tnick, message)
|
2178
|
}
|
2178
|
}
|