X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/597c27db39d8b36e623a9d6573e75edf657142c0..2125b369b46eeb120a4e76757a0ccc206b0eed09:/app/views/quickvote/results.rhtml diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 98a71e5..1df2856 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -1,4 +1,4 @@ -<%require 'IPAddr' %> +<%require 'whois/whois' %>
IP Address | @@ -157,10 +156,11 @@ 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 %> <% end %> | <%= voter.vote.votestring %> | @@ -168,8 +168,9 @@ by several other names. <% end %>