1
0
Fork 0
forked from External/ergo

refactor account registration, add nick enforcement

This commit is contained in:
Shivaram Lingamneni 2018-02-11 05:30:40 -05:00
parent fcd0a75469
commit ad73d68807
18 changed files with 865 additions and 602 deletions

View file

@ -70,13 +70,13 @@ func (server *Server) chanservRegisterHandler(client *Client, channelName string
return
}
if client.account == &NoAccount {
if client.Account() == "" {
rb.ChanServNotice(client.t("You must be logged in to register a channel"))
return
}
// this provides the synchronization that allows exactly one registration of the channel:
err = channelInfo.SetRegistered(client.AccountName())
err = channelInfo.SetRegistered(client.Account())
if err != nil {
rb.ChanServNotice(err.Error())
return