Added ban reason #41

Merged
bruncbrunc merged 7 commits from bna into master 2017-10-31 22:20:56 -04:00
Showing only changes of commit b9dcf0ac63 - Show all commits
+4
View File
1
@@ -32,7 +32,11 @@ class UsersController < ApplicationController
end end
def show def show
begin
@ban_json = JSON.parse(File.read("/etc/minecraft/redstoner/banned-players.json")).detect {|u| u["uuid"].tr("-", "") == @user.uuid} @ban_json = JSON.parse(File.read("/etc/minecraft/redstoner/banned-players.json")).detect {|u| u["uuid"].tr("-", "") == @user.uuid}
rescue
flash.now[:alert] = "An error occured while checking if this user is banned from the server!"
@ban_json = nil
end end
# SIGNUP # SIGNUP