From 604ee0013fb94cb1322b8c7317e3c94e78e3fa08 Mon Sep 17 00:00:00 2001 From: Godwhoa Date: Thu, 16 Aug 2018 10:53:41 +0530 Subject: [PATCH] Add proper docstrings for scripts --- piqueserver/scripts/afk.py | 10 +++- piqueserver/scripts/aimbot2.py | 12 ++++- piqueserver/scripts/airstrike2.py | 8 +++- piqueserver/scripts/antijerk.py | 10 +++- piqueserver/scripts/autohelp.py | 2 +- piqueserver/scripts/badmin.py | 19 ++++++-- piqueserver/scripts/blockinfo.py | 14 +++++- piqueserver/scripts/daycycle.py | 8 +++- piqueserver/scripts/demolitionman.py | 11 +++-- piqueserver/scripts/dirtnade.py | 2 +- piqueserver/scripts/disco.py | 7 ++- piqueserver/scripts/flagreturn.py | 3 +- piqueserver/scripts/geoip.py | 13 ++++++ piqueserver/scripts/map_extensions.py | 4 +- piqueserver/scripts/markers.py | 8 +++- piqueserver/scripts/match.py | 11 ++++- piqueserver/scripts/medkit.py | 17 ++++++- piqueserver/scripts/memcheck.py | 2 +- piqueserver/scripts/minefield.py | 11 ++--- piqueserver/scripts/nointelonwalls.py | 7 +-- piqueserver/scripts/paint.py | 9 ++-- piqueserver/scripts/passreload.py | 12 ++++- piqueserver/scripts/protect.py | 2 +- piqueserver/scripts/rampage.py | 2 +- piqueserver/scripts/rangedamage.py | 19 +++++++- piqueserver/scripts/rapid.py | 2 +- piqueserver/scripts/ratio.py | 13 ++++-- piqueserver/scripts/rollback.py | 19 +++++++- piqueserver/scripts/runningman.py | 2 +- piqueserver/scripts/savemap.py | 10 +++- piqueserver/scripts/smartnade.py | 9 ++-- piqueserver/scripts/spadenadefix.py | 6 ++- piqueserver/scripts/spawn_protect.py | 11 ++++- piqueserver/scripts/spectatorcontrol.py | 62 +++++++++++++------------ piqueserver/scripts/squad.py | 17 ++++++- piqueserver/scripts/strongblock.py | 2 +- piqueserver/scripts/timedmute.py | 16 +++++-- piqueserver/scripts/trusted.py | 7 ++- piqueserver/scripts/votekick.py | 36 ++++++++------ piqueserver/scripts/votemap.py | 24 +++++----- piqueserver/scripts/welcome.py | 10 +++- piqueserver/scripts/zoc.py | 16 ++++++- 42 files changed, 362 insertions(+), 123 deletions(-) diff --git a/piqueserver/scripts/afk.py b/piqueserver/scripts/afk.py index 100ef5ac6..5444987b0 100644 --- a/piqueserver/scripts/afk.py +++ b/piqueserver/scripts/afk.py @@ -1,7 +1,15 @@ """ Kicks a player if inactive for too long. -Maintainer: hompy +Options +^^^^^^^ + +.. code-block:: guess + + [afk] + time_limit = 15 # in minutes + +.. codeauthor:: hompy """ from operator import attrgetter diff --git a/piqueserver/scripts/aimbot2.py b/piqueserver/scripts/aimbot2.py index 1ee901a2f..10b1c01d2 100644 --- a/piqueserver/scripts/aimbot2.py +++ b/piqueserver/scripts/aimbot2.py @@ -1,7 +1,15 @@ """ -Plugin to detect and react to possible aimbot users +Detects and react to possible aimbot users. -maintained by: ? +Options +^^^^^^^ + +.. code-block:: guess + + [aimbot] + collect_data = true # saves hits and shots of each weapon to a csv file + +.. codeauthor:: ? """ import os import csv diff --git a/piqueserver/scripts/airstrike2.py b/piqueserver/scripts/airstrike2.py index 41ae14e15..e80493a62 100644 --- a/piqueserver/scripts/airstrike2.py +++ b/piqueserver/scripts/airstrike2.py @@ -1,7 +1,13 @@ """ Airstrikes. Boom! -Maintainer: hompy +Commands +^^^^^^^^ + +* ``/airstrike or /a`` +* ``/givestrike `` + +.. codeauthor:: hompy """ from math import ceil, sin, cos diff --git a/piqueserver/scripts/antijerk.py b/piqueserver/scripts/antijerk.py index fd3db1cb6..2e33f86f4 100644 --- a/piqueserver/scripts/antijerk.py +++ b/piqueserver/scripts/antijerk.py @@ -1,7 +1,15 @@ """ Kicks jerks for 'PRESS ALT-F4 FOR AIRSTRIKES' and so on. -Maintainer: ? +Options +^^^^^^^ + +.. code-block:: guess + + [antijerk] + ban_duration = 15 # in minutes + +.. codeauthor:: ? """ import re diff --git a/piqueserver/scripts/autohelp.py b/piqueserver/scripts/autohelp.py index 0156b9f04..4c4401861 100644 --- a/piqueserver/scripts/autohelp.py +++ b/piqueserver/scripts/autohelp.py @@ -1,7 +1,7 @@ """ Helps Deuces automagically when they ask in the chat for help. -Maintainer: ? +.. codeauthor:: ? """ import re diff --git a/piqueserver/scripts/badmin.py b/piqueserver/scripts/badmin.py index 1ed5de32f..db91c911d 100644 --- a/piqueserver/scripts/badmin.py +++ b/piqueserver/scripts/badmin.py @@ -1,6 +1,19 @@ -# Badmin is an bot admin. He'll do a variety of common admin tasks so you don't have to. -# He might not always get it right, but he'll get it done, and isn't that what really matters? -# -Requirements: blockinfo.py (for grief detection), ratio.py (for k/d ratio), aimbot2.py (hit accuracy) +""" +Badmin is an bot admin. + +It automates common admin tasks such as: + +* Banning greifers +* Banning aimbots +* Banning racists + +Since it is automate it won't always get it right. + +.. note:: + It is dependant on blockinfo.py (for grief detection), ratio.py (for k/d ratio), aimbot2.py (hit accuracy) scripts. + +.. codeauthor:: ? +""" from twisted.internet import reactor from pyspades.common import prettify_timespan diff --git a/piqueserver/scripts/blockinfo.py b/piqueserver/scripts/blockinfo.py index 6f223966c..0413ac766 100644 --- a/piqueserver/scripts/blockinfo.py +++ b/piqueserver/scripts/blockinfo.py @@ -1,9 +1,19 @@ """ A tool for identifying griefers. -Maintainer: hompy +.. note:: + "blockinfo" must be AFTER "votekick" in the config script list -Note: "blockinfo" must be AFTER "votekick" in the config.txt script list +Options +^^^^^^^ + +.. code-block:: guess + + [blockinfo] + griefcheck_on_votekick = true + irc_only = false + +.. codeauthor:: hompy """ from twisted.internet.reactor import seconds diff --git a/piqueserver/scripts/daycycle.py b/piqueserver/scripts/daycycle.py index 8164a21e4..668061eaa 100644 --- a/piqueserver/scripts/daycycle.py +++ b/piqueserver/scripts/daycycle.py @@ -1,7 +1,13 @@ """ Gives Ace of Spades a daycycle (using the fog). -Maintainer: hompy +Commands +^^^^^^^^ + +* ``/dayspeed`` +* ``/daytime`` + +.. codeauthor:: hompy """ from math import modf diff --git a/piqueserver/scripts/demolitionman.py b/piqueserver/scripts/demolitionman.py index da2ed3bc7..0983d2505 100644 --- a/piqueserver/scripts/demolitionman.py +++ b/piqueserver/scripts/demolitionman.py @@ -1,9 +1,12 @@ """ -Demolition man script. -Copyright (c) 2013 learn_more -See the file license.txt or http://opensource.org/licenses/MIT for copying permission. - Restocks the user when reloading / throwing a nade. + +Commands +^^^^^^^^ + +* ``/toggledemo`` + +.. codeauthor:: learn_more (MIT LICENSE) """ from piqueserver.commands import command, admin diff --git a/piqueserver/scripts/dirtnade.py b/piqueserver/scripts/dirtnade.py index fe3b507c5..cd32a13fa 100644 --- a/piqueserver/scripts/dirtnade.py +++ b/piqueserver/scripts/dirtnade.py @@ -1,7 +1,7 @@ """ Makes grenades create blocks. -Maintainer: hompy +.. codeauthor:: hompy """ from pyspades.contained import BlockAction diff --git a/piqueserver/scripts/disco.py b/piqueserver/scripts/disco.py index ad2520572..944cbc7c4 100644 --- a/piqueserver/scripts/disco.py +++ b/piqueserver/scripts/disco.py @@ -1,7 +1,12 @@ """ Ever wanted a disco in Ace of Spades? -Maintainer: mat^2 +Commands +^^^^^^^^ + +* ``/disco`` + +.. codeauthor:: mat^2 """ from twisted.internet.task import LoopingCall diff --git a/piqueserver/scripts/flagreturn.py b/piqueserver/scripts/flagreturn.py index cbdfb7c3c..396eb08e4 100644 --- a/piqueserver/scripts/flagreturn.py +++ b/piqueserver/scripts/flagreturn.py @@ -1,8 +1,7 @@ """ Makes the flag returnable in Quake-like fashion. -Maintainer: mat^2 -fixed by learn_more +.. codeauthor:: mat^2 & learn_more """ from pyspades.collision import vector_collision diff --git a/piqueserver/scripts/geoip.py b/piqueserver/scripts/geoip.py index c92ec774f..33730ffda 100644 --- a/piqueserver/scripts/geoip.py +++ b/piqueserver/scripts/geoip.py @@ -1,3 +1,16 @@ +""" +Gets a player's location info using a geoip database. + +.. note:: + This script is dependant on `pygeoip` package and `piqueserver --update-geoip` needs to be executed after installing the package. + +Commands +^^^^^^^^ +* ``/from `` + +.. codeauthor:: ? +""" + import os from piqueserver.commands import command, get_player from piqueserver.config import config diff --git a/piqueserver/scripts/map_extensions.py b/piqueserver/scripts/map_extensions.py index 13e7ccb0d..fb0477fa4 100644 --- a/piqueserver/scripts/map_extensions.py +++ b/piqueserver/scripts/map_extensions.py @@ -1,7 +1,7 @@ """ -Extensions to the map metadata (e.g. water damage). +Provides extensions to the map metadata (e.g. water damage). -Maintainer: ? +.. codeauthor:: ? """ diff --git a/piqueserver/scripts/markers.py b/piqueserver/scripts/markers.py index 5892c44ac..48dfd8234 100644 --- a/piqueserver/scripts/markers.py +++ b/piqueserver/scripts/markers.py @@ -22,7 +22,13 @@ Any functionality can be disabled switching off SHADOW_INTEL, REVEAL_ENEMIES, VV_ENABLED and CHAT_MARKERS below. -Maintainer: hompy +Commands +^^^^^^^^ +* ``/clear`` +* ``/togglemarkers`` +* ``/markers`` + +.. codeauthor:: hompy """ import csv diff --git a/piqueserver/scripts/match.py b/piqueserver/scripts/match.py index 6e5abcfde..d45858b76 100644 --- a/piqueserver/scripts/match.py +++ b/piqueserver/scripts/match.py @@ -2,7 +2,16 @@ Match script, useful for public matches. Features verbose announcements on IRC and a custom timer. -Maintainer: mat^2 +Commands +^^^^^^^^ + +* ``/timer`` +* ``/stoptimer`` +* ``/startrecord`` +* ``/stoprecord`` +* ``/saverecord`` + +.. codeauthor: mat^2 """ import os diff --git a/piqueserver/scripts/medkit.py b/piqueserver/scripts/medkit.py index 80f276dfd..712c4d65b 100644 --- a/piqueserver/scripts/medkit.py +++ b/piqueserver/scripts/medkit.py @@ -1,8 +1,21 @@ """ Gives a specified amount of medkits on spawn -Author: Booboorocks998 -Maintainer: mat^2 +Commands +^^^^^^^^ + +* ``/medkit or /m`` + +Options +^^^^^^^ + +.. code-block:: guess + + [medkit] + medkits = 1 # no. of medkits + medkit_heal_amount = 40 # how much hp. it gives + +.. codeauthor:: Booboorocks998 & mat^2 """ from piqueserver.commands import command diff --git a/piqueserver/scripts/memcheck.py b/piqueserver/scripts/memcheck.py index 2b24e013c..c4e3599be 100644 --- a/piqueserver/scripts/memcheck.py +++ b/piqueserver/scripts/memcheck.py @@ -2,7 +2,7 @@ Runs the garbage collector at a given interval and displays any uncollected garbage found. -Maintainer: mat^2 +.. codeauthor:: mat^2 """ from twisted.internet import reactor diff --git a/piqueserver/scripts/minefield.py b/piqueserver/scripts/minefield.py index 31a1b85aa..51a6224bb 100644 --- a/piqueserver/scripts/minefield.py +++ b/piqueserver/scripts/minefield.py @@ -1,13 +1,13 @@ """ Minefield map extension. -Copyright (c) 2013 learn_more -See the file license.txt or http://opensource.org/licenses/MIT for copying -permission. Allows mappers to specify the map bounds, outside of which players will trip mines. Breaking blocks (when standing close to the field) also triggers a mine. +.. note:: + This script conflicts with `smartnade` script. + example extension from mapname.txt: >>> extensions = { @@ -30,10 +30,7 @@ ... ] ... } -Support thread: http://buildandshoot.com/viewtopic.php?f=19&t=8089 -Script location: https://github.com/learn-more/pysnip/blob/master/scripts/minefield.py - -Warning: conflicts with `smartnade` script. +.. codeauthor:: learn_more (MIT LICENSE) """ # todo: reset intel in minefield diff --git a/piqueserver/scripts/nointelonwalls.py b/piqueserver/scripts/nointelonwalls.py index cba3d28af..ea797ee1f 100644 --- a/piqueserver/scripts/nointelonwalls.py +++ b/piqueserver/scripts/nointelonwalls.py @@ -1,8 +1,9 @@ """ -nointelonwalls.py - prevents taking intel through walls -by kmsi(kmsiapps@gmail.com) -inspired by nospadingwalls.py & omgnograbbingthroughwallsanymore.py +Prevents taking intel through walls + Version 2(2017.12.25) + +.. codeauthor:: kmsi """ diff --git a/piqueserver/scripts/paint.py b/piqueserver/scripts/paint.py index c89a18d17..b758530ac 100644 --- a/piqueserver/scripts/paint.py +++ b/piqueserver/scripts/paint.py @@ -1,11 +1,14 @@ """ Lets you change the color of the block you are looking at. -/paint [player] enables painting mode for the player. - With block tool selected, pick a color, then hold down sneak key ( by default) to paint. -Maintainer: hompy +Commands +^^^^^^^^ + +* ``/paint `` enables painting mode for that player. + +.. codeauthor:: hompy """ from pyspades.contained import BlockAction diff --git a/piqueserver/scripts/passreload.py b/piqueserver/scripts/passreload.py index 58bc523ca..50913f716 100644 --- a/piqueserver/scripts/passreload.py +++ b/piqueserver/scripts/passreload.py @@ -1,5 +1,13 @@ -# passreload.py -# written by Danke +""" +Allows reloading config on the fly + +Commands +^^^^^^^^ + +* ``/reloadconfig`` + +.. codeauthor:: Danke +""" import json import os.path diff --git a/piqueserver/scripts/protect.py b/piqueserver/scripts/protect.py index 212b67d4f..1f5da0130 100644 --- a/piqueserver/scripts/protect.py +++ b/piqueserver/scripts/protect.py @@ -1,7 +1,7 @@ """ Protects areas against block destroying/building. -Maintainer: hompy +.. codeauthor:: hompy """ from piqueserver.commands import command, admin diff --git a/piqueserver/scripts/rampage.py b/piqueserver/scripts/rampage.py index 8c3911225..08c0662ff 100644 --- a/piqueserver/scripts/rampage.py +++ b/piqueserver/scripts/rampage.py @@ -8,7 +8,7 @@ Intended for use in frantic last team standing or free for all matches. -Maintainer: hompy +.. codeauthor:: hompy """ from collections import deque diff --git a/piqueserver/scripts/rangedamage.py b/piqueserver/scripts/rangedamage.py index 862af463c..9c8e0f945 100644 --- a/piqueserver/scripts/rangedamage.py +++ b/piqueserver/scripts/rangedamage.py @@ -1,7 +1,24 @@ """ Changes the damage values depending on distance. -Maintainer: ? +Options +^^^^^^^ + +.. code-block:: guess + + [rangedamange.rifle] + pct_per_block = 0 # percentage per block? + multiplier = 1 + + [rangedamange.smg] + pct_per_block = 0 + multiplier = 1 + + [rangedamange.shotgun] + pct_per_block = 0 + multiplier = 1 + +.. codeauthor:: ? """ from pyspades.constants import (SHOTGUN_WEAPON, SMG_WEAPON, RIFLE_WEAPON) diff --git a/piqueserver/scripts/rapid.py b/piqueserver/scripts/rapid.py index 6fe38a02e..0d4f99d4e 100644 --- a/piqueserver/scripts/rapid.py +++ b/piqueserver/scripts/rapid.py @@ -10,7 +10,7 @@ Set ALWAYS_RAPID to TRUE to automatically get rapid when you login. -Mantainer: hompy +.. codeauthor:: hompy """ from twisted.internet.reactor import callLater diff --git a/piqueserver/scripts/ratio.py b/piqueserver/scripts/ratio.py index ff482855a..92fc6cd92 100644 --- a/piqueserver/scripts/ratio.py +++ b/piqueserver/scripts/ratio.py @@ -1,8 +1,15 @@ """ -K/D ratio script. +Shows K/D ratio -Author: TheGrandmaster -Maintainer: mat^2 +.. note:: + "ratio" must be AFTER "votekick" in the config script list + +Commands +^^^^^^^^ + +* ``/ratio `` + +.. codeauthor:: TheGrandmaster & mat^2 """ from piqueserver.commands import command, get_player diff --git a/piqueserver/scripts/rollback.py b/piqueserver/scripts/rollback.py index 058be7448..ea2c16365 100644 --- a/piqueserver/scripts/rollback.py +++ b/piqueserver/scripts/rollback.py @@ -1,7 +1,22 @@ """ -Progressively roll backs map to their original state (or to another map). +Rollback rolls back the map to it's original state by placing and removing +changed blocks. This takes ages. Use with care. -Maintainer: hompy +Commands +^^^^^^^^ +* ``/rollmap`` +* ``/rollback`` +* ``/rollbackcancel`` + +Options +^^^^^^^ + +.. code-block:: guess + + [rollback] + rollback_on_game_end = false + +.. codeauthor:: hompy """ import os diff --git a/piqueserver/scripts/runningman.py b/piqueserver/scripts/runningman.py index c45cf281b..6215005fd 100644 --- a/piqueserver/scripts/runningman.py +++ b/piqueserver/scripts/runningman.py @@ -8,7 +8,7 @@ May not work well with squads. -Maintainer: hompy +.. codeauthor:: hompy """ from random import choice diff --git a/piqueserver/scripts/savemap.py b/piqueserver/scripts/savemap.py index 9e1c6e364..3822a640f 100644 --- a/piqueserver/scripts/savemap.py +++ b/piqueserver/scripts/savemap.py @@ -1,7 +1,15 @@ """ Saves current map on shutdown (and optionally loads it again on startup) -Maintainer: mat^2 +Options +^^^^^^^ + +.. code-block:: guess + + [savemap] + load_saved_map = false + +.. codeauthor:: mat^2 """ import os diff --git a/piqueserver/scripts/smartnade.py b/piqueserver/scripts/smartnade.py index dec7baa29..e3091d71a 100644 --- a/piqueserver/scripts/smartnade.py +++ b/piqueserver/scripts/smartnade.py @@ -1,8 +1,11 @@ -''' +""" Smartnade script -Warning: conflicts with `minefield` script. -''' +.. note:: + This script conflicts with `minefield` script. + +.. codeauthor:: ? +""" SMARTNADE_DELAY = 0.5 diff --git a/piqueserver/scripts/spadenadefix.py b/piqueserver/scripts/spadenadefix.py index 57de92d4a..ae3194b27 100644 --- a/piqueserver/scripts/spadenadefix.py +++ b/piqueserver/scripts/spadenadefix.py @@ -1,7 +1,9 @@ """ -spadenadefix.py - blocks spade-nade bug -by kmsi(kmsiapps@gmail.com) +Prevents spade-nade bug + version 2(2017.12.23) + +.. codeauthor:: kmsi """ from pyspades.constants import SPADE_TOOL diff --git a/piqueserver/scripts/spawn_protect.py b/piqueserver/scripts/spawn_protect.py index 4ca12e4b5..410b02c6f 100644 --- a/piqueserver/scripts/spawn_protect.py +++ b/piqueserver/scripts/spawn_protect.py @@ -1,8 +1,15 @@ """ Protects spawned players for a specified amount of seconds. -Maintainer: ? -Fixed error by kmsi(kmsiapps@gmail.com) : replaced player to hit_player +Options +^^^^^^^ + +.. code-block:: guess + + [spawn_protect] + protection_time = 3 # in seconds + +.. codeauthor:: ? & kmsi """ from pyspades.common import prettify_timespan diff --git a/piqueserver/scripts/spectatorcontrol.py b/piqueserver/scripts/spectatorcontrol.py index ed27d7490..0364317f5 100644 --- a/piqueserver/scripts/spectatorcontrol.py +++ b/piqueserver/scripts/spectatorcontrol.py @@ -1,33 +1,35 @@ -# Script by Tocksman made for Goon Haven -# Short bit of documentation: -# -# This script will hopefully give server owners some control over what -# spectators do on there server. As of now since the release of v0.75, -# Goon Haven has had issues with spectators idling and using global chat -# to send information to a team so that they may know enemy positions -# or what the enemy is doing, etc. This script can block spectator chat -# as well as kick spectators after so much time as passed. -# -# Add these lines to your config: -# spectator_control.no_chat - This determines whether spectators can chat or not -# in your server. True disables chat. [True/False] -# spectator_control.kick - This determines whether spectators will be kicked after -# remaining for so long. True activates this. [True/False] -# spectator_control.kick_time - How long a spectator may remain before he is kicked. -# Time is in seconds. Note that setting time to 0 -# will cause the script to deactivate or malfunction. -# -# Additionally, server owners who also give out "guard" or "mini-mod" -# positions can add the right "specpower" to the group rights in commands.py -# to have the guards/minimods be immune to the spectator kick and chat -# restrictions. -# -# -# Oh, and admins are also automatically immune to spectator kick and chat -# restrictions. -# -# Hope you enjoy! -# Tocksman +""" +Script by Tocksman made for Goon Haven +Short bit of documentation: + +This script will hopefully give server owners some control over what +spectators do on there server. As of now since the release of v0.75, +Goon Haven has had issues with spectators idling and using global chat +to send information to a team so that they may know enemy positions +or what the enemy is doing, etc. This script can block spectator chat +as well as kick spectators after so much time as passed. + +Add these lines to your config: +spectator_control.no_chat - This determines whether spectators can chat or not + in your server. True disables chat. [True/False] +spectator_control.kick - This determines whether spectators will be kicked after + remaining for so long. True activates this. [True/False] +spectator_control.kick_time - How long a spectator may remain before he is kicked. + Time is in seconds. Note that setting time to 0 + will cause the script to deactivate or malfunction. + +Additionally, server owners who also give out "guard" or "mini-mod" +positions can add the right "specpower" to the group rights in commands.py +to have the guards/minimods be immune to the spectator kick and chat +restrictions. + + +Oh, and admins are also automatically immune to spectator kick and chat +restrictions. + +Hope you enjoy! +Tocksman +""" from math import ceil, floor from twisted.internet import reactor diff --git a/piqueserver/scripts/squad.py b/piqueserver/scripts/squad.py index ccb961ad0..18552fd82 100644 --- a/piqueserver/scripts/squad.py +++ b/piqueserver/scripts/squad.py @@ -1,7 +1,22 @@ """ BF-like squad system. -Maintainer: Triplefox +Commands +^^^^^^^^ + +* ``/squad `` to join a squad +* ``/follow `` to spawn near a specific player + +Options +^^^^^^^ + +.. code-block:: guess + + [squad] + respawn_time = 10 # in seconds + auto_squad = true + +.. codeauthor:: Triplefox """ import random diff --git a/piqueserver/scripts/strongblock.py b/piqueserver/scripts/strongblock.py index 3097febd0..391864c55 100644 --- a/piqueserver/scripts/strongblock.py +++ b/piqueserver/scripts/strongblock.py @@ -4,7 +4,7 @@ * You can remove your own blocks as if they weren't strong. * Dirt-colored or buried blocks (those that turn into dirt) become normal blocks. -Maintainer: hompy +.. codeauthor:: hompy """ from collections import namedtuple diff --git a/piqueserver/scripts/timedmute.py b/piqueserver/scripts/timedmute.py index 5c9102290..3fa1ef05d 100644 --- a/piqueserver/scripts/timedmute.py +++ b/piqueserver/scripts/timedmute.py @@ -1,6 +1,16 @@ -# Timed mute: !tm -# default time 5 minutes, default reason None -# by topologist June 30th 2012 +""" +Allows muting players for a set amount of time. + +Commands +^^^^^^^^ + +* ``/tm `` + +.. note:: + Default time 5 minutes, default reason None + +.. codeauthor: topologist +""" from piqueserver.scheduler import Scheduler from piqueserver.commands import command, get_player, join_arguments diff --git a/piqueserver/scripts/trusted.py b/piqueserver/scripts/trusted.py index 96819884f..732ded17b 100644 --- a/piqueserver/scripts/trusted.py +++ b/piqueserver/scripts/trusted.py @@ -2,7 +2,12 @@ Adds the ability to 'trust' certain players, i.e. they cannot be votekicked or rubberbanded. -Maintainer: mat^2 / hompy +Commands +^^^^^^^^ + +* ``/trust `` + +.. codeauthor:: mat^2 & hompy """ from piqueserver.commands import command, admin, get_player diff --git a/piqueserver/scripts/votekick.py b/piqueserver/scripts/votekick.py index 2979200f7..b3cc8cd31 100644 --- a/piqueserver/scripts/votekick.py +++ b/piqueserver/scripts/votekick.py @@ -1,21 +1,31 @@ -# maintained by triplefox +""" +Allows users to start votekicks -# Copyright (c) James Hofmann 2012. +Commands +^^^^^^^^ -# This file is part of pyspades. +* ``/votekick `` +* ``/y`` +* ``/togglevotekick or /tvk`` +* ``/cancel`` -# pyspades is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +Options +^^^^^^^ -# pyspades is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +.. code-block:: guess -# You should have received a copy of the GNU General Public License -# along with pyspades. If not, see . + [votekick] + # percentage of total number of players in the server required to vote to + # successfully votekick a player + percentage = 35 + + # duration in minutes that votekicked player will be banned for + ban_duration = 30 + + public_votes = true + +.. codeauthor:: James Hofmann a.k.a triplefox +""" from twisted.internet.reactor import seconds diff --git a/piqueserver/scripts/votemap.py b/piqueserver/scripts/votemap.py index cd5d88441..4beda5d9c 100644 --- a/piqueserver/scripts/votemap.py +++ b/piqueserver/scripts/votemap.py @@ -1,19 +1,19 @@ -# Copyright (c) James Hofmann 2012. +""" +Allows players to vote for maps. -# This file is part of pyspades. +.. code-block:: guess -# pyspades is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. + [votemap] + public_votes = true + extension_time = 15 + player_driven = false + autoschedule = false + time = 120 + percentage = 80 -# pyspades is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +.. codeauthor:: James Hofmann a.k.a triplefox (GPL LICENSE) +""" -# You should have received a copy of the GNU General Public License -# along with pyspades. If not, see . import random from twisted.internet import reactor diff --git a/piqueserver/scripts/welcome.py b/piqueserver/scripts/welcome.py index c2ab2cb39..ef413ab99 100644 --- a/piqueserver/scripts/welcome.py +++ b/piqueserver/scripts/welcome.py @@ -1,7 +1,15 @@ """ Greets specified people entering with messages -Maintainer: mat^2 +Options +^^^^^^^ + +.. code-block:: guess + + [welcome] + welcomes = { nota = "Hi notafile", feik = "Hi feik" } + +.. codeauthor: mat^2 """ from piqueserver.config import config diff --git a/piqueserver/scripts/zoc.py b/piqueserver/scripts/zoc.py index 8e82ac0c4..b8d8639e2 100644 --- a/piqueserver/scripts/zoc.py +++ b/piqueserver/scripts/zoc.py @@ -2,7 +2,21 @@ Zones of control: Dropped intel and tents exert influence over nearby area, restricting player ability to destroy. -Maintainer: ? +Options +^^^^^^^ + +.. code-block:: guess + + [zoc] + radius = 32 + attack_distance = 64 + block_undo = 10 + block_cost = 5 + points_per_tick = 1 + point_cap = 30 + grenade_cost = 30 + +.. codeauthor: ? """ from collections import deque