]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
And the bugfix 3 minutes later. :)
authorChris Gahan <chris@ill-logic.com>
Sat, 25 Mar 2006 12:16:07 +0000 (12:16 +0000)
committerChris Gahan <chris@ill-logic.com>
Sat, 25 Mar 2006 12:16:07 +0000 (12:16 +0000)
data/rbot/plugins/iplookup.rb

index a3f8f952658723eb2c7ea7a9ef379b48d9c45daa..65018bb991fefbbdecd62f76d150389cf04849f8 100644 (file)
@@ -190,8 +190,12 @@ class IPLookupPlugin < Plugin
   def iplookup(m, params)\r
     reply = ""\r
     if params[:domain]\r
   def iplookup(m, params)\r
     reply = ""\r
     if params[:domain]\r
-      ip = Resolv.getaddress(params[:domain])\r
-      reply += "(#{params[:domain]} = #{ip}) "\r
+      begin\r
+        ip = Resolv.getaddress(params[:domain])\r
+        reply += "(#{params[:domain]} = #{ip}) "\r
+      rescue => e\r
+        m.reply "#{e.message}"\r
+      end\r
     else\r
       ip = params[:ip]\r
     end\r
     else\r
       ip = params[:ip]\r
     end\r