From 559ccaf2536375e02a924eeef754dda5697a2b28 Mon Sep 17 00:00:00 2001 From: Riley Date: Wed, 11 May 2022 20:52:20 +0200 Subject: [PATCH] requested changes 2 --- plugin_interact.go | 5 +++-- 1 file 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 }