瀏覽代碼

measures of code quality implemented

Joshua 6 年之前
父節點
當前提交
a8b97ddb95
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      code/ID2TLib/Generator.py

+ 2 - 0
code/ID2TLib/Generator.py

@@ -91,6 +91,8 @@ def gen_random_server_port(offset: int=2199):
     Generates a valid random first and last character for a bots hostname
     and computes a port from these two characters.
     The default offset is chosen from a Sality implementation in 2011
+    :param offset: constant seed for calculation
+    :return: the generated server port
     """
     firstLetter = random.choice(string.ascii_letters);
     lastLetter = random.choice(string.ascii_letters + string.digits);