MCPcopy Create free account
hub / github.com/amule-project/amule / OnSendMessage

Method OnSendMessage

src/GenericClientListCtrl.cpp:579–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577
578
579void CGenericClientListCtrl::OnSendMessage( wxCommandEvent& WXUNUSED(event) )
580{
581 ItemList sources = ::GetSelectedItems( this );
582
583 if ( sources.size() == 1 ) {
584 CClientRef & source = (sources.front())->GetSource();
585
586 // These values are cached, since calling wxGetTextFromUser will
587 // start an event-loop, in which the client may be deleted.
588 wxString userName = source.GetUserName();
589 uint64 userID = GUI_ID(source.GetIP(), source.GetUserPort());
590
591 wxString message = ::wxGetTextFromUser(_("Send message to user"),
592 _("Message to send:"));
593 if ( !message.IsEmpty() ) {
594 theApp->amuledlg->m_chatwnd->SendMessage(message, userName, userID);
595 }
596 }
597}
598
599
600void CGenericClientListCtrl::OnViewClientInfo( wxCommandEvent& WXUNUSED(event) )

Callers

nothing calls this directly

Calls 6

GetSelectedItemsFunction · 0.70
sizeMethod · 0.45
GetIPMethod · 0.45
GetUserPortMethod · 0.45
IsEmptyMethod · 0.45
SendMessageMethod · 0.45

Tested by

no test coverage detected