summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosip Janzic <josip.janzic@gmail.com>2016-11-10 23:54:39 +0100
committerJosip Janzic <josip.janzic@gmail.com>2016-11-11 00:00:48 +0100
commit6c728492793f9f225bb124e296b72f501ccc4dd5 (patch)
treee1fd60439dd5c03d36905001a13db7fa610d3964 /lib
parentVersion 1.0.0 (diff)
Add support for prefix format: nick!hostname
Diffstat (limited to 'lib')
-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 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/^(?<nick>[^!]+)(?:(?:!(?<user>[^@ ]+))?(?:@(?<host>[\w.:-]+)))?$/
+ @prefix_pattern ~r/^(?<nick>[^!]+)(?:!(?:(?<user>[^@ ]+)@)?(?:(?<host>[\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)