aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd.go2
-rw-r--r--cmd_cap.go2
-rw-r--r--cmd_nick.go2
-rw-r--r--cmd_ping.go2
-rw-r--r--cmd_user.go2
-rw-r--r--main.go2
6 files changed, 6 insertions, 6 deletions
diff --git a/cmd.go b/cmd.go
index badd5b7..a7f2ff5 100644
--- a/cmd.go
+++ b/cmd.go
@@ -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? */
diff --git a/cmd_cap.go b/cmd_cap.go
index c1ddb1d..a2af228 100644
--- a/cmd_cap.go
+++ b/cmd_cap.go
@@ -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 {
diff --git a/main.go b/main.go
index edb629a..28b05b0 100644
--- a/main.go
+++ b/main.go
@@ -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 {