TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Actions working on #system?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Shaiith



Joined: 11 Jul 2009
Posts: 64

PostPosted: Mon Jul 13, 2009 1:38 am    Post subject: Actions working on #system? Reply with quote

I seem to remember that it was the case at one point in the past that the output from #system was run through the same filters as input from the connection.

I wanted to date/time stamp my log files with my machine's time, and the obvious way to implement this was #system date +.... with an action to parse it and start the log rolling.

I was unable to get this to work, however I was able to get it working with #run, albeit with the additional complications of communicating the value back across sessions.

It'd be nice if #system output could be parsed (or if there was a config for it so it could be on only when desired, or maybe prepend all output lines with something so that #act {^#SYS|} {#nop} {1} would keep actions from firing. People could still make explicit actions to handle the output if they wanted.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Jul 13, 2009 7:50 am    Post subject: Reply with quote

Not possible with the way #system works, the only way to go about this is using #run.

The following script might do what you want:

Code:

#function {timestamp}
{
        #format utime {%U};

        #format result {%t.%m} {{%Y-%m-%d %H:%M:%S} {$utime % 1000000 / 100000}
}
 
#event {RECEIVED LINE}
{   
        #line log mylog.txt {<178>@timestamp{} \};
        #line log mylog.txt
}
Back to top
View user's profile Send private message Send e-mail
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Thu Aug 01, 2013 1:24 am    Post subject: Reply with quote

here's another example:

Code:
#script {path} {tmux -V};
#show {$path};
#act {tmux 1.5} {#showme hello world!};
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group