diff options
Diffstat (limited to 'src/Plugin.hs')
-rw-r--r-- | src/Plugin.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Plugin.hs b/src/Plugin.hs index 73df169..26432d9 100644 --- a/src/Plugin.hs +++ b/src/Plugin.hs @@ -4,6 +4,8 @@ module Plugin , plugins ) where +import qualified Data.Text as T + import Text.Regex.TDFA import qualified Message as M @@ -20,7 +22,7 @@ matchPlugin message = firstPlugin $ matchPlugins message plugins -- | Filter the list of plugins to those that match the given message. matchPlugins :: M.Message -> [Plugin] -> [Plugin] matchPlugins message plugins = - [p | p <- plugins, M.text message =~ matchRegex p] + [p | p <- plugins, (T.unpack $ M.text message) =~ matchRegex p] -- | Run the action belonging to the plugin, stored in its `perform` field. performPlugin :: Plugin -> PluginAction |