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