Ignore:
Timestamp:
Apr 10, 2011, 10:12:56 AM (10 years ago)
Author:
tbretz
Message:
Implemented help for a single server or command.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/RemoteControl.cc

    r10307 r10341  
    7272    if (fCurrentServer.empty())
    7373    {
    74         if(fServiceList.HasServer(str))
     74        const size_t p1 = str.find_first_of(' ');
     75        const size_t p2 = str.find_first_of('/');
     76
     77        string s = str;
     78        if (p2!=string::npos && p1>p2)
     79            s = str.substr(0, p2);
     80
     81        if (p2<p1)
    7582        {
    76             fCurrentServer = str;
     83            const string c = str.substr(p2+1);
     84            return !fCommandList.SendDimCommand(lout, s, c);
     85        }
     86
     87        if(fServiceList.HasServer(s))
     88        {
     89            fCurrentServer = s;
    7790            return false;
    7891        }
    79         lout << kRed << "Unkown server '" << str << "'" << endl;
     92        lout << kRed << "Unkown server '" << s << "'" << endl;
    8093        return true;
    8194    }
Note: See TracChangeset for help on using the changeset viewer.