mirror of
https://github.com/ergochat/ergo.git
synced 2025-05-04 05:37:39 +02: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.
|
// 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": {
|
"ACC": {
|
||||||
handler: accHandler,
|
handler: accHandler,
|
||||||
minParams: 3,
|
minParams: 3,
|
||||||
@ -306,3 +309,4 @@ var Commands = map[string]Command{
|
|||||||
minParams: 1,
|
minParams: 1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user