Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "cinch"
- FAMINA__REGEX = /\bfamina?\b/i
- NICK_BOTA = "Luklux_Clan"
- WORD__REGEX = /\bs(l|ł)owo?\b/i
- TABLICA = ["Słowo 1", "Słowo 2", "Słowo 3"]
- bot = Cinch::Bot.new do
- configure do |c|
- c.server = "irc.pirc.pl"
- c.channels = ["#wykoppl"]
- c.nick = NICK_BOTA
- end
- on :join do |m|
- bot.irc.send "MODE " + NICK_BOTA + " +B"
- end
- on :message, FAMINA__REGEX do |m|
- m.reply "Proszę, nie mówcie o niej :("
- end
- on :message, WORD__REGEX do |m|
- m.reply TABLICA.sample
- end
- end
- bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement