Updated the module to 0.9.1. Changelog:
- Fixed setup.py to use correct data directory.
- Added function web_build(hotel='com', short=False). Returns the latest web_build used by the Hotel given, and if short is True, then only the four-digit build number is returned.
- Added function hotel_build(hotel='com'). Returns the latest hotel build that's displayed in the Hotel's meta tags.
- Added function phoenix_version(otaku_u, otaku_p). Requires 2 params; Otaku.cm username and password. Used to connect to the licence server to find and return the latest Phoenix build, as an integer.
These do kinda sound a little pointless to me too, but I haven't had much time to come up with better ideas. Perhaps I should create more functions that just use the database (eg. ban()), or maybe even do a web-based Housekeeping in Python. I'll see.
Still working on docs.
Oh, and because I know people are going to start bitching and claiming phoenix_version() is a keylogger or something dumb (and don't even check the source), here's the function so you can shut up before posting:
Code:
def phoenix_version(otaku_u, otaku_p):
"""Returns the latest available version of Phoenix."""
opener = urllib2.build_opener()
opener.addheaders.append(('AuthName', otaku_u))
opener.addheaders.append(('AuthPass', otaku_p))
opener.addheaders.append(('AuthBuild', '14986'))
opener.addheaders.append(('AuthServer', 'Phoenix'))
res = opener.open('http://otaku.cm/phx/licence.php?')
return int(res.headers['CurBuild'])