Class Irc::Bot::Auth::DefaultBotUserClass
In: lib/rbot/botuser.rb
Parent: BotUser
BasicUserMessage JoinMessage NamesMessage WhoisMessage ModeChangeMessage KickMessage MotdMessage QuitMessage BanlistMessage UserMessage NoSuchTargetMessage TopicMessage NickMessage WelcomeMessage UnknownMessage InviteMessage PartMessage NetmaskList UserList ArrayOf ChannelList Netmask User\n[lib/rbot/botuser.rb\nlib/rbot/irc.rb] Channel Singleton RfcCasemap StrictRfcCasemap AsciiCasemap Casemap PrivMessage NoticeMessage TokyoCabinet::BDB CIBDB Btree CIBtree Socket MessageQueue QueueRing Client DBHash\n[lib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] DBTree\n[lib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] Server NetmaskDb Bot\n[lib/rbot/botuser.rb\nlib/rbot/config.rb\nlib/rbot/ircbot.rb\nlib/rbot/language.rb\nlib/rbot/message.rb\nlib/rbot/messagemapper.rb\nlib/rbot/plugins.rb\nlib/rbot/rbotconfig.rb\nlib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] lib/rbot/ircsocket.rb lib/rbot/rfc2812.rb lib/rbot/registry/tc.rb lib/rbot/irc.rb lib/rbot/maskdb.rb lib/rbot/message.rb lib/rbot/messagemapper.rb lib/rbot/botuser.rb lib/rbot/registry/tc.rb (null) BotConfig PKGConfig ServerOrCasemap Irc dot/m_35_0.png

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

Methods

Included Modules

Singleton

Public Class methods

The default BotUser is named ‘everyone‘

[Source]

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

Public Instance methods

This method returns without changing anything

[Source]

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

default knows everybody

[Source]

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

We always allow logging in as the default user

[Source]

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

This method returns without changing anything

[Source]

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

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

[Source]

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

The default botuser doesn‘t allow autologin (meaningless)

[Source]

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

The default botuser allows logins by mask

[Source]

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

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

[Source]

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

[Validate]