Browse Source

Copy Insp's new BOT ISUPPORT token and WHO behaviour

tags/v2.2.0-rc1
Daniel Oaks 4 years ago
parent
commit
6426b3d6ed
2 changed files with 4 additions and 0 deletions
  1. 1
    0
      irc/config.go
  2. 3
    0
      irc/server.go

+ 1
- 0
irc/config.go View File

@@ -1166,6 +1166,7 @@ func (config *Config) generateISupport() (err error) {
1166 1166
 	isupport := &config.Server.isupport
1167 1167
 	isupport.Initialize()
1168 1168
 	isupport.Add("AWAYLEN", strconv.Itoa(config.Limits.AwayLen))
1169
+	isupport.Add("BOT", "B")
1169 1170
 	isupport.Add("CASEMAPPING", "ascii")
1170 1171
 	isupport.Add("CHANLIMIT", fmt.Sprintf("%s:%d", chanTypes, config.Channels.MaxChannelsPerClient))
1171 1172
 	isupport.Add("CHANMODES", strings.Join([]string{modes.Modes{modes.BanMask, modes.ExceptMask, modes.InviteMask}.String(), modes.Modes{modes.Key}.String(), modes.Modes{modes.UserLimit}.String(), modes.Modes{modes.InviteOnly, modes.Moderated, modes.NoOutside, modes.OpOnlyTopic, modes.ChanRoleplaying, modes.Secret, modes.NoCTCP, modes.RegisteredOnly}.String()}, ","))

+ 3
- 0
irc/server.go View File

@@ -444,6 +444,9 @@ func (client *Client) rplWhoReply(channel *Channel, target *Client, rb *Response
444 444
 		flags += channel.ClientPrefixes(target, rb.session.capabilities.Has(caps.MultiPrefix))
445 445
 		channelName = channel.name
446 446
 	}
447
+	if target.HasMode(modes.Bot) {
448
+		flags += "B"
449
+	}
447 450
 	details := target.Details()
448 451
 	// hardcode a hopcount of 0 for now
449 452
 	rb.Add(nil, client.server.name, RPL_WHOREPLY, client.Nick(), channelName, details.username, details.hostname, client.server.name, details.nick, flags, "0 "+details.realname)

Loading…
Cancel
Save