X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/f38aa87edf153cf8f5f5c93a78fbf1424a8e62f2..adf9b5ec96187af2108c42791319cbe2a3366506:/app/views/quickvote/list_voters.rhtml diff --git a/app/views/quickvote/list_voters.rhtml b/app/views/quickvote/list_voters.rhtml index 695794f..be11290 100644 --- a/app/views/quickvote/list_voters.rhtml +++ b/app/views/quickvote/list_voters.rhtml @@ -1,5 +1,5 @@ <%= GMap.header %> - +<%require('whois/whois') %>
Quickvote Voters @@ -31,13 +31,13 @@ if Cache and w=Cache.get("WHOIS:#{voter.ipaddress}") elsif Cache puts "CREATE" - w= Whois::Whois.new(IPAddr.new(voter.ipaddress),false) + w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true) puts "SEARCH" w.search_whois puts "DONE" Cache.set("WHOIS:#{voter.ipaddress}", w) else - w= Whois::Whois.new(IPAddr.new(voter.ipaddress),false) + w= Whois::Whois.new(IPAddr.new(voter.ipaddress),true) w.search_whois end @@ -45,7 +45,12 @@ <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host)%> - <%=h (w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip -%> - <%= (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> + <%org=(w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip+" - "+ (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> + <% if org =~ /IANA/ %> + <%= "No additional information" %> + <% else %> + <%= h(org) %> + <% end %> <% rescue ArgumentError => err %> <%=h err %>