revert bc267f6b29d7
authoralfadur
Tue, 05 Feb 2019 23:18:47 +0300
changeset 14690 669eb45bda72
parent 14689 bc267f6b29d7
child 14691 9f98086de1b6
revert bc267f6b29d7
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Tue Feb 05 22:40:35 2019 +0300
+++ b/gameServer/Actions.hs	Tue Feb 05 23:18:47 2019 +0300
@@ -668,10 +668,7 @@
         checkBan False _ n (BanByNick bn _ _) = isMatch bn n
         checkBan _ _ _ _ = False
         isMatch :: B.ByteString -> B.ByteString -> Bool
-        isMatch rexp src = case B.uncons rexp of 
-            Nothing -> False
-            Just ('^', rexp') -> (==) (Just True) $ mrexp rexp' >>= flip matchM src
-            Just _ -> rexp == src
+        isMatch rexp src = (==) (Just True) $ mrexp rexp >>= flip matchM src
         mrexp :: B.ByteString -> Maybe TDFAB.Regex
         mrexp = makeRegexOptsM TDFA.defaultCompOpt{TDFA.caseSensitive = False} TDFA.defaultExecOpt
         getBanReason (BanByIP _ msg _) = msg