### Home Classes Methods

### In Files

- lib/rbot/botuser.rb

### Parent

Irc::Bot::Auth::BotUser

### Methods

- ::new
- #autologin=
- #knows?
- #login
- #login_by_mask=
- #permit?
- #reset_autologin
- #reset_login_by_mask
- #set_default_permission

### Included Modules

- Singleton

### Class/Module Index

Quicksearch

- Irc
- Irc::AsciiCasemap
- Irc::BanlistMessage
- Irc::BasicUserMessage
- Irc::Bot
- Irc::Bot::Auth
- Irc::Bot::Auth::BotOwnerClass
- Irc::Bot::Auth::BotUser
- Irc::Bot::Auth::Command
- Irc::Bot::Auth::DefaultBotUserClass
- Irc::Bot::Auth::InvalidPassword
- Irc::Bot::Auth::ManagerClass
- Irc::Bot::Auth::PermissionSet
- Irc::Bot::Config
- Irc::Bot::Config::ArrayValue
- Irc::Bot::Config::BooleanValue
- Irc::Bot::Config::EnumValue
- Irc::Bot::Config::FloatValue
- Irc::Bot::Config::IntegerValue
- Irc::Bot::Config::ManagerClass
- Irc::Bot::Config::StringValue
- Irc::Bot::Config::Value
- Irc::Bot::Config::Wizard
- Irc::Bot::DataFilter
- Irc::Bot::DataStream
- Irc::Bot::Language
- Irc::Bot::MessageMapper
- Irc::Bot::MessageMapper::Failure
- Irc::Bot::MessageMapper::FriendlyFailure
- Irc::Bot::MessageMapper::NoActionFailure
- Irc::Bot::MessageMapper::NoMatchFailure
- Irc::Bot::MessageMapper::NotPrivateFailure
- Irc::Bot::MessageMapper::NotPublicFailure
- Irc::Bot::MessageMapper::PartialMatchFailure
- Irc::Bot::MessageParameter
- Irc::Bot::MessageTemplate
- Irc::Bot::Plugins
- Irc::Bot::Plugins::BotModule
- Irc::Bot::Plugins::CoreBotModule
- Irc::Bot::Plugins::Plugin
- Irc::Bot::Plugins::PluginManagerClass
- Irc::Bot::Plugins::RecurseTooDeep
- Irc::Bot::Plugins::RemoteBotModule
- Irc::Bot::Plugins::RemoteCoreBotModule
- Irc::Bot::Plugins::RemotePlugin
- Irc::Bot::Registry
- Irc::Bot::Registry::Accessor
- Irc::Bot::RemoteDispatcher
- Irc::Bot::RemoteMessage
- Irc::Bot::RemoteObject
- Irc::Bot::Wordlist
- Irc::BotConfig
- Irc::Casemap
- Irc::Channel
- Irc::Channel::Mode
- Irc::Channel::ModeHash
- Irc::Channel::ModeTypeA
- Irc::Channel::ModeTypeB
- Irc::Channel::ModeTypeC
- Irc::Channel::ModeTypeD
- Irc::Channel::Topic
- Irc::Channel::UserMode
- Irc::ChannelList
- Irc::Client
- Irc::DBHash
- Irc::DBTree
- Irc::InviteMessage
- Irc::JoinMessage
- Irc::KickMessage
- Irc::MessageQueue
- Irc::ModeChangeMessage
- Irc::MotdMessage
- Irc::NamesMessage
- Irc::Netmask
- Irc::NetmaskDb
- Irc::NetmaskDb::Tree
- Irc::NetmaskList
- Irc::NickMessage
- Irc::NoSuchTargetMessage
- Irc::NoticeMessage
- Irc::PartMessage
- Irc::PrivMessage
- Irc::QueueRing
- Irc::QuitMessage
- Irc::RfcCasemap
- Irc::Server
- Irc::ServerOrCasemap
- Irc::Socket
- Irc::Socket::IdentityFilter
- Irc::StrictRfcCasemap
- Irc::TopicMessage
- Irc::UnknownMessage
- Irc::User
- Irc::UserList
- Irc::UserMessage
- Irc::Utils
- Irc::Utils::HttpUtil
- Irc::Utils::HttpUtil::CachedObject
- Irc::Utils::ParseTime
- Irc::WelcomeMessage
- Irc::WhoisMessage
- BDB
- BDB::CIBtree
- MonitorMixin
- MonitorMixin::ConditionVariable
- Net
- Net::HTTPResponse
- Regexp
- Regexp::Irc
- Singleton
- Singleton::SingletonClassMethods
- Timer
- Timer::Action
- TokyoCabinet
- TokyoCabinet::CIBDB
- UnicodePlugin
- UnicodePlugin::UnicodeFilter
- Array
- ArrayOf
- AuthModule
- BasicsModule
- ConditionVariable
- ConfigModule
- DottedIndex
- Enumerable
- Exception
- FiltersModule
- GetText
- GetTextVersionError
- HttpUtilPlugin
- IrcLogModule
- Module
- Numeric
- Object
- Range
- RemoteModule
- ServerError
- String
- Symbol
- UserDataModule
- WordlistModule
- YAML

No matching classes.

# Irc::Bot::Auth::DefaultBotUserClass

This is the default BotUser: it's used for all users which haven't identified with the bot

### Public Class Methods

new() click to toggle source

The default BotUser is named 'everyone'

    # File lib/rbot/botuser.rb, line 537
    def initialize
      reset_login_by_mask
      reset_autologin
      super("everyone")
      @default_perm = PermissionSet.new
    end

### Public Instance Methods

autologin=(val) click to toggle source

This method returns without changing anything

    # File lib/rbot/botuser.rb, line 559
    def autologin=(val)
      debug "Tried to change the autologin for default bot user, ignoring"
      return
    end

knows?(user) click to toggle source

default knows everybody

    # File lib/rbot/botuser.rb, line 580
    def knows?(user)
      return true if user.to_irc_user
    end

login(user, password) click to toggle source

We always allow logging in as the default user

    # File lib/rbot/botuser.rb, line 585
    def login(user, password)
      return true
    end

login_by_mask=(val) click to toggle source

This method returns without changing anything

    # File lib/rbot/botuser.rb, line 546
    def login_by_mask=(val)
      debug "Tried to change the login-by-mask for default bot user, ignoring"
      return @login_by_mask
    end

permit?(cmd, chan=nil) click to toggle source

DefaultBotUser will check the default_perm after checking the global ones or on all channels if chan is nil

    # File lib/rbot/botuser.rb, line 593
    def permit?(cmd, chan=nil)
      allow = super(cmd, chan)
      if allow.nil? && chan.nil?
        allow = @default_perm.permit?(cmd)
      end
      return allow
    end

reset_autologin() click to toggle source

The default botuser doesn't allow autologin (meaningless)

    # File lib/rbot/botuser.rb, line 566
    def reset_autologin
      @autologin = false
    end

reset_login_by_mask() click to toggle source

The default botuser allows logins by mask

    # File lib/rbot/botuser.rb, line 553
    def reset_login_by_mask
      @login_by_mask = true
    end

set_default_permission(cmd, val) click to toggle source

Sets the default permission for the default user (i.e. the ones set by the BotModule writers) on all channels

    # File lib/rbot/botuser.rb, line 573
    def set_default_permission(cmd, val)
      @default_perm.set_permission(Command.new(cmd), val)
      debug "Default permissions now: #{@default_perm.pretty_inspect}"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.