mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
parent
6d642bfe93
commit
75bd63d0bc
4 changed files with 29 additions and 2 deletions
|
|
@ -394,6 +394,12 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||
}
|
||||
|
||||
server.playRegistrationBurst(session)
|
||||
|
||||
if len(config.Channels.AutoJoin) > 0 {
|
||||
// only applicable to new clients, not reattaches:
|
||||
server.handleAutojoins(session, config.Channels.AutoJoin)
|
||||
}
|
||||
|
||||
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"))
|
||||
}
|
||||
|
||||
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 {
|
||||
var chstrs []string
|
||||
targetInvis := target.HasMode(modes.Invisible)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue