Skip to content
/ pyquake3 Public
forked from gak/pyquake3

A Quake 3 rcon class written in Python to programatically send commands to Quake 3 servers

Notifications You must be signed in to change notification settings

rob0r/pyquake3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

pyquake3

pyquake3 is a Python class (or module) that can query and execute rcon commands on a Quake 3 server.

Features

  • Simple interface
  • Automatic retries
  • Can access server variables
  • Can send rcon commands
  • Can collect player names, ping and frags.
  • With an rcon password, can collect player ip addresses.

Example

from pyquake3 import PyQuake3
q = PyQuake3('localhost:27960', rcon_password='hello')
q.update()
print 'The name of %s is %s, running map %s with %s player(s).' % (q.get_address(), q.vars['sv_hostname'], q.vars['mapname'], len(q.players))
for player in q.players:
    print '%s with %s frags and a %sms ping' % (player.name, player.frags, player.ping)
q.rcon_update()
for player in q.players:
    print '%s has an address of %s' % (player.name, player.address)
q.rcon('addbot sarge')

About

A Quake 3 rcon class written in Python to programatically send commands to Quake 3 servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published