]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Add docstring to is_real_player
authorAnt Zucaro <azucaro@gmail.com>
Tue, 18 Oct 2011 22:13:13 +0000 (18:13 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Tue, 18 Oct 2011 22:13:13 +0000 (18:13 -0400)
xonstat/views/submission.py

index 3b8f8a02f491fa6e82b87fe65fa0b416f9262ce3..c40a7111bd2ccdee8c67e159ae6ed9336746b6f8 100755 (executable)
@@ -10,6 +10,15 @@ from xonstat.util import strip_colors
 log = logging.getLogger(__name__)\r
 \r
 def is_real_player(events):\r
 log = logging.getLogger(__name__)\r
 \r
 def is_real_player(events):\r
+    """\r
+    Determines if a given set of player events correspond with a player who\r
+    \r
+    1) is not a bot (P event does not look like a bot)\r
+    2) played in the game (matches 1)\r
+    3) was present at the end of the game (scoreboardvalid 1)\r
+\r
+    Returns True if the player meets the above conditions, and false otherwise.\r
+    """\r
     flg_is_real = False\r
 \r
     if not events['P'].startswith('bot'):\r
     flg_is_real = False\r
 \r
     if not events['P'].startswith('bot'):\r