summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKevin Montuori <montuori@gmail.com>2014-07-14 12:00:52 -0400
committerKevin Montuori <montuori@gmail.com>2014-07-14 12:00:52 -0400
commit5adbac503641e49f5ff7e1c3aed9fc7a8647d075 (patch)
treef3d9c5e817e019bcd329ef4a4ba78941ae78465e /lib
parentVersion 0.7.0 (diff)
fixed badarg issue
Diffstat (limited to 'lib')
-rw-r--r--lib/exirc/utils.ex8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/exirc/utils.ex b/lib/exirc/utils.ex
index 3da2832..c46f648 100644
--- a/lib/exirc/utils.ex
+++ b/lib/exirc/utils.ex
@@ -27,10 +27,10 @@ defmodule ExIrc.Utils do
defp parse_from(from, msg) do
case Regex.split(~r/(!|@|\.)/, IO.iodata_to_binary(from)) do
- [nick, "!", user, "@", host | host_rest] ->
- %{msg | :nick => nick, :user => user, :host => host <> host_rest}
- [nick, "@", host | host_rest] ->
- %{msg | :nick => nick, :host => host <> host_rest}
+ [nick, "!", user, "@" | host] ->
+ %{msg | :nick => nick, :user => user, :host => Enum.join(host)}
+ [nick, "@" | host] ->
+ %{msg | :nick => nick, :host => Enum.join(host)}
[_, "." | _] ->
# from is probably a server name
%{msg | :server => to_string(from)}