encrypt 8 years ago
parent
commit
bff2d6aaa5
1 changed files with 39 additions and 2 deletions
  1. 39 2
      tubiabot.rb

+ 39 - 2
tubiabot.rb

@@ -60,6 +60,37 @@ class Salvino
   end
 end
 
+class Jops
+  include Cinch::Plugin
+
+  match /jops/
+
+  def execute(m)
+    cibo = ["tigelle", "crescentine"]
+    m.reply "jops: andiamo a mangiare le "+cibo.sample+" ?"
+  end
+end
+
+class Qup
+  include Cinch::Plugin
+
+  match /qup/
+
+  def execute(m)
+    m.reply "qup, ora ti vengo a menare"
+  end
+end
+
+class Vergogna
+  include Cinch::Plugin
+
+  match /vergogna/
+
+  def execute(m)
+    m.reply "vergogna vergogna settimo reparto"
+  end
+end
+
 logger = File.open("./logs.txt", 'a+')
 markov = MarkyMarkov::TemporaryDictionary.new
 markov.parse_file './logs.txt'
@@ -69,7 +100,7 @@ bot = Cinch::Bot.new do
     c.server = "irc.mufhd0.net"
     c.nick = "TubiaBot"
     c.channels = ["#indivia"]
-    c.plugins.plugins = [Caffe, ToniNegri, Amici, JS, Salvino]
+    c.plugins.plugins = [Caffe, ToniNegri, Amici, JS, Salvino, Jops, Qup, Vergogna]
   end
 end
 
@@ -77,9 +108,15 @@ 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")
+  if m.message.include?(@bot.nick)
     m.reply markov.generate_n_sentences 1
   end
+  if m.message.include?("encrypt")
+    File.open('/tmp/lucine', 'w') do |f|
+      f.puts('blink 3 0.3')
+      f.flush
+    end
+  end
 end
 
 bot.start