aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin_interact.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin_interact.go b/plugin_interact.go
index f835c25..f3d00d9 100644
--- a/plugin_interact.go
+++ b/plugin_interact.go
@@ -21,7 +21,7 @@ const (
Place
Use
Activate
- WildCard = 255
+ AnyInteraction = 255
)
var interactionHandlers []InteractionHandler
@@ -40,7 +40,8 @@ func handleInteraction(cmd *mt.ToSrvInteract, cc *ClientConn) bool {
handled := false
for _, handler := range interactionHandlers {
- if Interaction(handler.Type) == WildCard || Interaction(cmd.Action) == handler.Type {
+ interaction := Interaction(handler.Type)
+ if interaction == AnyInteraction || interaction == handler.Type {
if handler.Handler(cc, cmd) {
handled = true
}