From 6110420015697a75674a2f660b60589863556ae7 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Tue, 11 Aug 2020 12:50:33 -0700 Subject: [PATCH] Comment out !markov status command, since it's quite expensive There's probably a better way to make this less expensive, but I'm not sure what it is. Until then, we'll leave this feature out. Signed-off-by: Alek Ratzloff --- lib/contrib/markov/markov.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/contrib/markov/markov.ex b/lib/contrib/markov/markov.ex index 19a66c4..4a749cf 100644 --- a/lib/contrib/markov/markov.ex +++ b/lib/contrib/markov/markov.ex @@ -44,12 +44,12 @@ defmodule Omnibot.Contrib.Markov do do_markov_message(irc, channel, nick, :all) end - command "!markov", ["status"] do - total = chain_server(channel, :all) |> ChainServer.chain_sum() - value = chain_server(channel, nick) |> ChainServer.chain_sum() - ratio = (value * 100) / total - Irc.send_to(irc, channel, "#{nick}: You are worth #{ratio |> Float.round(4)}% of the channel") - end + #command "!markov", ["status"] do + #total = chain_server(channel, :all) |> ChainServer.chain_sum() + #value = chain_server(channel, nick) |> ChainServer.chain_sum() + #ratio = (value * 100) / total + #Irc.send_to(irc, channel, "#{nick}: You are worth #{ratio |> Float.round(4)}% of the channel") + #end command "!markov", ["chance"] do chance = reply_chance(channel, nick)