Skip to content

Instantly share code, notes, and snippets.

@tosik
Created October 3, 2013 03:26
# coding: utf-8
require 'cinch'
def unko
"💩"
end
def shit
unko
end
def big_shit
<<EOS
a
aaa
aaaaa
aaaaaaa
aaaaaaaaa
aaaaaaaaaaa
aaaaaaaaaaaaa
EOS
end
def shit_aa
aa = <<EOS
   ∫ ∫ ∫
   ノヽ
  (_  )
 (_    )
(______ )
 ヽ(´・ω・)ノ 
   |  /
   UU
EOS
aa
end
def throw_shit_aa
aa = <<EOS
     Λ_Λ シュッ
    (`・ω・´)
    (つ  と彡
       / /
      /  /
     /  /
    /   /
   / /// / ツツー
  / a /
 /    /
EOS
aa.gsub('a', shit)
end
def rain_aa
aa = <<EOS
/ °/ / /。/ // / //
| ̄ ̄ ̄ ̄| ̄ ̄ | / °
|  // (a)。| /°//
| //  /_|\   | /。/
|。 ∧,,∧   // | /°/
|∩´・_・`∩ ° / | 。/ /
 ̄ ̄ ̄ ̄ ̄ ̄
EOS
aa.gsub('a', shit)
end
def neji_aa
aa = <<EOS
●ヽ( ・ω・`)ノ●
 ●ヽ(・ω・`)ノ●
  ●(ω・`ノ●
   (・`● )
   (●  )ノ●
  ●ヽ(   )ノ●
  ●(  ´)ノ●
   ( ´ノ●
   ( ノ● )
   ●´・ω)
  ●ヽ( ・ω・)●
 ●ヽ( ・ω・`)ノ●
EOS
aa.gsub('●', shit)
end
class Shitbot
def initialize
bot = Cinch::Bot.new do
configure do |c|
c.server = '******'
c.ssl.use = true
c.port = '******'
c.nick = 'shitbot'
c.realname = '******'
c.password = '******'
c.channels = ['******']
end
on :message, /う/ do |m|
message = m.message.split("う", -1).map {|str|
" " * str.size
}.join("う")
size = ((m.user.nick.size - 'shitbot'.size) / 2).to_i
if (size >= 0)
m.target.notice((" " * size) + message.gsub("う", "ん"))
m.target.notice((" " * size) + message.gsub("う", "こ"))
else
m.target.notice(message.sub(" " * (-size), "").gsub("う", "ん"))
m.target.notice(message.sub(" " * (-size), "").gsub("う", "こ"))
end
end
on :message, /shit/ do |m|
m.target.notice shit * (1..10).to_a.sample
end
on :message, /shit stream/ do |m|
thread = Thread.new do
20.times do
m.target.notice shit * 20
sleep 1
end
end
thread.join
end
on :message, /big shit/ do |m|
m.target.notice big_shit.gsub("a", shit).gsub(" ", " ")
end
#on :message, /unko/ do |m|
# thread = Thread.new do
# 1000.times do
# m.target.notice shit * 20 if (1..10).to_a.sample == 1
# sleep 60
# end
# end
# thread.join
#end
on :message, /うん/ do |m|
#m.target.notice "こ"
end
on :message, /それ/ do |m|
m.target.notice throw_shit_aa
end
on :message, /ぞ/ do |m|
m.target.notice shit_aa
end
on :message, /雨/ do |m|
m.target.notice rain_aa
end
on :message, /ねじ/ do |m|
m.target.notice neji_aa
end
end
bot.start
end
end
Shitbot.new
@udzura
Copy link

udzura commented Oct 3, 2013

alias shit unko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment