Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Feature Request: Named pipes #4

Open
Cyclic3 opened this issue Aug 24, 2018 · 3 comments
Open

Feature Request: Named pipes #4

Cyclic3 opened this issue Aug 24, 2018 · 3 comments

Comments

@Cyclic3
Copy link

Cyclic3 commented Aug 24, 2018

Could we use posix FIFOs to get the console output of csgo and pump it into csgo-csmd, without having to call it, making it so one doesn't even need to tab out of the game?

@M-Reimer
Copy link
Owner

I guess we have to live with some inconvenience.
csgo-csmd is meant as a workaround to a bug that has to be fixed by Valve. Making the code too complex is wasted (spare)time.

What you want to do could basically also be implemented without named pipes by just watching "console.log", but it causes some problems that are difficult to manage.

At first you have to enter "disconnect" to actually make the relevant stuff appear in the log. Just waiting at the "Downloading 0%" message doesn't work.

And secondly the download of the external script will take some time. You have to enter "retry" after downloading has finished, so you need some feedback from the script.

After all, I think it is easier to call the script manually :)

@Cyclic3
Copy link
Author

Cyclic3 commented Aug 24, 2018

I was thinking about having the command "con_logfile /path/to/named/pipe" shoved somewhere in an autoexec script, and then csgo-csmd could do it's stuff just by reading a line from a named pipe as usual. The file could be created with mkfifo, with the script just waiting on new lines, and checking them for the relevant message.

The feedback could be easily done with an ascii beep. Most terminals will happily use them.

If I get some time over the next few weeks, I will start hacking at it to see what happens.

(Disclaimer: My python knowlege is minimal, as I am more of a c++ person myself, so the resultant code may be a bit ugly)

@Cyclic3
Copy link
Author

Cyclic3 commented Aug 24, 2018

That was quicker that I expected.

It turns out that implementing this also stops the system attempting to redownload every file that session, which is nice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants