mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
getlasthave
This commit is contained in:
parent
7a72e63372
commit
7182f1bad8
@ -251,6 +251,7 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "follow", &follow, false, true },
|
||||
{ "unfollow", &unfollow, false, true },
|
||||
{ "getfollowing", &getfollowing, false, true },
|
||||
{ "getlasthave", &getlasthave, false, true },
|
||||
{ "listusernamespartial", &listusernamespartial, false, true },
|
||||
{ "getdefaultuser", &getdefaultuser, false, true },
|
||||
{ "setdefaultuser", &setdefaultuser, false, true },
|
||||
|
@ -203,6 +203,7 @@ extern json_spirit::Value getspammsg(const json_spirit::Array& params, bool fHel
|
||||
extern json_spirit::Value follow(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value unfollow(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getfollowing(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getlasthave(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value listusernamespartial(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value getdefaultuser(const json_spirit::Array& params, bool fHelp);
|
||||
extern json_spirit::Value setdefaultuser(const json_spirit::Array& params, bool fHelp);
|
||||
|
@ -1164,6 +1164,21 @@ Value getfollowing(const Array& params, bool fHelp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Value getlasthave(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || (params.size() != 0))
|
||||
throw runtime_error(
|
||||
"getfollowing\n"
|
||||
"get last 'have' (higher post number) of each user user we follow");
|
||||
|
||||
Object ret;
|
||||
BOOST_FOREACH(string username, m_following) {
|
||||
ret.push_back(Pair(username,lastPostKfromTorrent(username)));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Value listusernamespartial(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || (params.size() != 2))
|
||||
|
Loading…
Reference in New Issue
Block a user