X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/40891d8740b77b6d6249e8982f15e2f348725282..323c280a38e4154740639162969b427545678005:/app/views/quickvote/results.rhtml diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 3b3a54d..1df2856 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -1,4 +1,4 @@ -<%require 'IPAddr' %> +<%require 'whois/whois' %>

Results

<% if @election.shortdesc %> @@ -156,7 +156,8 @@ by several other names.

<%= voter.ipaddress %> <% begin %> - <%= `host #{IPAddr.new(voter.ipaddress).to_s}`.sub(/^.*pointer (.*)\.$/, '\1') %> + <% raise ArgumentError.new if voter.ipaddress == "127.0.0.1" %> + <%= Whois::Whois.new(IPAddr.new(voter.ipaddress).to_s).search_whois.grep(/^OrgName/)[0].sub(/^OrgName\:/,'').strip %> <% rescue ArgumentError => err %> <%= voter.ipaddress %>