ClientMenu.AppendMenu(MF_STRING | (GetItemCount() > 0 ? MF_ENABLED : MF_GRAYED), MP_FIND, GetResString(IDS_FIND), _T("Search"));
Füge drunter:
ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient()) ? MF_ENABLED : MF_GRAYED), MP_KICKUSER, _T("Kick User"), _T("LISTREMOVE"));
ClientMenu.AppendMenu(MF_STRING | ((client && client->IsEd2kClient()) ? MF_ENABLED : MF_GRAYED), MP_BANUSER, _T("Ban User"), _T("CLEARCOMPLETE"));
suche weiter:
case MP_BOOT:
if (client->GetKadPort())
Kademlia::CKademlia::Bootstrap(ntohl(client->GetIP()), client->GetKadPort());
break;
füge drunter:
case MP_KICKUSER:
theApp.uploadqueue->RemoveFromUploadQueue(client);
break;
case MP_BANUSER:
theApp.uploadqueue->RemoveFromWaitingQueue(client);
client->Ban();
//theApp.uploadqueue->RemoveFromUploadQueue(client, _T("You were kicked."), true);
break;
Speicher die Datei und öffne MenuCmds.h füge ganz unten einfach:
#define MP_BANUSER 12650
#define MP_KICKUSER 12750
0 comments:
发表评论