gameServer/Actions.hs
changeset 14706 669eb45bda72
parent 14705 bc267f6b29d7
child 14923 2dcc64515346
--- 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