mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
move Commands initialization to an init()
This commit is contained in:
parent
62fc2c0cc3
commit
728863a17c
@ -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…
Reference in New Issue
Block a user