summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/exirc/utils.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/exirc/utils.ex b/lib/exirc/utils.ex
index 8d4d3f1..2573cc3 100644
--- a/lib/exirc/utils.ex
+++ b/lib/exirc/utils.ex
@@ -25,7 +25,7 @@ defmodule ExIrc.Utils do
end
end
- @prefix_pattern ~r/^(?<nick>[^!\s]+)(?:!(?<user>[^@\s]+@)?(?<host>\S+))?$/
+ @prefix_pattern ~r/^(?<nick>[^!\s]+)(?:!(?:(?<user>[^@\s]+)@)?(?:(?<host>[\S]+)))?$/
defp parse_from(from, msg) do
from_str = IO.iodata_to_binary(from)
parts = Regex.run(@prefix_pattern, from_str, capture: :all_but_first)