From 6c728492793f9f225bb124e296b72f501ccc4dd5 Mon Sep 17 00:00:00 2001 From: Josip Janzic Date: Thu, 10 Nov 2016 23:54:39 +0100 Subject: Add support for prefix format: nick!hostname --- lib/exirc/utils.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/exirc/utils.ex') diff --git a/lib/exirc/utils.ex b/lib/exirc/utils.ex index a5f18b5..d3f903c 100644 --- a/lib/exirc/utils.ex +++ b/lib/exirc/utils.ex @@ -25,7 +25,7 @@ defmodule ExIrc.Utils do end end - @prefix_pattern ~r/^(?[^!]+)(?:(?:!(?[^@ ]+))?(?:@(?[\w.:-]+)))?$/ + @prefix_pattern ~r/^(?[^!]+)(?:!(?:(?[^@ ]+)@)?(?:(?[\w.:-]+)))?$/ defp parse_from(from, msg) do from_str = IO.iodata_to_binary(from) parts = Regex.run(@prefix_pattern, from_str, capture: :all_but_first) -- cgit v1.2.3