diff options
author | Joe Rayhawk <jrayhawk@localhost.localdomain> | 2016-12-17 16:51:49 -0800 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@localhost.localdomain> | 2016-12-17 16:51:49 -0800 |
commit | 9fb46b7d14217168763f125c9b2adbe96a201c78 (patch) | |
tree | b00d912435bfbdcfa888f33c33d5edcbd90347bb /apb | |
parent | 27c1c62e10abf7a132b126c2a27981eefad47cb1 (diff) | |
download | twitchtools-9fb46b7d14217168763f125c9b2adbe96a201c78.tar.gz twitchtools-9fb46b7d14217168763f125c9b2adbe96a201c78.zip |
apb/ffbans.rb: new
Diffstat (limited to 'apb')
-rwxr-xr-x | apb/ffbans.rb | 15 |
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 |