Skip to content

Commit

Permalink
Initial checkin of b3-1.1.2d
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Thornton committed May 5, 2008
0 parents commit 7377186
Show file tree
Hide file tree
Showing 68 changed files with 12,589 additions and 0 deletions.
25 changes: 25 additions & 0 deletions PKG-INFO
@@ -0,0 +1,25 @@
Metadata-Version: 1.0
Name: b3
Version: 1.1.2d-r103
Summary: BigBrotherBot (B3) is a cross-platform, cross-game game administration bot. Features in-game administration of game servers, multiple user access levels, and database storage. Currently include parsers for Call of Duty (CoD) and Call of Duty 2 (CoD2)
Home-page: http://www.bigbrotherbot.com
Author: Michael Thornton (ThorN), Tim ter Laak (ttlogic)
Author-email: bigbrotherbot@gmail.com
License: GPL
Description: Big Brother Bot B3 is a complete and total server administration package for online games. B3 is designed primarily to keep your server free from the derelicts of online gaming, but offers more, much more. With the stock configuration files, B3 will will keep your server free from offensive language, and team killers alike. A completely automated and customizable warning system will warn the offending players that this type of behavior is not allowed on your server, and ultimately kick, and or ban them for a predetermined time limit.

B3 was designed to be easily ported to other online games. Currently, B3 is in production for Call of Duty and Call of Duty: United Offensive and Call of Duty 2. Since these games are based on the Quake III Arena engine, conversion to any game using the engine should be easy.

Plugins provide much of the functionality for B3. These plugins can easily be configured. An SDK will be provided to make your own plugins.

Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: System :: Logging
Classifier: Topic :: Utilities
1 change: 1 addition & 0 deletions README
@@ -0,0 +1 @@
See b3/docs/README.txt
25 changes: 25 additions & 0 deletions b3.egg-info/PKG-INFO
@@ -0,0 +1,25 @@
Metadata-Version: 1.0
Name: b3
Version: 1.1.2d-r103
Summary: BigBrotherBot (B3) is a cross-platform, cross-game game administration bot. Features in-game administration of game servers, multiple user access levels, and database storage. Currently include parsers for Call of Duty (CoD) and Call of Duty 2 (CoD2)
Home-page: http://www.bigbrotherbot.com
Author: Michael Thornton (ThorN), Tim ter Laak (ttlogic)
Author-email: bigbrotherbot@gmail.com
License: GPL
Description: Big Brother Bot B3 is a complete and total server administration package for online games. B3 is designed primarily to keep your server free from the derelicts of online gaming, but offers more, much more. With the stock configuration files, B3 will will keep your server free from offensive language, and team killers alike. A completely automated and customizable warning system will warn the offending players that this type of behavior is not allowed on your server, and ultimately kick, and or ban them for a predetermined time limit.

B3 was designed to be easily ported to other online games. Currently, B3 is in production for Call of Duty and Call of Duty: United Offensive and Call of Duty 2. Since these games are based on the Quake III Arena engine, conversion to any game using the engine should be easy.

Plugins provide much of the functionality for B3. These plugins can easily be configured. An SDK will be provided to make your own plugins.

Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: System :: Logging
Classifier: Topic :: Utilities
3 changes: 3 additions & 0 deletions b3.egg-info/entry_points.txt
@@ -0,0 +1,3 @@
[console_scripts]
b3_run = b3.run:main

7 changes: 7 additions & 0 deletions b3.egg-info/requires.txt
@@ -0,0 +1,7 @@


[elementtree]
elementtree

[mysql]
MySQL-python
1 change: 1 addition & 0 deletions b3.egg-info/top_level.txt
@@ -0,0 +1 @@
b3
99 changes: 99 additions & 0 deletions b3/__init__.py
@@ -0,0 +1,99 @@
#
# BigBrotherBot(B3) (www.bigbrotherbot.com)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# This program 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 2 of the License, or
# (at your option) any later version.

# This program 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# $Id: __init__.py 102 2006-04-14 06:46:03Z thorn $

__author__ = 'ThorN'

import pkg_handler

__version__ = pkg_handler.version(__name__)
modulePath = pkg_handler.resource_directory(__name__)

import os, re, sys, traceback
import config

versionOs = os.name
versionId = 'v%s [%s]' % (__version__, versionOs)
version = '^8www.BigBrotherBot.com ^0(^8b3^0) ^9%s ^9(^3Shadhavar^9) ^7by ^2ThorN ^3' % versionId
sversion = re.sub(r'\^[0-9a-z]', '', version)

console = None

# some constants
TEAM_UNKNOWN = -1
TEAM_SPEC = 1
TEAM_RED = 2
TEAM_BLUE = 3

STATE_DEAD = 1
STATE_ALIVE = 2
STATE_UNKNOWN = 3

#-----------------------------------------------------------------------------------------------------------------------
def loadParser(pname):
name = 'b3.parsers.%s' % pname
mod = __import__(name)
components = name.split('.')
components.append('%sParser' % pname.title())
for comp in components[1:]:
mod = getattr(mod, comp)

return mod

#-----------------------------------------------------------------------------------------------------------------------
def getAbsolutePath(path):
"""Return an absolute path name and expand the user prefix (~)"""
if path[0:4] == '@b3/':
# releative path to the b3 module directory
path = os.path.join(modulePath, path[4:])

return os.path.normpath(os.path.expanduser(path))

def start(configFile):
configFile = getAbsolutePath(configFile)
print 'Starting %s' % sversion

if os.path.exists(configFile):
print 'Using config file %s' % configFile
conf = config.load(configFile)
else:
raise SystemExit('Could not find config file %s' % configFile)

parserType = conf.get('b3', 'parser')

if not parserType:
raise SystemExit('You must supply a parser')

parser = loadParser(parserType)

global console
console = parser(conf)

try:
console.start()
except KeyboardInterrupt:
console.shutdown()
print 'Goodbye'
return
except SystemExit, msg:
print 'Exiting: %s' % msg
raise
except Exception, msg:
print 'Error: %s\n%s' % (msg, ''.join(traceback.format_list(traceback.extract_tb(sys.exc_info()[2]))))
sys.exit(223)

0 comments on commit 7377186

Please sign in to comment.