mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Add ChanServ and NickServ LIST commands.
These commands search the registered nicknames/channels for ones matching the provided regex, or return the entire list. Only operators with chanreg (for ChanServ) or accreg (for NickServ) capabilities can use LIST.
This commit is contained in:
parent
11e1939c9b
commit
6019ed1e29
3 changed files with 90 additions and 0 deletions
|
|
@ -1047,6 +1047,17 @@ func (am *AccountManager) AuthenticateByPassphrase(client *Client, accountName s
|
|||
return err
|
||||
}
|
||||
|
||||
func (am *AccountManager) AllNicks() []string {
|
||||
am.RLock()
|
||||
defer am.RUnlock()
|
||||
|
||||
nicks := make([]string, 0, len(am.nickToAccount))
|
||||
for nick := range am.nickToAccount {
|
||||
nicks = append(nicks, nick)
|
||||
}
|
||||
return nicks
|
||||
}
|
||||
|
||||
func (am *AccountManager) LoadAccount(accountName string) (result ClientAccount, err error) {
|
||||
casefoldedAccount, err := CasefoldName(accountName)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue