Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1267


Ignore:
Timestamp:
May 13, 2008, 6:33:05 PM (17 years ago)
Author:
landauf
Message:

telnet remote control works

type "source remote.tcl" into the ingame shell
connect with tcl to port 2560
login with "orxonox rocks"
type any command you like… it will be executed in orxonox ;)
of course server-admins will change the password (and the port)

Location:
code/branches/console
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/TclBind.cc

    r1255 r1267  
    3939{
    4040    ConsoleCommandShortcutGeneric(tcl, createExecutor(createFunctor(&TclBind::tcl), "tcl", AccessLevel::None));
     41    ConsoleCommandShortcutGeneric(bgerror, createExecutor(createFunctor(&TclBind::bgerror), "bgerror", AccessLevel::None));
    4142
    4243    TclBind::TclBind()
     
    147148    }
    148149
     150    void TclBind::bgerror(std::string error)
     151    {
     152        while (error.size() >= 2 && error[0] == '{' && error[error.size() - 1] == '}')
     153            error = error.substr(1, error.size() - 2);
     154
     155        COUT(1) << "Tcl background error: " << error << std::endl;
     156    }
     157
    149158    bool TclBind::eval(const std::string& tclcode)
    150159    {
  • code/branches/console/src/core/TclBind.h

    r1255 r1267  
    4242
    4343            static std::string tcl(const std::string& tclcode);
     44            static void bgerror(std::string error);
    4445
    4546            void setDataPath(const std::string& datapath);
  • code/branches/console/src/core/TclThreadManager.cc

    r1258 r1267  
    202202            i->eval("redef_puts");
    203203
    204             i->eval("rename while tcl::while");
    205             i->eval("proc while {test command} { tcl::while {$test && [orxonox::running " + threadID + "]} \"$command\" }");
     204//            i->eval("rename while tcl::while");
     205//            i->eval("proc while {test command} { tcl::while {[uplevel 1 expr $test]} {uplevel 1 $command} }"); // (\"$test\" && [orxonox::running " + threadID + "]])
    206206//            i->eval("rename for tcl::for");
    207207//            i->eval("proc for {start test next command} { uplevel tcl::for \"$start\" \"$test\" \"$next\" \"$command\" }");
Note: See TracChangeset for help on using the changeset viewer.