Module: Irc::Bot::Auth

Defined in:
lib/rbot/botuser.rb,
lib/rbot/botuser.rb,
lib/rbot/core/remote.rb

Overview

This module contains the actual Authentication stuff

Defined Under Namespace

Classes: BotOwnerClass, BotUser, Command, DefaultBotUserClass, InvalidPassword, ManagerClass, PermissionSet

Class Method Summary collapse

Class Method Details

.botownerObject

Returns the only instance of BotOwnerClass



629
630
631
# File 'lib/rbot/botuser.rb', line 629

def Auth.botowner
  return BotOwnerClass.instance
end

.defaultbotuserObject

Returns the only instance of DefaultBotUserClass



605
606
607
# File 'lib/rbot/botuser.rb', line 605

def Auth.defaultbotuser
  return DefaultBotUserClass.instance
end

.managerObject

Returns the only instance of ManagerClass



923
924
925
# File 'lib/rbot/botuser.rb', line 923

def Auth.manager
  return ManagerClass.instance
end

.random_password(l = 8) ⇒ Object

Generate a random password of length l



56
57
58
59
60
61
62
# File 'lib/rbot/botuser.rb', line 56

def Auth.random_password(l=8)
  pwd = ""
  l.times do
    pwd << (rand(26) + (rand(2) == 0 ? 65 : 97) ).chr
  end
  return pwd
end