summaryrefslogtreecommitdiff
path: root/apb/ffbans.rb
diff options
context:
space:
mode:
Diffstat (limited to 'apb/ffbans.rb')
-rwxr-xr-xapb/ffbans.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/apb/ffbans.rb b/apb/ffbans.rb
new file mode 100755
index 0000000..c935d7f
--- /dev/null
+++ b/apb/ffbans.rb
@@ -0,0 +1,15 @@
+#!/usr/bin/ruby
+
+require 'json'
+require 'net/http'
+
+game = String.new
+
+http = Net::HTTP.new('ffbans.org', 443)
+http.use_ssl = true
+#http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+
+response = JSON.parse(http.request(Net::HTTP::Get.new("/data.php?op=all")).body)
+for ban in response
+ printf( "%-19s %-7s %3s %-20s\n", ban['Timestamp'], ban['Server'].to_s, ban['Rating'].to_s, ban['Name'] )
+end