Skip to content
This repository has been archived by the owner on Jul 14, 2018. It is now read-only.

Commit

Permalink
split token parse
Browse files Browse the repository at this point in the history
  • Loading branch information
HaCk3Dq committed Apr 26, 2016
1 parent 92696a9 commit c111668
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ VkMan get_token(ref string[string] storage) {
getstr(&token);
noecho;
auto strtoken = (cast(char*)&token).to!string;
if (strtoken.length != 85) strtoken = strtoken[45..130];
if (strtoken.length != 85) strtoken = strtoken.split("access_token=")[1].split("&expires")[0];
strtoken.print;
storage["token"] = strtoken;
return new VkMan(strtoken);
}
Expand Down

0 comments on commit c111668

Please sign in to comment.