Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
添加 接口.设置QQ昵称
Browse files Browse the repository at this point in the history
  • Loading branch information
chocolatl committed Feb 18, 2020
1 parent b6e1b94 commit 8c76a93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions api.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ int loadQQLightAPI(int* pErrorLine) {
GET_DLL_FUNC(QL_getLoginAccount, "Api_GetLoginQQ");
GET_DLL_FUNC(QL_setSignature, "Api_SetSignature");
GET_DLL_FUNC(QL_getNickname, "Api_GetNick");
GET_DLL_FUNC(QL_setNickname, "Api_SetNick");
GET_DLL_FUNC(QL_getPraiseCount, "Api_GetPraiseNum");
GET_DLL_FUNC(QL_givePraise, "Api_SendPraise");
GET_DLL_FUNC(QL_handleFriendRequest, "Api_SetFriendAdd");
Expand Down
1 change: 1 addition & 0 deletions api.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ EXTERN void __stdcall (*QL_setGroupCard)(const char* group, const char* qq, cons
EXTERN const char* __stdcall (*QL_getLoginAccount)(const char* authCode);
EXTERN void __stdcall (*QL_setSignature)(const char* content, const char* authCode);
EXTERN const char* __stdcall (*QL_getNickname)(const char* qq, const char* authCode);
EXTERN const char* __stdcall (*QL_setNickname)(const char* name, const char* authCode);
EXTERN const char* __stdcall (*QL_getPraiseCount)(const char* qq, const char* authCode);
EXTERN void __stdcall (*QL_givePraise)(const char* qq, const char* authCode);
EXTERN void __stdcall (*QL_handleFriendRequest)(const char* qq, int type, const char* message, const char* authCode);
Expand Down
12 changes: 12 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,18 @@ void wsClientTextDataHandle(const char* payload, uint64_t payloadLen, SOCKET soc

free((void*)nickname);

} else if (METHOD_IS("setNickname")) {

PARAMS_CHECK(e_name);

const char* nickname = UTF8ToGBK(v_name);

QL_setNickname(nickname, authCode);

sendAcceptJSON(socket, v_id);

free((void*)nickname);

} else if (METHOD_IS("getPraiseCount")) {

PARAMS_CHECK(e_qq);
Expand Down

0 comments on commit 8c76a93

Please sign in to comment.