Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kylef
Created March 14, 2010 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylef/332048 to your computer and use it in GitHub Desktop.
Save kylef/332048 to your computer and use it in GitHub Desktop.
Support plugin for ZMB
class Support
def initialize(sender, settings=nil)
@delegate = sender
end
def commands
{
'support' => [:support, 1, { :help => 'request support' }],
}
end
def support(e, message='no message')
if e.respond_to?('users') then
staff = e.users.users.reject{ |user| not user.permission?('support') }
staff.each{ |user| e.delegate.message(user.username, "#{e.name} is trying to get some help. (#{message})") }
"Support team notified."
end
end
end
Plugin.define do
name "support"
description "Support"
object Support
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment