This is the default BotUser: it's used for all users which haven't identified with the bot
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
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
default knows everybody
# File lib/rbot/botuser.rb, line 580 def knows?(user) return true if user.to_irc_user end
We always allow logging in as the default user
# File lib/rbot/botuser.rb, line 585 def login(user, password) return true end
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
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
The default botuser doesn't allow autologin (meaningless)
# File lib/rbot/botuser.rb, line 566 def reset_autologin @autologin = false end
The default botuser allows logins by mask
# File lib/rbot/botuser.rb, line 553 def reset_login_by_mask @login_by_mask = true 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 def set_default_permission(cmd, val) @default_perm.set_permission(Command.new(cmd), val) debug "Default permissions now: #{@default_perm.pretty_inspect}" end
Generated with the Darkfish Rdoc Generator 2.