summaryrefslogtreecommitdiff
path: root/lib/irc
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-01 23:08:00 +0200
committerhref <href@random.sh>2021-09-01 23:08:00 +0200
commitb76b8c2800e993bfe5fa7f505279249058c01eec (patch)
tree9d3020b4aca18f39b5a0b49f3d2ab1ef4debc74a /lib/irc
parenttxt: random/1, allow dots in filenames (diff)
connection: fix crash with incomplete track_change
Diffstat (limited to 'lib/irc')
-rw-r--r--lib/irc/connection.ex15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/irc/connection.ex b/lib/irc/connection.ex
index bdcc658..3d27f93 100644
--- a/lib/irc/connection.ex
+++ b/lib/irc/connection.ex
@@ -454,6 +454,21 @@ defmodule IRC.Connection do
:ok
end
+ defp track_mode(network, channel, nick, "+v") do
+ IRC.UserTrack.change_privileges(network, channel, nick, {[:voice], []})
+ :ok
+ end
+
+ defp track_mode(network, channel, nick, "-v") do
+ IRC.UserTrack.change_privileges(network, channel, nick, {[], [:voice]})
+ :ok
+ end
+
+ defp track_mode(network, channel, nick, mode) do
+ Logger.warn("Unhandled track_mode: #{inspect {nick, mode}}")
+ :ok
+ end
+
defp server(%{conn: %{host: host, port: port}}) do
host <> ":" <> to_string(port)
end