| 940 | } |
| 941 | |
| 942 | void BOBCommandSession::StatusCommandHandler (const char * operand, size_t len) |
| 943 | { |
| 944 | LogPrint (eLogDebug, "BOB: status ", operand); |
| 945 | const std::string name = operand; |
| 946 | std::string statusLine; |
| 947 | |
| 948 | // always prefer destination |
| 949 | auto dest = m_Owner.FindDestination(name); |
| 950 | if(dest) |
| 951 | { |
| 952 | // tunnel destination exists |
| 953 | BuildStatusLine(false, dest, statusLine); |
| 954 | SendReplyOK(statusLine); |
| 955 | } |
| 956 | else |
| 957 | { |
| 958 | if(m_Nickname == name && !name.empty()) |
| 959 | { |
| 960 | // tunnel is incomplete / has not been started yet |
| 961 | BuildStatusLine(true, nullptr, statusLine); |
| 962 | SendReplyOK(statusLine); |
| 963 | } |
| 964 | else |
| 965 | { |
| 966 | SendReplyError("no nickname has been set"); |
| 967 | } |
| 968 | } |
| 969 | } |
| 970 | void BOBCommandSession::HelpCommandHandler (const char * operand, size_t len) |
| 971 | { |
| 972 | auto helpStrings = m_Owner.GetHelpStrings(); |
nothing calls this directly
no test coverage detected