MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / RemoveChatUser

Function RemoveChatUser

netcon/mtclient/chat_api.cpp:555–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555int RemoveChatUser(char *nickname) {
556 Chat_user *prv_user = nullptr;
557
558 Curruser = Firstuser;
559 while (Curruser) {
560 if (stricmp(nickname, Curruser->nick_name) == 0) {
561 if (prv_user) {
562 prv_user->next = Curruser->next;
563
564 } else {
565 Firstuser = Curruser->next;
566 }
567 AddChatCommandToQueue(CC_USER_LEAVING, Curruser->nick_name, strlen(Curruser->nick_name) + 1);
568 DLLmem_free(Curruser);
569 return 1;
570 }
571 prv_user = Curruser;
572 Curruser = Curruser->next;
573 }
574 return 0;
575}
576
577void RemoveAllChatUsers() {
578 Chat_user *tmp_user = nullptr;

Callers 1

ParseIRCMessageFunction · 0.85

Calls 1

AddChatCommandToQueueFunction · 0.85

Tested by

no test coverage detected