forked from External/ergo
move Commands initialization to an init()
This commit is contained in:
parent
62fc2c0cc3
commit
728863a17c
1 changed files with 256 additions and 252 deletions
|
|
@ -53,7 +53,10 @@ func (cmd *Command) Run(server *Server, client *Client, msg ircmsg.IrcMessage) b
|
|||
}
|
||||
|
||||
// Commands holds all commands executable by a client connected to us.
|
||||
var Commands = map[string]Command{
|
||||
var Commands map[string]Command
|
||||
|
||||
func init() {
|
||||
Commands = map[string]Command{
|
||||
"ACC": {
|
||||
handler: accHandler,
|
||||
minParams: 3,
|
||||
|
|
@ -305,4 +308,5 @@ var Commands = map[string]Command{
|
|||
handler: whowasHandler,
|
||||
minParams: 1,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue