MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / GetNickCommandHandler

Method GetNickCommandHandler

libi2pd_client/BOB.cpp:585–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583 }
584
585 void BOBCommandSession::GetNickCommandHandler (const char * operand, size_t len)
586 {
587 LogPrint (eLogDebug, "BOB: getnick ", operand);
588 if(*operand)
589 {
590 m_CurrentDestination = m_Owner.FindDestination (operand);
591 auto proxy = m_Owner.GetProxy (operand);
592 if (m_CurrentDestination)
593 {
594 m_Keys = m_CurrentDestination->GetKeys ();
595 m_IsActive = m_CurrentDestination->IsRunning ();
596 if(proxy)
597 m_IsActive = true;
598 m_Nickname = operand;
599 }
600 if (m_Nickname == operand)
601 SendReplyOK ({"Nickname set to ", m_Nickname});
602 else
603 SendReplyError ("no nickname has been set");
604 }
605 else
606 SendReplyError ("no nickname has been set");
607 }
608
609 void BOBCommandSession::NewkeysCommandHandler (const char * operand, size_t len)
610 {

Callers

nothing calls this directly

Calls 4

LogPrintFunction · 0.85
FindDestinationMethod · 0.80
GetProxyMethod · 0.80
IsRunningMethod · 0.45

Tested by

no test coverage detected