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:
parent
6266eba245
commit
2c333e0e9a
3 changed files with 22 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue