Add category for mod actions

This commit is contained in:
BrokenEagle
2018-01-13 14:48:08 -08:00
parent b9964e97a7
commit 3c45273694
18 changed files with 92 additions and 32 deletions

View File

@@ -7,10 +7,10 @@ class IpBan < ApplicationRecord
validates_uniqueness_of :ip_addr, :if => lambda {|rec| rec.ip_addr =~ IP_ADDR_REGEX}
attr_accessible :ip_addr, :reason
after_create do |rec|
ModAction.log("#{CurrentUser.name} created ip ban for #{rec.ip_addr}")
ModAction.log("#{CurrentUser.name} created ip ban for #{rec.ip_addr}",:ip_ban_create)
end
after_destroy do |rec|
ModAction.log("#{CurrentUser.name} deleted ip ban for #{rec.ip_addr}")
ModAction.log("#{CurrentUser.name} deleted ip ban for #{rec.ip_addr}",:ip_ban_delete)
end
def self.is_banned?(ip_addr)