Show
Ignore:
Timestamp:
11/04/08 00:38:35 (2 months ago)
Author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
git-committer:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1225748315 +0100
git-parent:

[297c80c7632e76e5c5a55cabad57154706911b57]

git-author:
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1225748315 +0100
Message:

auth botmodule: auth_allow_deny() accepts an optional :auth_path parameter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/rbot/core/auth.rb

    rb6e6d0c r36b162b  
    243243    end 
    244244 
    245     # pseudo-message to find the template. The source is ignored, and the 
    246     # target is set according to where the template should be checked 
    247     # (public or private) 
    248     # This might still fail in the case of 'everywhere' for commands there are 
    249     # really only private 
    250     case where 
    251     when :"?" 
    252       pseudo_target = @bot.myself 
    253     when :* 
    254       pseudo_target = m.channel 
     245    if p.has_key? :auth_path 
     246      auth_path = p[:auth_path] 
    255247    else 
    256       pseudo_target = m.server.channel(where) 
    257     end 
    258  
    259     pseudo = PrivMessage.new(bot, m.server, m.source, pseudo_target, p[:stuff].to_s) 
    260  
    261     auth_path = find_auth(pseudo) 
     248      # pseudo-message to find the template. The source is ignored, and the 
     249      # target is set according to where the template should be checked 
     250      # (public or private) 
     251      # This might still fail in the case of 'everywhere' for commands there are 
     252      # really only private 
     253      case where 
     254      when :"?" 
     255        pseudo_target = @bot.myself 
     256      when :* 
     257        pseudo_target = m.channel 
     258      else 
     259        pseudo_target = m.server.channel(where) 
     260      end 
     261 
     262      pseudo = PrivMessage.new(bot, m.server, m.source, pseudo_target, p[:stuff].to_s) 
     263 
     264      auth_path = find_auth(pseudo) 
     265    end 
    262266    debug auth_path 
    263267