al contadin non far sapere quanto è buono il cacio con le pere

This commit is contained in:
encrypt 2016-01-23 12:36:25 +01:00
parent a9bb734759
commit 7fcb4086fa

View file

@ -1,5 +1,6 @@
# coding: utf-8
require 'cinch'
require 'marky_markov'
class ToniNegri
include Cinch::Plugin
@ -59,6 +60,10 @@ class Salvino
end
end
logger = File.open("./logs.txt", 'a+')
markov = MarkyMarkov::TemporaryDictionary.new
markov.parse_file './logs.txt'
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.mufhd0.net"
@ -68,12 +73,13 @@ bot = Cinch::Bot.new do
end
end
logger = File.open("./logs.txt", 'a+')
bot.on :message do |m|
if m.user.nick == "Tubia87"
logger.write(m.message+"\n")
end
if m.message.include?(@bot.nick) and !@bot.user_list.include?("Tubia87")
m.reply markov.generate_n_sentences 1
end
end
bot.start