Advertisement
Guest User

Untitled

a guest
Feb 11th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.09 KB | None | 0 0
  1. class Say
  2.         include Cinch::Plugin
  3.  
  4.         match /say (#\S+) (.*)/, method: :say
  5.         match /say (\S+) (.*)/, method: :usay
  6.         match /powerup/, method: :powerup
  7.         match /sexify me/, method: :powerup
  8.         match /crash/, method: :crash
  9.         match /kick (\S+)/, method: :kick
  10.         def say(m, c, s, *args)
  11.                 return unless m.user.authname == "catepillar"
  12.                 channel = Channel(c)
  13.                 channel.msg s
  14.         end
  15.  
  16.         def usay(m, c, s, *args)
  17.                 return unless m.user.authname == "catepillar"
  18.                 user = User(c)
  19.                 user.msg s
  20.         end
  21.  
  22.         def powerup(m, *args)
  23.                 return if m.user.authname.match(/cate(pillar)?/).nil?
  24.                 m.channel.op(m.user)
  25.                 m.channel.voice(m.user)
  26.         end
  27.  
  28.         def crash(m, *args)
  29.                 m.reply "But I don't wanna."
  30.         end
  31.  
  32.         def kick(m, user, *args)
  33.                 return if m.user.authname.match(/cate(pillar)?/).nil?
  34.                 m.channel.kick(User(user))
  35.         end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement