Skip to content

Commit

Permalink
Merge branch 'release-1.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkress committed Aug 6, 2018
2 parents b2970f6 + 4416846 commit 5999263
Show file tree
Hide file tree
Showing 15 changed files with 217 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -9,7 +9,10 @@ spunkybot.egg-info
*.tar.gz
*.zip
*.asc
*.sig
*.deb
SHASUMS
MD5SUMS

# SVN
.svn/
Expand Down
67 changes: 65 additions & 2 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. This projec

## [Unreleased]

## [1.11.0] - 2018-08-06
### Added
* Added command `!banall <pattern>` to ban all players matching pattern
* Added command `!rebuild` to sync up all available maps
* Added option to kill spawnkillers instantly
* Added support for Urban Terror 4.3.4

### Changed
* Command `!maps` is showing the total number of available maps
* Exclude bots from autokick for team kills to avoid unbalanced teams
* Exclude bots from autokick of low score players to avoid unbalanced teams
* Updated schedule library
* Improved some feedback messages

### Fixed
* Fixed #55: Make bots immune from spawnkill autokick
* Fixed #56: Command `!maps` does not show all maps
* Fixed #57: Fix year 2038 problem on 32-bit systems
* Fixed version check, issued by string compare
* Various minor bug fixes


## [1.10.0] - 2018-05-31
### Added
* Added option for automatic expiration of warnings
Expand Down Expand Up @@ -106,7 +128,7 @@ All notable changes to this project will be documented in this file. This projec
* Various minor bug fixes


## [1.8.0] - 2017-10-23
## [1.8.0] - 2016-10-23
### Added
* Added support of bot commands in rotating messages: `@admins`, `@nextmap` and `@time`
* Added command `!rain <on/off>` to enable/disable raindrops in maps
Expand All @@ -129,7 +151,48 @@ All notable changes to this project will be documented in this file. This projec
* Various minor bug fixes


[Unreleased]: https://github.com/SpunkyBot/spunkybot/compare/1.10.0...HEAD
## [1.7.0] - 2016-10-02
### Added
* Added full support for Urban Terror release 4.3
* Added command `!locate` to display geolocation info of a player
* Added first knife kill message
* Added more warning reasons

### Changed
* Improved some feedback messages
* Imported latest GeoIP database


## [1.6.0] - 2016-04-03
### Added
* Added option to display headshot hit series
* Added option to display nade kill series
* Added option to display knife kill series
* Added command `!knife` to display number of knife kills
* Added most knife kills to Awards output
* Added output of message 'added to group'
* Added output of capture count as server msg in CTF mode
* Added PyPi support

### Changed
* Consolidated warnings in one list
* Improved error message for missing games.log file
* Imported latest GeoIP database
* Performance improvements

### Fixed
* Fixed #31: tell command suppports all player numbers
* Fixed chat message issue with single "!" content
* Fixed possible loop if games.log file is empty
* Fixed missing reason in database for command `!tb`
* Fixed missing text color setup
* Various minor bug fixes


[Unreleased]: https://github.com/SpunkyBot/spunkybot/compare/1.11.0...develop
[1.11.0]: https://github.com/SpunkyBot/spunkybot/compare/1.10.0...1.11.0
[1.10.0]: https://github.com/SpunkyBot/spunkybot/compare/1.9.0...1.10.0
[1.9.0]: https://github.com/SpunkyBot/spunkybot/compare/1.8.0...1.9.0
[1.8.0]: https://github.com/SpunkyBot/spunkybot/compare/1.7.0...1.8.0
[1.7.0]: https://github.com/SpunkyBot/spunkybot/compare/1.6.0...1.7.0
[1.6.0]: https://github.com/SpunkyBot/spunkybot/compare/1.5.0...1.6.0
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,7 +1,7 @@
include README.md LICENSE
include lib/GeoIP.dat
include doc/Commands.md
recursive-include conf *.conf
recursive-include doc *.md
include debian-startscript
include systemd-spunkybot.service
exclude MANIFEST.in
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -9,7 +9,7 @@ The code of Spunky Bot is inspired by the eb2k9 bot by Shawn Haggard, which was

[![Build Status](https://travis-ci.org/SpunkyBot/spunkybot.png?branch=master)](https://travis-ci.org/SpunkyBot/spunkybot)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SpunkyBot/spunkybot/blob/master/LICENSE)
[![Version](https://img.shields.io/badge/version-1.10.0-orange.svg)](https://github.com/SpunkyBot/spunkybot/releases)
[![Version](https://img.shields.io/badge/version-1.11.0-orange.svg)](https://github.com/SpunkyBot/spunkybot/releases)
[![PyPI version](https://img.shields.io/pypi/v/spunkybot.svg)](https://pypi.python.org/pypi/spunkybot)
[![Python version](https://img.shields.io/badge/python-2.6,%202.7-yellow.svg)](https://pypi.python.org/pypi/spunkybot)
[![Code Health](https://landscape.io/github/SpunkyBot/spunkybot/master/landscape.svg)](https://landscape.io/github/SpunkyBot/spunkybot/master)
Expand All @@ -34,7 +34,7 @@ If you want to know more, this is a list of selected starting points:


## Environment
- Urban Terror 4.1.1 / 4.2.023 / 4.3.3
- Urban Terror 4.1.1 / 4.2.023 / 4.3.4
- Python 2.6 / 2.7
- SQLite 3 database
- Cross-platform (tested on Debian 6 / 7 / 8 / 9, Ubuntu 12 / 14 / 16 / 18, CentOS 6 / 7, macOS 10.13, Windows 7 / 10)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.10.0
1.11.0
1 change: 1 addition & 0 deletions conf/settings.conf
Expand Up @@ -18,6 +18,7 @@ kick_spec_full_server = 10 ; Warn / kick spectator when
teamkill_autokick = 1 ; Enable (1) or disable (0) autokick for team killing. Regulars or higher levels will not get kicked. Default: 1
noob_autokick = 0 ; Enable (1) or disable (0) autokick of players with low score. Regulars or higher levels will not get kicked. Default: 0
spawnkill_autokick = 0 ; Enable (1) or disable (0) autokick for spawn killing. Admins or higher levels will not get kicked. Default: 0
instant_kill_spawnkiller = 0 ; Enable (1) or disable (0) instant kill for player doing spawn kill. Admins or higher levels will not get killed. Default: 0
bad_words_autokick = 0 ; Enable (1) or disable (0) autokick for using bad words. Admins or higher levels will not get kicked. Default: 0
show_country_on_connect = 1 ; Enable (1) or disable (0) displaying message "Player connected from...". Default: 1
show_first_kill = 1 ; Enable (1) or disable (0) displaying message "firstblood" / "first nade kill". Default: 1
Expand Down
2 changes: 1 addition & 1 deletion debian/control
@@ -1,5 +1,5 @@
Package: spunkybot
Version: 1.10.0
Version: 1.11.0
Section: utils
Priority: optional
Architecture: all
Expand Down
5 changes: 5 additions & 0 deletions doc/Commands.md
Expand Up @@ -185,6 +185,9 @@

- **addbots** - add bots to the game
- Usage: `!addbots`
- **banall** - ban all players matching pattern
- Usage: `!banall <pattern> [<reason>]`
- Short: `!ball`
- **banlist** - display the last active 10 bans
- Usage: `!banlist`
- **bots** - enables or disables bot support
Expand Down Expand Up @@ -229,6 +232,8 @@
- **putgroup** - add a client to a group
- Usage: `!putgroup <name|id> <group>`
- Available Groups: _user_, _regular_, _mod_, _admin_, _fulladmin_
- **rebuild** - sync up all available maps
- Usage: `!rebuild`
- **setnextmap** - set the next map
- Usage: `!setnextmap <ut4_name>`
- **swapteams** - swap the current teams
Expand Down
11 changes: 10 additions & 1 deletion doc/commands.html
Expand Up @@ -333,6 +333,11 @@ <h3>Senior Admin [80]</h3>
<li>Usage: <code>!addbots</code></li>
</ul>
</li>
<li><strong>banall</strong> - ban all players matching pattern<ul>
<li>Usage: <code>!banall &lt;pattern&gt; [&lt;reason&gt;]</code></li>
<li>Short: <code>!ball</code></li>
</ul>
</li>
<li><strong>banlist</strong> - display the last active 10 bans<ul>
<li>Usage: <code>!banlist</code></li>
</ul>
Expand Down Expand Up @@ -413,6 +418,10 @@ <h3>Senior Admin [80]</h3>
<li>Available Groups: <em>user</em>, <em>regular</em>, <em>mod</em>, <em>admin</em>, <em>fulladmin</em></li>
</ul>
</li>
<li><strong>rebuild</strong> - sync up all available maps<ul>
<li>Usage: <code>!rebuild</code></li>
</ul>
</li>
<li><strong>setnextmap</strong> - set the next map<ul>
<li>Usage: <code>!setnextmap &lt;ut4_name&gt;</code></li>
</ul>
Expand Down Expand Up @@ -493,4 +502,4 @@ <h3>Head Admin [100]</h3>
</ul>
</div>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion lib/MIT_LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2017 Spunky Bot contributors
Copyright (c) 2013-2018 Spunky Bot contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
67 changes: 23 additions & 44 deletions lib/schedule.py
Expand Up @@ -32,9 +32,9 @@
>>> schedule.run_pending()
>>> time.sleep(1)
[1] http://adam.heroku.com/past/2010/4/13/rethinking_cron/
[2] https://github.com/tomykaira/clockwork
[3] http://adam.heroku.com/past/2010/6/30/replace_cron_with_clockwork/
[1] https://adam.herokuapp.com/past/2010/4/13/rethinking_cron/
[2] https://github.com/Rykian/clockwork
[3] https://adam.herokuapp.com/past/2010/6/30/replace_cron_with_clockwork/
"""
import collections
import datetime
Expand Down Expand Up @@ -64,11 +64,11 @@ def run_pending(self):
"""
Run all jobs that are scheduled to run.
Please note that it is *intended behavior that tick() does not
run missed jobs*. For example, if you've registered a job that
should run every minute and you only call tick() in one hour
increments then your job won't be run 60 times in between but
only once.
Please note that it is *intended behavior that run_pending()
does not run missed jobs*. For example, if you've registered a job
that should run every minute and you only call run_pending()
in one hour increments then your job won't be run 60 times in
between but only once.
"""
runnable_jobs = (job for job in self.jobs if job.should_run)
for job in sorted(runnable_jobs):
Expand Down Expand Up @@ -160,7 +160,7 @@ class Job(object):
* a quantity of `time units` defined by `interval`
A job is usually created and returned by :meth:`Scheduler.every`
method, which also defines its `interval`
method, which also defines its `interval`.
"""
def __init__(self, interval):
self.interval = interval # pause interval * unit between runs
Expand Down Expand Up @@ -439,70 +439,49 @@ def _schedule_next_run(self):


def every(interval=1):
"""
Schedule a new periodic job with the default module scheduler.
:param interval: A quantity of any given
:meth:`time unit <Job.second>`
:return: The default :obj:`Scheduler` instance
"""Calls :meth:`every <Scheduler.every>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
return default_scheduler.every(interval)


def run_pending():
"""
Run all jobs that are scheduled to run.
Please note that it is *intended behavior that run_pending()
does not run missed jobs*. For example, if you've registered a job
that should run every minute and you only call run_pending()
in one hour increments then your job won't be run 60 times in
between but only once.
"""Calls :meth:`run_pending <Scheduler.run_pending>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
default_scheduler.run_pending()


def run_all(delay_seconds=0):
"""
Run all jobs regardless if they are scheduled to run or not.
A delay of `delay` seconds is added between each job. This can help
to distribute the system load generated by the jobs more evenly over
time.
"""Calls :meth:`run_all <Scheduler.run_all>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
default_scheduler.run_all(delay_seconds=delay_seconds)


def clear(tag=None):
"""
Deletes scheduled jobs on the default scheduler marked with the
given tag, or all jobs if tag is omitted
:param tag: An identifier used to identify a subset of
jobs to delete
"""Calls :meth:`clear <Scheduler.clear>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
default_scheduler.clear(tag)


def cancel_job(job):
"""Delete a scheduled job on the default scheduler
:param job: The job to be unscheduled
"""Calls :meth:`cancel_job <Scheduler.cancel_job>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
default_scheduler.cancel_job(job)


def next_run():
"""Datetime when the next job should run.
:return: A :class:`~datetime.datetime` object
"""Calls :meth:`next_run <Scheduler.next_run>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
return default_scheduler.next_run


def idle_seconds():
"""
:return: Number of seconds until
:meth:`next_run <Scheduler.next_run>`.
"""Calls :meth:`idle_seconds <Scheduler.idle_seconds>` on the
:data:`default scheduler instance <default_scheduler>`.
"""
return default_scheduler.idle_seconds
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -10,7 +10,7 @@ license-file = LICENSE
ignore = E402, E501, E722

[sdist]
formats = gztar, zip
formats = gztar

[bdist_wheel]
python-tag = py27
10 changes: 5 additions & 5 deletions setup.py
Expand Up @@ -56,10 +56,10 @@
See the Homepage_ for usage and documentation or visit the Git Repository_
for the source code.
.. _Spunky Bot: http://spunkybot.de/
.. _Spunky Bot: https://spunkybot.de/
.. _Urban Terror: http://www.urbanterror.info/
.. _MIT: http://opensource.org/licenses/MIT
.. _Homepage: http://spunkybot.de/
.. _MIT: https://opensource.org/licenses/MIT
.. _Homepage: https://spunkybot.de/
.. _Repository: https://github.com/spunkybot/spunkybot/
"""

Expand All @@ -69,9 +69,9 @@
long_description=long_description,
author='Alexander Kress',
author_email='feedback@spunkybot.de',
url='http://spunkybot.de/',
url='https://spunkybot.de/',
keywords='Urban Terror Game Administration RCON Bot',
download_url='http://github.com/spunkybot/spunkybot/tarball/master',
download_url='https://github.com/spunkybot/spunkybot/tarball/master',
license='MIT',
install_requires=['setuptools'],
py_modules=['spunky'],
Expand Down

0 comments on commit 5999263

Please sign in to comment.