util.rb
# Check if a user has the given privilege. Privileges cascade, so:
#    - +:mod+ returns true if user is +:dev+, +:staff+, +:admin+, or +:mod+
#    - +:admin+ returns true if user is +:dev+, +:staff+, or +:admin+
#    - +:staff+ returns true if user is +:dev+ or +:staff+
#    - +:dev+ returns true if and only if <tt>@name == 'KockaAdmiralac'</tt>, or if a dev is set via config, that user too
# @param [Symbol] right
# @return [TrueClass, FalseClass]
Check if a user has the given privilege. Privileges cascade, so:
+:dev+ returns true if and only if @name == 'KockaAdmiralac', or if a dev is set via config, that user too
Check if a user has the given privilege . Privileges cascade so : + : dev + returns true if and only if @name == ' KockaAdmiralac ' or if a dev is set via config that user too
def is?(right)
    case right
      when :mod
        @mod or @admin or @staff or is? :dev
      when :admin
        @admin or @staff or is? :dev
      when :staff
        @staff or is? :dev
      when :dev
        @name.eql?('KockaAdmiralac') or (!@client.config['dev'].nil? and @name.eql?(@client.config['dev']))
      else
        false
    end
  end
def is? ( right ) case right when :mod @mod or @admin or @staff or is? :dev when :admin @admin or @staff or is? :dev when :staff @staff or is? :dev when :dev @name . eql? ( 'KockaAdmiralac' ) or ( ! @client . config [ 'dev' ] . nil? and @name . eql? ( @client . config [ 'dev' ] ) ) else false end end
Check if a user has the given privilege.
Check if a user has the given privilege .
None
TrueClass, FalseClass
right
<not_specific>
<not_specific>
None