Class Irc::Bot::Auth::ManagerClass
In: lib/rbot/botuser.rb
Parent: Object

This is the ManagerClass singleton, used to manage Irc::User/Irc::Bot::Auth::BotUser connections and everything

Methods

Included Modules

Singleton

Attributes

bot  [R] 
botowner  [R] 
everyone  [R] 
maskdb  [R] 

Public Class methods

The instance manages two Hashes: one that maps Irc::Users onto BotUsers, and the other that maps usernames onto BotUser

Public Instance methods

Checks if command cmd is allowed to User user on chan, optionally telling if the user is authorized

Tries to auto-login Irc::User user by looking at the known botusers that allow autologin and trying to login without a password

Creates a new transient BotUser associated with Irc::User user, automatically logging him in. Note that transient botuser creation can fail, typically if we don‘t have the complete user netmask (e.g. for messages coming in from a linkbot)

returns the botuser with name name

checks if we know about a certain BotUser username

Logs Irc::User user in to BotUser botusername with password pwd

raises an error if botusername is not a known BotUser username

It is possible to autologin by Netmask, on request

Logs out any Irc::User matching Irc::Netmask m and logged in to a transient BotUser

Makes transient BotUser user into a permanent BotUser named name; if user is an Irc::User, act on the transient BotUser (if any) it‘s logged in as

Checks if User user can do cmd on chan.

Permission are checked in this order, until a true or false is returned:

  • associated BotUser on chan
  • associated BotUser on all channels
  • everyone on chan
  • everyone on all channels

resets the hashes

[Validate]