Advertisement
Guest User

Untitled

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