summaryrefslogtreecommitdiff
path: root/apb/ffbans.rb
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@localhost.localdomain>2016-12-17 16:51:49 -0800
committerJoe Rayhawk <jrayhawk@localhost.localdomain>2016-12-17 16:51:49 -0800
commit9fb46b7d14217168763f125c9b2adbe96a201c78 (patch)
treeb00d912435bfbdcfa888f33c33d5edcbd90347bb /apb/ffbans.rb
parent27c1c62e10abf7a132b126c2a27981eefad47cb1 (diff)
downloadtwitchtools-9fb46b7d14217168763f125c9b2adbe96a201c78.tar.gz
twitchtools-9fb46b7d14217168763f125c9b2adbe96a201c78.zip
apb/ffbans.rb: new
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