summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-31 11:19:40 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-31 11:19:40 -0300
commit636f7ba1cea6ef8b6c24d936d29f7df593b32ff9 (patch)
treedd404b7b4a1c7c159e5f90fab927489b2281f0b7
parent7d904dedd780cc41a7cb283134026917ca068e84 (diff)
downloadserver-636f7ba1cea6ef8b6c24d936d29f7df593b32ff9.tar.gz
server-636f7ba1cea6ef8b6c24d936d29f7df593b32ff9.tar.bz2
server-636f7ba1cea6ef8b6c24d936d29f7df593b32ff9.tar.xz
server-636f7ba1cea6ef8b6c24d936d29f7df593b32ff9.zip
Fix typos and a bug of a swapped max and min function
-rw-r--r--consts.py4
-rw-r--r--player.py2
-rw-r--r--protocol.py4
-rw-r--r--security.py4
-rwxr-xr-xserver.py4
5 files changed, 9 insertions, 9 deletions
diff --git a/consts.py b/consts.py
index 85ff644..6dd83d0 100644
--- a/consts.py
+++ b/consts.py
@@ -1,4 +1,4 @@
-########################################################################################
+#################################################################################
# This file is part of Spheres.
# Copyright (C) 2019 Jesusalva
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-########################################################################################
+#################################################################################
# Constants Module
# Elements
diff --git a/player.py b/player.py
index cf90e0c..d035a72 100644
--- a/player.py
+++ b/player.py
@@ -227,7 +227,7 @@ def check_rank_up(token):
Player[token]["max_exp"]=exp_to_lvlup(Player[token]["level"])
update_ap(token, Player[token]["max_ap"]-Player[token]["ap"])
# Sanitize
- Player[token]["exp"]=max(Player[token]["exp"], exp_to_lvlup(Player[token]["level"]))
+ Player[token]["exp"]=min(Player[token]["exp"], exp_to_lvlup(Player[token]["level"]))
return rs
diff --git a/protocol.py b/protocol.py
index f6a2905..4ee50c3 100644
--- a/protocol.py
+++ b/protocol.py
@@ -1,4 +1,4 @@
-########################################################################################
+#################################################################################
# This file is part of Spheres.
# Copyright (C) 2019 Jesusalva
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-########################################################################################
+#################################################################################
# Protocol Module
# Parses packets
import utils
diff --git a/security.py b/security.py
index 8383fae..6a51f79 100644
--- a/security.py
+++ b/security.py
@@ -1,4 +1,4 @@
-########################################################################################
+#################################################################################
# This file is part of Spheres.
# Copyright (C) 2019 Jesusalva
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-########################################################################################
+#################################################################################
# Adds an extra layer of security to the server
# Really basic stuff, still better than nothing, though
import threading, time, traceback
diff --git a/server.py b/server.py
index 9ecf08c..663bb3b 100755
--- a/server.py
+++ b/server.py
@@ -1,5 +1,5 @@
#!/usr/bin/python3
-########################################################################################
+#################################################################################
# This file is part of Mana Spheres.
# Copyright (C) 2020 Jesusalva
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-########################################################################################
+#################################################################################
## Global Modules
import threading, time, json, syslog