Skip to content
Permalink
Browse files

Merge branch 'release-1.4'

  • Loading branch information...
urthub
urthub committed Feb 10, 2015
2 parents 51e89c7 + 51b4fc0 commit 8c4b36ebe3e03a4233b70a4d3389a7ae613c62e6
Showing with 137 additions and 26 deletions.
  1. +1 −0 conf/settings.conf
  2. +15 −1 doc/Spunky Bot Commands.md
  3. BIN lib/GeoIP.dat
  4. +13 −5 lib/rcon.py
  5. +108 −20 spunky.py
@@ -18,6 +18,7 @@ show_first_kill = 1 ; Enable (1) or disable (0)
show_hit_stats_respawn = 1 ; Enable (1) or disable (0) displaying hit statistics during respawn
autobalancer = 0 ; Enable (1) or disable (0) autobalancing of teams at the end of the round/match
allow_teams_round_end = 0 ; Enable (1) or disable (0) allowing command !teams only at end of the round/match
spam_bomb_planted = 1 ; Enable (1) or disable (0) spamming the message "Bomb has been planted" in global chat
verbose = 0 ; Enable (1) or disable (0) debug messages

[lowgrav]
@@ -27,13 +27,18 @@
- Usage: `!ctfstats`
- **freezestats** - display freeze/thawout stats
- Usage: `!freezestats`
- **hestats** - display HE grenade kill stats
- Usage: `!hestats`
- **teams** - balance teams
- Usage: `!teams`
- **time** - display the current server time
- Usage: `!time`


### User [1]

- **regtest** - regtest - display current user status
- Usage: `!regtest`
- **xlrstats** - display full player statistics
- Usage: `!xlrstats [<name>]`
- **xlrtopstats** - display the top players
@@ -43,6 +48,8 @@

### Moderator [20]

- **admintest** - display current admin status
- Usage: `!admintest`
- **country** - get the country of the player
- Usage: `!country <name>`
- **leveltest** - get the admin level for a given player or myself
@@ -69,6 +76,10 @@
- **warnremove** - remove a users last warning
- Usage: `!warnremove <name>`
- Short: `!wr <name>`
- **warns** - list the warnings
- Usage: `!warns`
- **warntest** - test a warning
- Usage: `!warntest <warning>`


### Admin [40]
@@ -80,8 +91,11 @@
- Short: `!alias <name>`
- **bigtext** - display big message on screen
- Usage: `!bigtext <text>`
- **say** - say a message to all players
- **say** - say a message to all players (allow spectator to say a message to players in-game)
- Usage: `!say <text>`
- Short: `!!<text>`
- **find** - display the slot number of the player
- Usage: `!find <name>`
- **force** - force a player to the given team
- Usage: `!force <name> <blue/red/spec> [<lock>]`
- **nuke** - nuke a player
BIN +6.35 KB (100%) lib/GeoIP.dat
Binary file not shown.
@@ -6,7 +6,7 @@
This program is released under the MIT License.
"""

__version__ = '1.0.7'
__version__ = '1.0.8'


### IMPORTS
@@ -91,7 +91,12 @@ def get_cvar(self, value):
"""
if self.live:
with self.rcon_lock:
return self.quake.rcon(value)[1].split(':')[1].split('^7')[0].lstrip('"')
try:
ret_val = self.quake.rcon(value)[1].split(':')[1].split('^7')[0].lstrip('"')
except IndexError:
ret_val = None
time.sleep(.33)
return ret_val

def get_mapcycle_path(self):
"""
@@ -105,9 +110,12 @@ def get_mapcycle_path(self):
fs_game = self.get_cvar('fs_game')
# get file name of mapcycle.txt
mapcycle_file = self.get_cvar('g_mapcycle')
# set full path of mapcycle.txt
mc_home_path = os.path.join(fs_homepath, fs_game, mapcycle_file)
mc_base_path = os.path.join(fs_basepath, fs_game, mapcycle_file)
try:
# set full path of mapcycle.txt
mc_home_path = os.path.join(fs_homepath, fs_game, mapcycle_file)
mc_base_path = os.path.join(fs_basepath, fs_game, mapcycle_file)
except TypeError:
raise Exception('Server did not respond to mapcycle path request, please restart the Bot')
if os.path.isfile(mc_home_path):
mapcycle_path = mc_home_path
elif os.path.isfile(mc_base_path):
Oops, something went wrong.

0 comments on commit 8c4b36e

Please sign in to comment.
You can’t perform that action at this time.