Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.44 KB | None | 0 0
  1. require 'cinch'
  2.  
  3. module Cinch::Plugins
  4.   class Die
  5.     include Cinch::Plugin
  6.  
  7.     match /die/
  8.  
  9.     def execute(m)
  10.      if m.channel
  11.        unless m.user.authname != "MyName";
  12.          bot.info("Received valid quit command from #{m.user.nick}")
  13.          m.reply("Very well. Goodbye.")
  14.          bot.quit("on command of #{m.user.nick}")
  15.         return;
  16.       end
  17.       m.reply("You are not authorized to use this command!")
  18.     end
  19.   end
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement