Skip to content

Commit

Permalink
Merge branch 'release-1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
urthub committed Feb 10, 2015
2 parents 51e89c7 + 51b4fc0 commit 8c4b36e
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 26 deletions.
1 change: 1 addition & 0 deletions conf/settings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 15 additions & 1 deletion doc/Spunky Bot Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -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
Expand Down
Binary file modified lib/GeoIP.dat
Binary file not shown.
18 changes: 13 additions & 5 deletions lib/rcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
This program is released under the MIT License.
"""

__version__ = '1.0.7'
__version__ = '1.0.8'


### IMPORTS
Expand Down Expand Up @@ -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):
"""
Expand All @@ -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):
Expand Down
Loading

0 comments on commit 8c4b36e

Please sign in to comment.