module Auth
Config.register Config::StringValue.new( 'auth.password',
- :default => 'rbotauth', :wizard => true,
+ :default => [*?a..?z,*?A..?Z,*?0..?9].sample(8).join, :store_default => true,
+ :wizard => true,
:on_change => Proc.new {|bot, v| bot.auth.botowner.password = v},
:desc => _('Password for the bot owner'))
Config.register Config::BooleanValue.new( 'auth.login_by_mask',
#
def initialize(cmd)
cmdpath = sanitize_command_path(cmd).split('::')
- seq = cmdpath.inject(["*"]) { |list, cmd|
- list << (list.length > 1 ? list.last + "::" : "") + cmd
+ seq = cmdpath.inject(["*"]) { |list, cc|
+ list << (list.length > 1 ? list.last + "::" : "") + cc
}
@path = seq.map { |k|
k.to_sym
if user.class <= BotUser
botuser = user
else
- botuser = irc_to_botuser(user)
+ botuser = user.botuser
end
cmd = cmdtxt.to_irc_auth_command