Last active
December 15, 2015 03:19
-
-
Save ckazu/5193098 to your computer and use it in GitHub Desktop.
マジとヤバイを強いと本格的ににする irc bot.
cite: http://blog.livedoor.jp/kinisoku/archives/3724378.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cinch' | |
Process.daemon | |
bot = Cinch::Bot.new do | |
configure do |c| | |
c.server = 'irc.example.com' | |
c.password = 'password' | |
c.port = '1234' | |
c.ssl.use = true | |
c.realname = "HOGE, fuga" | |
c.nick = "freshman" | |
c.channels = ['#hoge'] | |
end | |
on :message, /(やば|ヤバ)(い|イ)|(まじ|マジ)[で]?/ do |m| | |
m.channel.notice m.message.gsub(/(やば|ヤバ)(い|イ)/, '強い').gsub(/(まじ|マジ)[で]?/, '本格的に') | |
end | |
end | |
bot.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
channelsの設定、#hogeがクォーテーションでくくられてないです