Skip to content

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

@Xe

Description

@Xe
// 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions