Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict mods #38

Merged
merged 2 commits into from
Feb 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions osu-ac/anticheat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from comparer import Comparer
from investigator import Investigator
from cacher import Cacher
from config import PATH_REPLAYS, WHITELIST
from config import PATH_REPLAYS, WHITELIST, VERSION

class Anticheat:

Expand Down Expand Up @@ -115,5 +115,9 @@ def _run_map(self):
return

if __name__ == '__main__':
anticheat = Anticheat(argparser.parse_args())
args = argparser.parse_args()
if(args.version):
print("osu!anticheat {}".format(VERSION))
sys.exit(0)
anticheat = Anticheat(args)
anticheat.run()
2 changes: 2 additions & 0 deletions osu-ac/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
action="store_true")

argparser.add_argument("-v", "--verify", help="Takes 3 positional arguments - map id, user1 id and user2 id. Verifies that the scores are steals of each other", nargs=3)

argparser.add_argument("--version", help="Prints the program version", action="store_true")
5 changes: 2 additions & 3 deletions osu-ac/comparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ def _print_result(self, result, replay1, replay2):

if(self.silent):
return
import sys
print("Would you like to see a visualization of both replays?")
answer = sys.stdin.readline()

answer = input("Would you like to see a visualization of both replays? ")
if (answer and answer[0].lower().strip() == "y"):
draw = Draw(replay1, replay2)
animation = draw.run()
Expand Down
2 changes: 2 additions & 0 deletions osu-ac/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
WHITELIST = ["124493", "6304246", "2558286", "2562987", "2757689"]

PATH_DB = PATH_ROOT / "db" / "cache.db" # /absolute/path/db/cache.db

VERSION = "1.0d"