Advertisement
Guest User

Untitled

a guest
Nov 7th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.19 KB | None | 0 0
  1. require 'cinch'
  2.  
  3. module Cinch::Plugins
  4.   class Greeting
  5.     include Cinch::Plugin
  6.  
  7.     def greet(m)
  8.       [
  9.         "Oh look it's #{m.user.nick} again. Lovely.",
  10.         "Hello #{m.user.nick}! Welcome to #{m.channel}!",
  11.         "So yeah, that #{m.user.nick} I really can't st- OH HI #{m.user.nick}!",
  12.         "We weren't JUST talking about you, #{m.user.nick}",
  13.         "#{m.user.nick}, where's my money?",
  14.         "Hi #{m.user.nick}!",
  15.         "Get out of here #{m.user.nick}, you don't want any part of this!",
  16.         "Did you guys hear that? Oh it's just wind between #{m.user.nick}'s ears.",
  17.         "#{m.user.nick}!!! Oh how I've missed you!",
  18.         "...and I said 'I DIDN'T BRING THE BONG' XDDD, oh hi #{m.user.nick}"
  19.       ].sample
  20.     end
  21.  
  22.     listen_to :join, :method => :hello
  23.     listen_to :part, :method => :goodbye
  24.     listen_to :quit, :method => :goodbye
  25.  
  26.     def hello(m)
  27.       unless m.user.nick == bot.nick
  28.         m.reply greet(m)
  29.         return;
  30.       end
  31.       m.reply Format(:green, "Hello #{m.channel}! Systems online!")
  32.     end
  33.  
  34.     def goodbye(m)
  35.       m.reply Format(:green, "Goodbye, #{m.user.nick}! I will miss you!") unless m.user == bot
  36.     end
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement