mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-18 05:28:11 -07:00
Stats for LUSERS logic now seperated, fixed params in LUSERS
This commit is contained in:
@@ -131,6 +131,7 @@ type Server struct {
|
||||
stsEnabled bool
|
||||
webirc []webircConfig
|
||||
whoWas *WhoWasList
|
||||
stats *Stats
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -164,6 +165,7 @@ func NewServer(config *Config, logger *logger.Manager) (*Server, error) {
|
||||
signals: make(chan os.Signal, len(ServerExitSignals)),
|
||||
snomasks: NewSnoManager(),
|
||||
whoWas: NewWhoWasList(config.Limits.WhowasEntries),
|
||||
stats: NewStats(),
|
||||
}
|
||||
|
||||
if err := server.applyConfig(config, true); err != nil {
|
||||
@@ -472,6 +474,9 @@ func (server *Server) tryRegister(c *Client) {
|
||||
return
|
||||
}
|
||||
|
||||
// count new user in statistics
|
||||
server.stats.ChangeTotal(1)
|
||||
|
||||
// continue registration
|
||||
server.logger.Debug("localconnect", fmt.Sprintf("Client registered [%s] [u:%s] [r:%s]", c.nick, c.username, c.realname))
|
||||
server.snomasks.Send(sno.LocalConnects, fmt.Sprintf(ircfmt.Unescape("Client registered $c[grey][$r%s$c[grey]] [u:$r%s$c[grey]] [h:$r%s$c[grey]] [r:$r%s$c[grey]]"), c.nick, c.username, c.rawHostname, c.realname))
|
||||
|
||||
Reference in New Issue
Block a user