Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change bot/Clients.ChangeNick to be on a hook #25

Open
Xe opened this issue Jan 30, 2015 · 0 comments
Open

Change bot/Clients.ChangeNick to be on a hook #25

Xe opened this issue Jan 30, 2015 · 0 comments
Milestone

Comments

@Xe
Copy link
Owner

Xe commented Jan 30, 2015

// ChangeNick changes a client's nickname and updates the ByNick map.
func (c *ClientSet) ChangeNick(client *Client, newnick string) (err error) {
    if _, present := c.ByNick[strings.ToUpper(client.Nick)]; !present {
        Log.Fatalf("Client %s does not exist in Clients.ByNick. We are desynched. Exiting.", client.Nick)
    }

    delete(c.ByNick, client.Nick)

    c.ByNick[strings.ToUpper(newnick)] = client

    return
}

This should be a hook and not manually invoked behavior.

@Xe Xe added this to the v0.6 milestone Feb 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant