Skip to content

Commit

Permalink
Upgrade module
Browse files Browse the repository at this point in the history
  • Loading branch information
pangolp committed Aug 9, 2023
1 parent 317c26d commit d5082b3
Show file tree
Hide file tree
Showing 23 changed files with 223 additions and 181 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
105 changes: 105 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto eol=lf

# Text
*.conf text
*.conf.dist text
*.cmake text

## Scripts
*.sh text
*.fish text
*.lua text

## SQL
*.sql text

## C++
*.c text
*.cc text
*.cxx text
*.cpp text
*.c++ text
*.hpp text
*.h text
*.h++ text
*.hh text


## For documentation

# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary


## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

## EXECUTABLES
*.exe binary
*.pyc binary
4 changes: 3 additions & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## Anticheat Module

- Latest build status with AzerothCore: [![Build Status](https://github.com/azerothcore/mod-anticheat/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-anticheat)
- Latest build status with AzerothCore:

[![Build Status](https://github.com/azerothcore/mod-anticheat/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/mod-anticheat)

This is a port of the PassiveAnticheat Script from lordpsyan's repo to [AzerothCore](http://www.azerothcore.org)

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/core_codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Codestyle Checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
check-codestyle:
strategy:
fail-fast: false

runs-on: ubuntu-latest
name: Check Codestyling
steps:
- uses: actions/checkout@v2

- name: Check Codestyling
run: source ./apps/ci/ci-codestyle.sh
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 AzerothCore
Copyright (c) 2023 AzerothCore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Empty file added apps/.gitkeep
Empty file.
Empty file added apps/ci/.gitkeep
Empty file.
40 changes: 40 additions & 0 deletions apps/ci/ci-codestyle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
set -e

echo "Codestyle check script:"
echo

declare -A singleLineRegexChecks=(
["LOG_.+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above"
["[[:blank:]]$"]="Remove whitespace at the end of the lines above"
["\t"]="Replace tabs with 4 spaces in the lines above"
)

for check in ${!singleLineRegexChecks[@]}; do
echo " Checking RegEx: '${check}'"

if grep -P -r -I -n ${check} src; then
echo
echo "${singleLineRegexChecks[$check]}"
exit 1
fi
done

declare -A multiLineRegexChecks=(
["LOG_[^;]+GetCounter"]="Use ObjectGuid::ToString().c_str() method instead of ObjectGuid::GetCounter() when logging. Check the lines above"
["\n\n\n"]="Multiple blank lines detected, keep only one. Check the files above"
)

for check in ${!multiLineRegexChecks[@]}; do
echo " Checking RegEx: '${check}'"

if grep -Pzo -r -I ${check} src; then
echo
echo
echo "${multiLineRegexChecks[$check]}"
exit 1
fi
done

echo
echo "Everything looks good"
Empty file added conf/.gitkeep
Empty file.
12 changes: 0 additions & 12 deletions conf/conf.sh.dist

This file was deleted.

Empty file added data/.gitkeep
Empty file.
47 changes: 47 additions & 0 deletions data/sql/db-characters/base/charactersdb_anticheat.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
DROP TABLE IF EXISTS `daily_players_reports`;
CREATE TABLE IF NOT EXISTS `daily_players_reports` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`creation_time` int(10) unsigned NOT NULL DEFAULT '0',
`average` float NOT NULL DEFAULT '0',
`total_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`speed_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`fly_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`jump_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`waterwalk_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`teleportplane_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`climb_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`teleport_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`ignorecontrol_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`zaxis_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`antiswim_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`gravity_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`antiknockback_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`no_fall_damage_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`op_ack_hack_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`counter_measures_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

DROP TABLE IF EXISTS `players_reports_status`;
CREATE TABLE IF NOT EXISTS `players_reports_status` (
`guid` int(10) unsigned NOT NULL DEFAULT '0',
`creation_time` int(10) unsigned NOT NULL DEFAULT '0',
`average` float NOT NULL DEFAULT '0',
`total_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`speed_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`fly_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`jump_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`waterwalk_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`teleportplane_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`climb_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`teleport_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`ignorecontrol_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`zaxis_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`antiswim_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`gravity_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`antiknockback_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`no_fall_damage_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`op_ack_hack_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
`counter_measures_reports` bigint(20) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Empty file.
File renamed without changes.
43 changes: 0 additions & 43 deletions data/sql/db_characters/base/charactersdb_anticheat.sql

This file was deleted.

38 changes: 0 additions & 38 deletions data/sql/db_characters/updates/AC_2022_08_12_00.sql

This file was deleted.

38 changes: 0 additions & 38 deletions data/sql/db_characters/updates/AC_2022_08_21_00.sql

This file was deleted.

Loading

0 comments on commit d5082b3

Please sign in to comment.