]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
quakeauth plugin: don't error out when identifying with m == nil
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 9 Aug 2008 21:03:44 +0000 (23:03 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 9 Aug 2008 21:03:44 +0000 (23:03 +0200)
data/rbot/plugins/quakeauth.rb

index 10257adf099e78d067b45ef3cfab66510f65267f..b4b8b8d637846f15259daa452fa90de4011dfb4b 100644 (file)
@@ -35,6 +35,7 @@ class QPlugin < Plugin
         val
       end
     end
+    @source = nil
   end
 
   def set(m, params)
@@ -48,7 +49,7 @@ class QPlugin < Plugin
   end
 
   def identify(m, params)
-    @source = m.replyto
+    @source = m.replyto if m
     @registry['quakenet.auth'] = params[:password] if params[:password]
 
     if @registry.has_key?('quakenet.user') && @registry.has_key?('quakenet.auth')