mirror of
https://github.com/fluffle/goirc
synced 2025-07-17 09:11:13 +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
|
@ -90,9 +90,12 @@ func init() {
|
|||
* Channel methods for state management
|
||||
\******************************************************************************/
|
||||
|
||||
func (ch *Channel) initialise() {
|
||||
ch.Modes = new(ChanMode)
|
||||
ch.nicks = make(map[*Nick]*ChanPrivs)
|
||||
func NewChannel(name string) *Channel {
|
||||
return &Channel{
|
||||
Name: name,
|
||||
Modes: new(ChanMode),
|
||||
nicks: make(map[*Nick]*ChanPrivs),
|
||||
}
|
||||
}
|
||||
|
||||
// Associates a Nick with a Channel using a shared set of ChanPrivs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue