diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/iplookup.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rbot/plugins/iplookup.rb b/data/rbot/plugins/iplookup.rb index a3f8f952..65018bb9 100644 --- a/data/rbot/plugins/iplookup.rb +++ b/data/rbot/plugins/iplookup.rb @@ -190,8 +190,12 @@ class IPLookupPlugin < Plugin def iplookup(m, params)
reply = ""
if params[:domain]
- ip = Resolv.getaddress(params[:domain])
- reply += "(#{params[:domain]} = #{ip}) "
+ begin
+ ip = Resolv.getaddress(params[:domain])
+ reply += "(#{params[:domain]} = #{ip}) "
+ rescue => e
+ m.reply "#{e.message}"
+ end
else
ip = params[:ip]
end
|