summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-01-25 23:11:30 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-01-25 23:11:30 +0100
commitdb379fd8e1b9b9f4829217b2d5262e7629360413 (patch)
treebf4facbf718a803a5b3b86f8a2ffe9e727303778 /data
parent06485aeb187dde5e81204b06c8e956e7e035c323 (diff)
markov: whitespace cleanup
Diffstat (limited to 'data')
-rwxr-xr-xdata/rbot/plugins/markov.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb
index 574dde57..28211203 100755
--- a/data/rbot/plugins/markov.rb
+++ b/data/rbot/plugins/markov.rb
@@ -294,15 +294,15 @@ class MarkovPlugin < Plugin
output = word1
keys = []
@chains.each_key(output) do |key|
- if key.downcase.include? output
- keys << key
- else
- break
- end
+ if key.downcase.include? output
+ keys << key
+ else
+ break
+ end
end
return nil if keys.empty?
output = keys[rand(keys.size)].split(/ /)
- end
+ end
output = output.split(/ /) unless output.is_a? Array
input = [word1, word2]
while output.length < @bot.config['markov.max_words'] and (output.first != MARKER or output.last != MARKER) do
@@ -317,8 +317,8 @@ class MarkovPlugin < Plugin
if output == input
nil
else
- output.join(" ")
- end
+ output.join(" ")
+ end
end
def help(plugin, topic="")