mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
parent
6d642bfe93
commit
75bd63d0bc
@ -364,7 +364,7 @@ server:
|
|||||||
# in a "closed-loop" system where you control the server and all the clients,
|
# in a "closed-loop" system where you control the server and all the clients,
|
||||||
# you may want to increase the maximum (non-tag) length of an IRC line from
|
# you may want to increase the maximum (non-tag) length of an IRC line from
|
||||||
# the default value of 512. DO NOT change this on a public server:
|
# the default value of 512. DO NOT change this on a public server:
|
||||||
# max-line-len: 512
|
#max-line-len: 512
|
||||||
|
|
||||||
# send all 0's as the LUSERS (user counts) output to non-operators; potentially useful
|
# send all 0's as the LUSERS (user counts) output to non-operators; potentially useful
|
||||||
# if you don't want to publicize how popular the server is
|
# if you don't want to publicize how popular the server is
|
||||||
@ -615,6 +615,12 @@ channels:
|
|||||||
# (0 or omit for no expiration):
|
# (0 or omit for no expiration):
|
||||||
invite-expiration: 24h
|
invite-expiration: 24h
|
||||||
|
|
||||||
|
# channels that new clients will automatically join. this should be used with
|
||||||
|
# caution, since traditional IRC users will likely view it as an antifeature.
|
||||||
|
# it may be useful in small community networks that have a single "primary" channel:
|
||||||
|
#auto-join:
|
||||||
|
# - "#lounge"
|
||||||
|
|
||||||
# operator classes:
|
# operator classes:
|
||||||
# an operator has a single "class" (defining a privilege level), which can include
|
# an operator has a single "class" (defining a privilege level), which can include
|
||||||
# multiple "capabilities" (defining privileged actions they can take). all
|
# multiple "capabilities" (defining privileged actions they can take). all
|
||||||
|
@ -644,6 +644,7 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
ListDelay time.Duration `yaml:"list-delay"`
|
ListDelay time.Duration `yaml:"list-delay"`
|
||||||
InviteExpiration custime.Duration `yaml:"invite-expiration"`
|
InviteExpiration custime.Duration `yaml:"invite-expiration"`
|
||||||
|
AutoJoin []string `yaml:"auto-join"`
|
||||||
}
|
}
|
||||||
|
|
||||||
OperClasses map[string]*OperClassConfig `yaml:"oper-classes"`
|
OperClasses map[string]*OperClassConfig `yaml:"oper-classes"`
|
||||||
|
@ -394,6 +394,12 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server.playRegistrationBurst(session)
|
server.playRegistrationBurst(session)
|
||||||
|
|
||||||
|
if len(config.Channels.AutoJoin) > 0 {
|
||||||
|
// only applicable to new clients, not reattaches:
|
||||||
|
server.handleAutojoins(session, config.Channels.AutoJoin)
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,6 +508,14 @@ func (server *Server) MOTD(client *Client, rb *ResponseBuffer) {
|
|||||||
rb.Add(nil, server.name, RPL_ENDOFMOTD, client.nick, client.t("End of MOTD command"))
|
rb.Add(nil, server.name, RPL_ENDOFMOTD, client.nick, client.t("End of MOTD command"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (server *Server) handleAutojoins(session *Session, channelNames []string) {
|
||||||
|
rb := NewResponseBuffer(session)
|
||||||
|
for _, chname := range channelNames {
|
||||||
|
server.channels.Join(session.client, chname, "", false, rb)
|
||||||
|
}
|
||||||
|
rb.Send(true)
|
||||||
|
}
|
||||||
|
|
||||||
func (client *Client) whoisChannelsNames(target *Client, multiPrefix bool, hasPrivs bool) []string {
|
func (client *Client) whoisChannelsNames(target *Client, multiPrefix bool, hasPrivs bool) []string {
|
||||||
var chstrs []string
|
var chstrs []string
|
||||||
targetInvis := target.HasMode(modes.Invisible)
|
targetInvis := target.HasMode(modes.Invisible)
|
||||||
|
@ -337,7 +337,7 @@ server:
|
|||||||
# in a "closed-loop" system where you control the server and all the clients,
|
# in a "closed-loop" system where you control the server and all the clients,
|
||||||
# you may want to increase the maximum (non-tag) length of an IRC line from
|
# you may want to increase the maximum (non-tag) length of an IRC line from
|
||||||
# the default value of 512. DO NOT change this on a public server:
|
# the default value of 512. DO NOT change this on a public server:
|
||||||
# max-line-len: 512
|
#max-line-len: 512
|
||||||
|
|
||||||
# send all 0's as the LUSERS (user counts) output to non-operators; potentially useful
|
# send all 0's as the LUSERS (user counts) output to non-operators; potentially useful
|
||||||
# if you don't want to publicize how popular the server is
|
# if you don't want to publicize how popular the server is
|
||||||
@ -587,6 +587,12 @@ channels:
|
|||||||
# (0 or omit for no expiration):
|
# (0 or omit for no expiration):
|
||||||
invite-expiration: 24h
|
invite-expiration: 24h
|
||||||
|
|
||||||
|
# channels that new clients will automatically join. this should be used with
|
||||||
|
# caution, since traditional IRC users will likely view it as an antifeature.
|
||||||
|
# it may be useful in small community networks that have a single "primary" channel:
|
||||||
|
#auto-join:
|
||||||
|
# - "#lounge"
|
||||||
|
|
||||||
# operator classes:
|
# operator classes:
|
||||||
# an operator has a single "class" (defining a privilege level), which can include
|
# an operator has a single "class" (defining a privilege level), which can include
|
||||||
# multiple "capabilities" (defining privileged actions they can take). all
|
# multiple "capabilities" (defining privileged actions they can take). all
|
||||||
|
Loading…
Reference in New Issue
Block a user