|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
# Other library imports
|
|
|
|
|
from json import dumps, loads
|
|
|
|
|
|
|
|
|
|
import db
|
|
|
|
|
# Project imports
|
|
|
|
|
from settings import settings
|
|
|
|
|
import db
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GenericCommands(object):
|
|
|
|
@ -27,7 +27,19 @@ class GenericCommands(object):
|
|
|
|
|
|
|
|
|
|
class create(object):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux, asset_list, provider_list, caller):
|
|
|
|
|
def run(
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
asset_list,
|
|
|
|
|
provider_list,
|
|
|
|
|
caller,
|
|
|
|
|
):
|
|
|
|
|
"""
|
|
|
|
|
Post an ad on AgoraDesk/LBTC with the given country and currency code.
|
|
|
|
|
"""
|
|
|
|
@ -47,7 +59,9 @@ class GenericCommands(object):
|
|
|
|
|
payment_details=account_info[currency],
|
|
|
|
|
)
|
|
|
|
|
if posted["success"]:
|
|
|
|
|
msg(f"{posted['response']['data']['message']}: {posted['response']['data']['ad_id']}")
|
|
|
|
|
msg(
|
|
|
|
|
f"{posted['response']['data']['message']}: {posted['response']['data']['ad_id']}"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
msg(dumps(posted["response"]))
|
|
|
|
|
elif length == 5:
|
|
|
|
@ -70,7 +84,9 @@ class GenericCommands(object):
|
|
|
|
|
payment_details=account_info[currency],
|
|
|
|
|
)
|
|
|
|
|
if posted["success"]:
|
|
|
|
|
msg(f"{posted['response']['data']['message']}: {posted['response']['data']['ad_id']}")
|
|
|
|
|
msg(
|
|
|
|
|
f"{posted['response']['data']['message']}: {posted['response']['data']['ad_id']}"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
msg(dumps(posted["response"]))
|
|
|
|
|
|
|
|
|
@ -106,13 +122,17 @@ class GenericCommands(object):
|
|
|
|
|
return
|
|
|
|
|
for x in caller.dist_countries(filter_asset=asset):
|
|
|
|
|
if x["success"]:
|
|
|
|
|
msg(f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}")
|
|
|
|
|
msg(
|
|
|
|
|
f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
msg(dumps(x["response"]))
|
|
|
|
|
elif length == 1:
|
|
|
|
|
for x in caller.dist_countries():
|
|
|
|
|
if x["success"]:
|
|
|
|
|
msg(f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}")
|
|
|
|
|
msg(
|
|
|
|
|
f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}"
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
msg(dumps(x["response"]))
|
|
|
|
|
|
|
|
|
@ -188,7 +208,9 @@ class GenericCommands(object):
|
|
|
|
|
return
|
|
|
|
|
providers = spl[3].split(",")
|
|
|
|
|
currency = spl[2]
|
|
|
|
|
c = caller.get_all_public_ads(assets=[asset], currencies=[currency], providers=providers)
|
|
|
|
|
c = caller.get_all_public_ads(
|
|
|
|
|
assets=[asset], currencies=[currency], providers=providers
|
|
|
|
|
)
|
|
|
|
|
c.addCallback(GenericCommands.pubads.got_pubads, currency, msg)
|
|
|
|
|
|
|
|
|
|
class cheat(object):
|
|
|
|
@ -268,7 +290,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.trades.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.trades.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class ltrades(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -277,7 +301,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.trades.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.trades.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class acreate(object):
|
|
|
|
|
name = "acreate"
|
|
|
|
@ -328,7 +354,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.messages.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.messages.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lmessages(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -337,7 +365,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.messages.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.messages.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class adist(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -346,7 +376,18 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.dist.run(cmd, spl, length, authed, msg, agora, tx, ux, settings.Agora.AssetList, agora)
|
|
|
|
|
GenericCommands.dist.run(
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.Agora.AssetList,
|
|
|
|
|
agora,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class ldist(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -356,7 +397,16 @@ class IRCCommands(object):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.dist.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, settings.LocalBitcoins.AssetList, tx.lbtc
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.LocalBitcoins.AssetList,
|
|
|
|
|
tx.lbtc,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class aredist(object):
|
|
|
|
@ -366,7 +416,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.redist.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.redist.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lredist(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -375,7 +427,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.redist.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.redist.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class astripdupes(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -384,7 +438,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.stripdupes.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.stripdupes.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lstripdupes(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -393,7 +449,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.stripdupes.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.stripdupes.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class total(object):
|
|
|
|
|
name = "total"
|
|
|
|
@ -440,7 +498,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.message.run(cmd, spl, length, authed, msg, agora, tx, ux, agora.agora)
|
|
|
|
|
GenericCommands.message.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora.agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lmessage(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -449,7 +509,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.message.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc.lbtc)
|
|
|
|
|
GenericCommands.message.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class refs(object):
|
|
|
|
|
name = "refs"
|
|
|
|
@ -496,7 +558,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.release.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.release.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lrelease(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -505,7 +569,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.release.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.release.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class map(object):
|
|
|
|
|
name = "map"
|
|
|
|
@ -535,7 +601,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.nuke.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.nuke.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lnuke(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -544,7 +612,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.nuke.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.nuke.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class awallet(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -553,7 +623,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.wallet.run(cmd, spl, length, authed, msg, agora, tx, ux, True, agora.api)
|
|
|
|
|
GenericCommands.wallet.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, True, agora.api
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lwallet(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -562,7 +634,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.wallet.run(cmd, spl, length, authed, msg, agora, tx, ux, False, tx.lbtc.api)
|
|
|
|
|
GenericCommands.wallet.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, False, tx.lbtc.api
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class apubads(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -571,7 +645,18 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.pubads.run(cmd, spl, length, authed, msg, agora, tx, ux, settings.Agora.AssetList, agora)
|
|
|
|
|
GenericCommands.pubads.run(
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.Agora.AssetList,
|
|
|
|
|
agora,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lpubads(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -581,7 +666,16 @@ class IRCCommands(object):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.pubads.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, settings.LocalBitcoins.AssetList, tx.lbtc
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.LocalBitcoins.AssetList,
|
|
|
|
|
tx.lbtc,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class acheat(object):
|
|
|
|
@ -591,7 +685,18 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.cheat.run(cmd, spl, length, authed, msg, agora, tx, ux, settings.Agora.AssetList, agora)
|
|
|
|
|
GenericCommands.cheat.run(
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.Agora.AssetList,
|
|
|
|
|
agora,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lcheat(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -601,7 +706,16 @@ class IRCCommands(object):
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.cheat.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, settings.LocalBitcoins.AssetList, tx.lbtc
|
|
|
|
|
cmd,
|
|
|
|
|
spl,
|
|
|
|
|
length,
|
|
|
|
|
authed,
|
|
|
|
|
msg,
|
|
|
|
|
agora,
|
|
|
|
|
tx,
|
|
|
|
|
ux,
|
|
|
|
|
settings.LocalBitcoins.AssetList,
|
|
|
|
|
tx.lbtc,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class acheatnext(object):
|
|
|
|
@ -611,7 +725,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.cheatnext.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.cheatnext.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lcheatnext(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -620,7 +736,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.cheatnext.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.cheatnext.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class aads(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -638,7 +756,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.ads.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.ads.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class xmr(object):
|
|
|
|
|
name = "xmr"
|
|
|
|
@ -647,7 +767,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
xmr_prices = agora.money.cg.get_price(ids="monero", vs_currencies=["sek", "usd", "gbp"])
|
|
|
|
|
xmr_prices = agora.money.cg.get_price(
|
|
|
|
|
ids="monero", vs_currencies=["sek", "usd", "gbp"]
|
|
|
|
|
)
|
|
|
|
|
price_sek = xmr_prices["monero"]["sek"]
|
|
|
|
|
price_usd = xmr_prices["monero"]["usd"]
|
|
|
|
|
price_gbp = xmr_prices["monero"]["gbp"]
|
|
|
|
@ -660,7 +782,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
xmr_prices = agora.money.cg.get_price(ids="bitcoin", vs_currencies=["sek", "usd", "gbp"])
|
|
|
|
|
xmr_prices = agora.money.cg.get_price(
|
|
|
|
|
ids="bitcoin", vs_currencies=["sek", "usd", "gbp"]
|
|
|
|
|
)
|
|
|
|
|
price_sek = xmr_prices["bitcoin"]["sek"]
|
|
|
|
|
price_usd = xmr_prices["bitcoin"]["usd"]
|
|
|
|
|
price_gbp = xmr_prices["bitcoin"]["gbp"]
|
|
|
|
@ -673,7 +797,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.withdraw.run(cmd, spl, length, authed, msg, agora, tx, ux, agora)
|
|
|
|
|
GenericCommands.withdraw.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, agora
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class lwithdraw(object):
|
|
|
|
|
authed = True
|
|
|
|
@ -682,7 +808,9 @@ class IRCCommands(object):
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|
GenericCommands.withdraw.run(cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc)
|
|
|
|
|
GenericCommands.withdraw.run(
|
|
|
|
|
cmd, spl, length, authed, msg, agora, tx, ux, tx.lbtc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class remaining(object):
|
|
|
|
|
name = "r"
|
|
|
|
@ -807,7 +935,9 @@ class IRCCommands(object):
|
|
|
|
|
account = spl[1]
|
|
|
|
|
accounts = tx.sinks.truelayer.get_accounts(account)
|
|
|
|
|
for account in accounts["results"]:
|
|
|
|
|
msg(f"{account['account_id']} {account['display_name']} {account['currency']}")
|
|
|
|
|
msg(
|
|
|
|
|
f"{account['account_id']} {account['display_name']} {account['currency']}"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class naccounts(object):
|
|
|
|
|
name = "naccounts"
|
|
|
|
@ -870,7 +1000,9 @@ class IRCCommands(object):
|
|
|
|
|
if length == 2:
|
|
|
|
|
account_id = spl[1]
|
|
|
|
|
transactions = tx.sinks.nordigen.get_transactions(account_id)
|
|
|
|
|
transactions.addCallback(IRCCommands.ntransactions.got_transactions, msg)
|
|
|
|
|
transactions.addCallback(
|
|
|
|
|
IRCCommands.ntransactions.got_transactions, msg
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
class nreqs(object):
|
|
|
|
|
name = "nreqs"
|
|
|
|
@ -964,7 +1096,9 @@ class IRCCommands(object):
|
|
|
|
|
accounts_active.append(account)
|
|
|
|
|
accounts_all = tx.sinks.truelayer.get_accounts(bank)
|
|
|
|
|
accounts_unmapped = [
|
|
|
|
|
x["account_id"] for x in accounts_all["results"] if x["account_id"] not in accounts_active
|
|
|
|
|
x["account_id"]
|
|
|
|
|
for x in accounts_all["results"]
|
|
|
|
|
if x["account_id"] not in accounts_active
|
|
|
|
|
]
|
|
|
|
|
msg(f"Unmapped accounts: {', '.join(accounts_unmapped)}")
|
|
|
|
|
|
|
|
|
@ -982,7 +1116,9 @@ class IRCCommands(object):
|
|
|
|
|
class authlink(object):
|
|
|
|
|
name = "authlink"
|
|
|
|
|
authed = True
|
|
|
|
|
helptext = "Create a URL for identity verification. Usage: authlink <identifier>"
|
|
|
|
|
helptext = (
|
|
|
|
|
"Create a URL for identity verification. Usage: authlink <identifier>"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
@ -994,7 +1130,9 @@ class IRCCommands(object):
|
|
|
|
|
class checkauth(object):
|
|
|
|
|
name = "checkauth"
|
|
|
|
|
authed = True
|
|
|
|
|
helptext = "Check the authentication for an identifier. Usage: checkauth <identifier>"
|
|
|
|
|
helptext = (
|
|
|
|
|
"Check the authentication for an identifier. Usage: checkauth <identifier>"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
@ -1013,8 +1151,12 @@ class IRCCommands(object):
|
|
|
|
|
if length == 3:
|
|
|
|
|
platform = spl[1]
|
|
|
|
|
currency = spl[2]
|
|
|
|
|
account_info = tx.markets.get_matching_account_details(platform, currency)
|
|
|
|
|
bank_details = tx.markets.format_payment_details(currency, account_info, real=True)
|
|
|
|
|
account_info = tx.markets.get_matching_account_details(
|
|
|
|
|
platform, currency
|
|
|
|
|
)
|
|
|
|
|
bank_details = tx.markets.format_payment_details(
|
|
|
|
|
currency, account_info, real=True
|
|
|
|
|
)
|
|
|
|
|
if not bank_details:
|
|
|
|
|
msg("Could not get bank details.")
|
|
|
|
|
return
|
|
|
|
@ -1023,7 +1165,9 @@ class IRCCommands(object):
|
|
|
|
|
class id(object):
|
|
|
|
|
name = "id"
|
|
|
|
|
authed = True
|
|
|
|
|
helptext = "Get the identity information of a user. Usage: id <platform> <username>"
|
|
|
|
|
helptext = (
|
|
|
|
|
"Get the identity information of a user. Usage: id <platform> <username>"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def run(cmd, spl, length, authed, msg, agora, tx, ux):
|
|
|
|
|