| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| SysOp Intro.ANS Time Stamp https://mail.black-squirrel.com/viewtopic.php?f=15&t=21122 |
Page 1 of 1 |
| Author: | Promethius [ Sun Oct 26, 2008 6:05 pm ] |
| Post subject: | SysOp Intro.ANS Time Stamp |
A simple script to place the server time in your intro.ans file that does not require you to be logged into the twgs but does require that you are local to the server. An example of the output of this script maybe be viewed on rivercitytw.dlinkddns.com port 2002 Precaution: Before running this script, backup your Intro.ans file!! Also make sure you have at least two blank lines for it to write the time stamp. # update Intro.ANS with current time |
|
| Author: | Thrawn [ Sun Oct 26, 2008 11:49 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Any chance of adding the zone? For example, I am PST, others may be Central, etc. |
|
| Author: | Promethius [ Mon Oct 27, 2008 12:22 am ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Thrawn wrote: Any chance of adding the zone? For example, I am PST, others may be Central, etc. Easiest way would be to hard code the time zone in front of the "Updated every 30 seconds" write. Something like " PST, Updated every 30 seconds". |
|
| Author: | Thrawn [ Mon Oct 27, 2008 10:53 am ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Thanks. I will do that. |
|
| Author: | Thrawn [ Mon Oct 27, 2008 3:00 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
I ran into an interesting development on my end. The script ran great. It added the time stamp every 30 secs. However I noticed after a bit, it defaulted to the default menu (the same menu style as if you log in admin). I had to stop and restart my TWGS to get the ANSI screen to display. Now I set the timestamp script to run with the ScoreKeeper, which runs our WhoIsOnline script. Both do their thing every 30 seconds. The WhoIsOnline posts to HTML, and the timestamp posts to the ANSI screen. Should I be running the timestamp script alone? Or is this a TWGS bug? |
|
| Author: | Promethius [ Mon Oct 27, 2008 5:44 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Thrawn wrote: I ran into an interesting development on my end. The script ran great. It added the time stamp every 30 secs. However I noticed after a bit, it defaulted to the default menu (the same menu style as if you log in admin). I had to stop and restart my TWGS to get the ANSI screen to display. Now I set the timestamp script to run with the ScoreKeeper, which runs our WhoIsOnline script. Both do their thing every 30 seconds. The WhoIsOnline posts to HTML, and the timestamp posts to the ANSI screen. Should I be running the timestamp script alone? Or is this a TWGS bug? I am wondering if TWGS did a read of the ANSI screen during the time the file was deleted and rewritten. It didn't find it so it may have defaulted back to the other menu. It would seem to have taken an extreme coincidence for this to happen because the delete and write happens extremely fast. I will look at maybe another option. |
|
| Author: | Thrawn [ Mon Oct 27, 2008 6:52 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
I was going to ask you that same thought. The ScoreKeeper is logged in and sits at the menu, pressing # every # seconds and writes to the Who's Online HTML file. I'm wondering if it is causing the problem where the timestamp script goes to write to the ansi screen and the ScoreKeeper is sitting at the menu at that exact time, although the screen displayed shows the players online, not the actual ansi screen. I will try running the timestamp in a seperate twxproxy and the scorekeeper in another to see if this issue will reproduce. |
|
| Author: | Promethius [ Mon Oct 27, 2008 7:15 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Thrawn wrote: I was going to ask you that same thought. The ScoreKeeper is logged in and sits at the menu, pressing # every # seconds and writes to the Who's Online HTML file. I'm wondering if it is causing the problem where the timestamp script goes to write to the ansi screen and the ScoreKeeper is sitting at the menu at that exact time, although the screen displayed shows the players online, not the actual ansi screen. I will try running the timestamp in a seperate twxproxy and the scorekeeper in another to see if this issue will reproduce. No need to try and reproduce, as I just saw it happen. Ah well, the thought sounded good on it. |
|
| Author: | Thrawn [ Mon Oct 27, 2008 7:21 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
It did not produce the issue if I don't have the ScoreKeeper running. If it is online at the menu or a player is accessing the menu at the same time, then it causes the TWGS to use the default menu. Your idea is sound "if" this error was fixed on the TWGS side. Of course it would be nice if the TWGS allowed us to use specific codes like we do with our BBS software. A certain code on the ansi screen displays time, etc. Sorry if I ruined your idea. |
|
| Author: | Promethius [ Mon Oct 27, 2008 7:53 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
Thrawn wrote: It did not produce the issue if I don't have the ScoreKeeper running. If it is online at the menu or a player is accessing the menu at the same time, then it causes the TWGS to use the default menu. Your idea is sound "if" this error was fixed on the TWGS side. Of course it would be nice if the TWGS allowed us to use specific codes like we do with our BBS software. A certain code on the ansi screen displays time, etc. Sorry if I ruined your idea. lol, stuff happens. It was fun to mess with but just one of those things.......... |
|
| Author: | ElderProphet [ Tue Oct 28, 2008 6:01 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
TWX could corrupt an ANSI file since it might mis-interpret line breaks. I don't imagine it could reliably read and then write an ANSI file, or at least not all ANSI files. Quote: # The site does not allow me to paste the correct color codes: Copy the square from an ANSI # file (using notepad) and paste it before the [ brackets in the line below write $intro " [37mServer Time: [34m" & $curTime & "[37m Updated every 30 seconds" That is an Escape sequence. Escape sequences begin with #27 (the ESC key code) and [ (open bracket). So the above line should be written: write $intro #27 & "[37m Server Time: " & #27 & "[34m" & $curTime & #27 & "[37m Updated every 30 seconds" +EP+ |
|
| Author: | Singularity [ Tue Oct 28, 2008 8:12 pm ] |
| Post subject: | Re: SysOp Intro.ANS Time Stamp |
I wrote a script that interprets a limited set of ANSI codes for a player score to HTML parser. I just stripped out any codes I didn't like. Writing ANSI would be trickier since you probably can't write all of the escape codes, but if you stripped out the problems ahead of time it might work... mostly. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|