Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 15, 2008, 1:05:58 AM (16 years ago)
Author:
landauf
Message:

someone likes to chat? well, I do. here's a new IRC client. it connects directly into our irc.datacore.ch / #orxonox channel with a random nickname. use the "say text" command to write text into the channel. there are some more commands without a shortcut, type "IRC" and tab.
please update your media directory.

for some reason, irc-client and telnet-remote don't work together. please use only one feature at the same time. I'm not sure if it's a bug in TCL or in my TclThreadManager class. The problem also occurs with irc or telnet in parallel with another busy tcl-thread… strange thing.

File:
1 edited

Legend:

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

    r1267 r1276  
    3535#include "TclThreadManager.h"
    3636#include "TclBind.h"
     37#include "util/String.h"
    3738
    3839namespace orxonox
     
    104105    std::string TclBind::tcl_query(Tcl::object const &args)
    105106    {
    106 std::cout << "Tcl_query: args: " << args.get() << std::endl;
    107         std::string command = args.get();
     107        COUT(4) << "Tcl_query: " << args.get() << std::endl;
    108108
    109         while (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}')
    110             command = command.substr(1, command.size() - 2);
     109        std::string command = stripEnclosingBraces(args.get());
    111110
    112111        if (!CommandExecutor::execute(command, false))
     
    121120    void TclBind::tcl_execute(Tcl::object const &args)
    122121    {
    123 std::cout << "Tcl_execute: args: " << args.get() << std::endl;
    124         std::string command = args.get();
    125 
    126         while (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}')
    127             command = command.substr(1, command.size() - 2);
     122        COUT(4) << "Tcl_execute: " << args.get() << std::endl;
     123        std::string command = stripEnclosingBraces(args.get());
    128124
    129125        if (!CommandExecutor::execute(command, false))
     
    150146    void TclBind::bgerror(std::string error)
    151147    {
    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;
     148        COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;
    156149    }
    157150
Note: See TracChangeset for help on using the changeset viewer.