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

Function GetChannelByUser

netcon/mtclient/chat_api.cpp:1164–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164char *GetChannelByUser(const char *nickname) {
1165 char szWhoisCmd[100];
1166
1167 if (nickname == (char *)-1) {
1168 GettingUserChannel = 0;
1169 Getting_user_channel_error = 0;
1170 return nullptr;
1171 } else if (GettingUserChannel) {
1172 if (Getting_user_channel_error) {
1173 Getting_user_channel_error = 0;
1174 GettingUserChannel = 0;
1175 return (char *)-1;
1176 }
1177 if (*User_req_channel) {
1178 GettingUserChannel = 0;
1179 return User_req_channel;
1180 }
1181 } else {
1182 strcpy(Getting_user_channel_info_for, nickname);
1183 User_req_channel[0] = '\0';
1184 snprintf(szWhoisCmd, sizeof(szWhoisCmd), "/WHOIS %s", nickname);
1185 SendChatString(szWhoisCmd, 1);
1186 GettingUserChannel = 1;
1187 }
1188 return nullptr;
1189}

Callers 1

FindPilotFunction · 0.85

Calls 1

SendChatStringFunction · 0.85

Tested by

no test coverage detected