chillerbot / chillerbot-ux

chillerbot-ux UserExperience based on DDraceNetwork, a mod of Teeworlds
Other
14 stars 10 forks source link

Add `exec_cached` #156

Open ChillerDragon opened 4 months ago

ChillerDragon commented 4 months ago

The exec command is nice to load configs. But it's not ideal for binds. Because it does read from the disk every time. If it is a frequently pressed bind that is a bunch of unnecessary IO. Also it logs every time and spams the console.

So exec_cached should read a file only once and then store the data in memory. If it is run again it will not print anything to the console.

ChillerDragon commented 4 months ago

Another idea would be to add methods to the config language. Because that is what exec is abused for in those binds. To have multiple commands run at once.