Advertisement
Guest User

Untitled

a guest
Nov 6th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.21 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.      greeting = [
  9.         "Oh look it's #{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.       ]
  20.  
  21.   def greets
  22.     greeting.sample
  23.   end
  24.  
  25.   listen_to :join, :method => :hello
  26.   listen_to :part, :method => :goodbye
  27.   listen_to :quit, :method => :goodbye
  28.  
  29.   def hello(m)
  30.     unless m.user.nick == bot.nick
  31.       m.safe_reply "#{m.greets}"
  32.     return;
  33.   end
  34.     m.reply Format(:green, "Hello #{m.channel}! Systems online!")
  35.   end
  36.  
  37.   def goodbye(m)
  38.     m.reply Format(:green, "Goodbye, #{m.user.nick}! I will miss you!") unless m.user == bot
  39.   end
  40. end
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement