| Class | Irc::Bot::Auth::DefaultBotUserClass |
| In: |
lib/rbot/botuser.rb
|
| Parent: | BotUser |
This is the default BotUser: it‘s used for all users which haven‘t identified with the bot
This method returns without changing anything
# 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
# 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
# File lib/rbot/botuser.rb, line 585
585: def login(user, password)
586: return true
587: end
This method returns without changing anything
# 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
# 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)
# File lib/rbot/botuser.rb, line 566
566: def reset_autologin
567: @autologin = false
568: end
The default botuser allows logins by mask
# 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
# 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