forked from External/ergo
refactor account registration, add nick enforcement
This commit is contained in:
parent
fcd0a75469
commit
ad73d68807
18 changed files with 865 additions and 602 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue