1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-07-01 02:53:53 +00:00

Ditch initialise() functions and just make constructors better.

This commit is contained in:
Alex Bramley 2011-10-13 22:48:04 +01:00
parent 6266eba245
commit 2c333e0e9a
3 changed files with 22 additions and 22 deletions

View file

@ -44,9 +44,12 @@ func init() {
* Nick methods for state management
\******************************************************************************/
func (n *Nick) initialise() {
n.Modes = new(NickMode)
n.chans = make(map[*Channel]*ChanPrivs)
func NewNick(nick string) *Nick {
return &Nick{
Nick: nick,
Modes: new(NickMode),
chans: make(map[*Channel]*ChanPrivs),
}
}
// Associates a Channel with a Nick using a shared ChanPrivs