Drop size arg from newCasemapMap
It's unused.
This commit is contained in:
parent
4e40b498b1
commit
c8f9728ff6
@ -348,7 +348,7 @@ func newDownstreamConn(srv *Server, ic ircConn, id uint64) *downstreamConn {
|
||||
nickCM: "*",
|
||||
username: "~u",
|
||||
caps: xirc.NewCapRegistry(),
|
||||
monitored: newCasemapMap(0),
|
||||
monitored: newCasemapMap(),
|
||||
registration: new(downstreamRegistration),
|
||||
}
|
||||
dc.monitored.SetCasemapping(casemapASCII)
|
||||
@ -2716,7 +2716,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
|
||||
}
|
||||
uc.updateMonitor()
|
||||
case "C": // clear
|
||||
dc.monitored = newCasemapMap(0)
|
||||
dc.monitored = newCasemapMap()
|
||||
dc.monitored.SetCasemapping(casemapASCII)
|
||||
uc.updateMonitor()
|
||||
case "L": // list
|
||||
|
4
irc.go
4
irc.go
@ -313,9 +313,9 @@ type casemapEntry struct {
|
||||
value interface{}
|
||||
}
|
||||
|
||||
func newCasemapMap(size int) casemapMap {
|
||||
func newCasemapMap() casemapMap {
|
||||
return casemapMap{
|
||||
innerMap: make(map[string]casemapEntry, size),
|
||||
innerMap: make(map[string]casemapEntry),
|
||||
casemap: casemapNone,
|
||||
}
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ func connectToUpstream(ctx context.Context, network *network) (*upstreamConn, er
|
||||
conn: *newConn(network.user.srv, newNetIRCConn(netConn), &options),
|
||||
network: network,
|
||||
user: network.user,
|
||||
channels: upstreamChannelCasemapMap{newCasemapMap(0)},
|
||||
channels: upstreamChannelCasemapMap{newCasemapMap()},
|
||||
caps: xirc.NewCapRegistry(),
|
||||
batches: make(map[string]upstreamBatch),
|
||||
serverPrefix: &irc.Prefix{Name: "*"},
|
||||
@ -264,7 +264,7 @@ func connectToUpstream(ctx context.Context, network *network) (*upstreamConn, er
|
||||
availableMemberships: stdMemberships,
|
||||
isupport: make(map[string]*string),
|
||||
pendingCmds: make(map[string][]pendingUpstreamCommand),
|
||||
monitored: monitorCasemapMap{newCasemapMap(0)},
|
||||
monitored: monitorCasemapMap{newCasemapMap()},
|
||||
}
|
||||
return uc, nil
|
||||
}
|
||||
@ -993,7 +993,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
|
||||
for _, ch := range strings.Split(channels, ",") {
|
||||
if uc.isOurNick(msg.Prefix.Name) {
|
||||
uc.logger.Printf("joined channel %q", ch)
|
||||
members := membershipsCasemapMap{newCasemapMap(0)}
|
||||
members := membershipsCasemapMap{newCasemapMap()}
|
||||
members.casemap = uc.network.casemap
|
||||
uc.channels.SetValue(ch, &upstreamChannel{
|
||||
Name: ch,
|
||||
|
4
user.go
4
user.go
@ -81,7 +81,7 @@ type deliveredStore struct {
|
||||
}
|
||||
|
||||
func newDeliveredStore() deliveredStore {
|
||||
return deliveredStore{deliveredCasemapMap{newCasemapMap(0)}}
|
||||
return deliveredStore{deliveredCasemapMap{newCasemapMap()}}
|
||||
}
|
||||
|
||||
func (ds deliveredStore) HasTarget(target string) bool {
|
||||
@ -141,7 +141,7 @@ type network struct {
|
||||
func newNetwork(user *user, record *database.Network, channels []database.Channel) *network {
|
||||
logger := &prefixLogger{user.logger, fmt.Sprintf("network %q: ", record.GetName())}
|
||||
|
||||
m := channelCasemapMap{newCasemapMap(0)}
|
||||
m := channelCasemapMap{newCasemapMap()}
|
||||
for _, ch := range channels {
|
||||
ch := ch
|
||||
m.SetValue(ch.Name, &ch)
|
||||
|
Loading…
Reference in New Issue
Block a user