diff options
-rw-r--r-- | cmd.go | 2 | ||||
-rw-r--r-- | cmd_cap.go | 2 | ||||
-rw-r--r-- | cmd_nick.go | 2 | ||||
-rw-r--r-- | cmd_ping.go | 2 | ||||
-rw-r--r-- | cmd_user.go | 2 | ||||
-rw-r--r-- | main.go | 2 |
6 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ package main -var commandHandlers = map[string](func(RMsg, *Client) error){} +var CommandHandlers = map[string](func(RMsg, *Client) error){} /* Maybe we should make command handlers return their values for easier labelled-reply? */ @@ -5,7 +5,7 @@ import ( ) func init() { - commandHandlers["CAP"] = handleClientCap + CommandHandlers["CAP"] = handleClientCap } func handleClientCap(msg RMsg, client *Client) error { diff --git a/cmd_nick.go b/cmd_nick.go index f24a7fd..4c84a37 100644 --- a/cmd_nick.go +++ b/cmd_nick.go @@ -6,7 +6,7 @@ import ( ) func init() { - commandHandlers["NICK"] = handleClientNick + CommandHandlers["NICK"] = handleClientNick } func handleClientNick(msg RMsg, client *Client) error { diff --git a/cmd_ping.go b/cmd_ping.go index 9da4ee9..951233e 100644 --- a/cmd_ping.go +++ b/cmd_ping.go @@ -1,7 +1,7 @@ package main func init() { - commandHandlers["PING"] = handleClientPing + CommandHandlers["PING"] = handleClientPing } func handleClientPing(msg RMsg, client *Client) error { diff --git a/cmd_user.go b/cmd_user.go index bf8df64..93ee17e 100644 --- a/cmd_user.go +++ b/cmd_user.go @@ -5,7 +5,7 @@ import ( ) func init() { - commandHandlers["USER"] = handleClientUser + CommandHandlers["USER"] = handleClientUser } func handleClientUser(msg RMsg, client *Client) error { @@ -91,7 +91,7 @@ messageLoop: } } - handler, ok := commandHandlers[msg.Command] + handler, ok := CommandHandlers[msg.Command] if !ok { err := client.Send(MakeMsg(self, ERR_UNKNOWNCOMMAND, msg.Command, "Unknown command")) if err != nil { |