updating bigassmessage.py url, url params, and styles
This commit is contained in:
parent
2095e16a65
commit
97054fe666
|
@ -4,19 +4,20 @@ from util import hook, http
|
||||||
@hook.command
|
@hook.command
|
||||||
def bam(inp):
|
def bam(inp):
|
||||||
".bam [basic|magic|pepsi|jprdy] <message> -- creates a big ass message"
|
".bam [basic|magic|pepsi|jprdy] <message> -- creates a big ass message"
|
||||||
|
|
||||||
host = 'http://bigassmessage.com/'
|
host = 'http://bigassmessage.com/'
|
||||||
path = 'dsx_BAM/boe.php?'
|
path = 'BAM.php?'
|
||||||
params = {'action': 'saveMsg', 'theStyle': 'basic', 'theMessage': inp}
|
params = {'action': 'SAVE', 'theStyle': 'basic', 'theMessage': inp}
|
||||||
|
|
||||||
if ' ' in inp:
|
if ' ' in inp:
|
||||||
style, message = inp.split(None, 1)
|
style, message = inp.split(None, 1)
|
||||||
if style in ['basic', 'magic', 'pepsi', 'jprdy']:
|
if style in ['basic', 'magic', 'heart', 'krugr']:
|
||||||
params['theStyle'] = style
|
params['theStyle'] = style
|
||||||
params['theMessage'] = message
|
params['theMessage'] = message
|
||||||
|
|
||||||
response = http.get_xml(host + path, params)
|
response = http.get_xml(host + path, params)
|
||||||
status = response.xpath('//status/text()')[0]
|
status = response.xpath('//status/text()')[0]
|
||||||
|
|
||||||
if status == 'ok':
|
if status == 'ok':
|
||||||
return host + response.xpath('//msgid/text()')[0]
|
return host + response.xpath('//msgid/text()')[0]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue