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

Function AddChannel

netcon/mtclient/chat_api.cpp:1112–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1110}
1111
1112void AddChannel(char *channel, uint16_t numusers, char *topic) {
1113 Currchannel = Firstchannel;
1114 if (Firstchannel == nullptr) {
1115 Firstchannel = (Chat_channel *)DLLmem_malloc(sizeof(Chat_channel));
1116 // ASSERT(Firstchannel);
1117 strcpy(Firstchannel->channel_name, channel);
1118 strcpy(Firstchannel->topic, topic);
1119 Firstchannel->users = numusers;
1120 Firstchannel->next = nullptr;
1121 Currchannel = Firstchannel;
1122 } else {
1123 while (Currchannel->next) {
1124 Currchannel = Currchannel->next;
1125 }
1126 Currchannel->next = (Chat_channel *)DLLmem_malloc(sizeof(Chat_channel));
1127 // ASSERT(Currchannel->next);
1128 Currchannel = Currchannel->next;
1129 strcpy(Currchannel->channel_name, channel);
1130 strcpy(Currchannel->topic, topic);
1131 Currchannel->users = numusers;
1132 }
1133 Currchannel->next = nullptr;
1134}
1135
1136char *GetTrackerIdByUser(const char *nickname) {
1137 char szWhoisCmd[100];

Callers 1

ParseIRCMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected