Ignore:
Timestamp:
06/08/12 18:05:57 (12 years ago)
Author:
tbretz
Message:
Removed the DimNetwork; implemented the JavaScript interpreter.
File:
1 edited

Legend:

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

    r14050 r14126  
    4949
    5050    // If we have not cd'ed to a server show only the line start
    51     if (fCurrentServer.empty())
     51    if (fCurrentServer.empty() || !fImp)
    5252        return beg + "> ";
    5353
    5454    // Check if we have cd'ed to a valid server
    55     const ClientList::const_iterator l = fClientList.find(fCurrentServer);
    56     if (l==fClientList.end())
     55    const pair<int32_t, string> state = fImp->GetServerState(fCurrentServer);
     56    if (state.first==-256)
    5757        return beg + "> ";
    58 
    59     const State state = GetState(fCurrentServer, l->second->GetState());
    6058
    6159    // The server
     
    6361
    6462    // If no match found or something wrong found just output the server
    65     if (state.index<-1)
     63    if (state.first<-1)
    6664        return beg + " " + serv + "> ";
    6765
    6866    // If everything found add the state to the server
    69     return beg + " " + serv + ":\033[32m\033[1m" + state.name + "\033[0m> ";
     67    return beg + " " + serv + ":\033[32m\033[1m" + state.second + "\033[0m> ";
    7068}
    7169
     
    7775
    7876    // If we have not cd'ed to a server show only the line start
    79     if (fCurrentServer.empty())
     77    if (fCurrentServer.empty() || !fImp)
    8078        return beg + "> ";
    8179
    82     // Check if we have cd'ed to a valid server
    83     const ClientList::const_iterator l = fClientList.find(fCurrentServer);
    84     if (l==fClientList.end())
     80    const pair<int32_t, string> state = fImp->GetServerState(fCurrentServer);
     81    if (state.first==-256)
    8582        return beg + "> ";//Form("\n[%d] \033[34m\033[1m%s\033[0m> ", GetLine(), fCurrentServer.c_str());
    8683
    87     const State state = GetState(fCurrentServer, l->second->GetState());
    88 
    8984    // If no match found or something wrong found just output the server
    90     if (state.index<-1)
     85    if (state.first<-1)
    9186        return beg + " " + fCurrentServer + "> ";
    9287
    9388    // If everything found add the state to the server
    94     return beg + " " + fCurrentServer + ":" + state.name + "> ";
     89    return beg + " " + fCurrentServer + ":" + state.second + "> ";
    9590}
Note: See TracChangeset for help on using the changeset viewer.