3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00

review fixes

This commit is contained in:
Shivaram Lingamneni 2019-02-06 15:47:20 -05:00
parent 2910eda737
commit 370255bec1
3 changed files with 3 additions and 3 deletions

View File

@ -795,7 +795,7 @@ func LoadConfig(filename string) (config *Config, err error) {
config.Channels.MaxChannelsPerClient = 100
}
if config.Channels.Registration.MaxChannelsPerAccount == 0 {
config.Channels.Registration.MaxChannelsPerAccount = 10
config.Channels.Registration.MaxChannelsPerAccount = 15
}
// in the current implementation, we disable history by creating a history buffer

View File

@ -1152,7 +1152,7 @@ func joinHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
oper := client.Oper()
for i, name := range channels {
if config.Channels.MaxChannelsPerClient <= client.NumChannels() && oper == nil {
rb.Add(nil, server.name, ERR_UNKNOWNERROR, client.Nick(), name, client.t("You have joined too many channels already"))
rb.Add(nil, server.name, ERR_TOOMANYCHANNELS, client.Nick(), name, client.t("You have joined too many channels"))
return false
}
var key string

View File

@ -284,7 +284,7 @@ channels:
enabled: true
# how many channels can each account register?
max-channels-per-account: 10
max-channels-per-account: 15
# operator classes
oper-classes: