summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RehostTo.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/RehostTo.py')
-rw-r--r--module/plugins/accounts/RehostTo.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 4efe38cad..04e71c9ad 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class RehostTo(Account):
__name__ = "RehostTo"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__description__ = """Rehost.to account plugin"""
__license__ = "GPLv3"
@@ -18,25 +18,25 @@ class RehostTo(Account):
trafficleft = None
validuntil = -1
session = ""
-
+
html = req.load("http://rehost.to/api.php",
get={'cmd' : "login", 'user': user,
'pass': self.getAccountData(user)['password']})
try:
session = html.split(",")[1].split("=")[1]
-
+
html = req.load("http://rehost.to/api.php",
get={'cmd': "get_premium_credits", 'long_ses': session})
- if html.strip() == "0,0" or "ERROR" not in html:
+ if html.strip() == "0,0" or "ERROR" in html:
self.logDebug(html)
else:
traffic, valid = html.split(",")
-
+
premium = True
trafficleft = self.parseTraffic(traffic + "MB")
validuntil = float(valid)
-
+
finally:
return {'premium' : premium,
'trafficleft': trafficleft,