]> projects.mako.cc - selectricity-live/blobdiff - app/views/quickvote/results.rhtml
Display IP address on unresolvable hosts
[selectricity-live] / app / views / quickvote / results.rhtml
index a2b12068830a7cb0d7d4adde770334d0a425d65c..f53bf3f05be99ee3ef7ad6f543f3dd82fae05454 100644 (file)
@@ -158,10 +158,11 @@ by several other names.</p>
         <% raise ArgumentError.new, "Local Server" if voter.ipaddress == "127.0.0.1" %>
         <% raise ArgumentError.new, "XML-RPC Voter" if voter.ipaddress == "XMLRPC Request" %>
         <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress).to_s,true)%>
         <% raise ArgumentError.new, "Local Server" if voter.ipaddress == "127.0.0.1" %>
         <% raise ArgumentError.new, "XML-RPC Voter" if voter.ipaddress == "XMLRPC Request" %>
         <% w= Whois::Whois.new(IPAddr.new(voter.ipaddress).to_s,true)%>
-        <%=(w.host == nil or w.host.empty?) ? "Unknown voter" : w.host%>
+        <%=(w.host == nil or w.host.empty?) ? voter.ipaddress : w.host%>
       </td>
       </td>
-  <td>
-      <%= w.search_whois.grep(/^OrgName/)[0].sub(/^OrgName\:/,'').strip %>
+      <td>
+        <%w.search_whois%>
+        <%= (w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip -%> - <%=  (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %>
     
     <% rescue ArgumentError => err %>
       <%= err %>
     
     <% rescue ArgumentError => err %>
       <%= err %>

Benjamin Mako Hill || Want to submit a patch?