Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to implement autocommands in the future? #457

Open
hyperplural opened this issue May 28, 2020 · 4 comments
Open

Is it possible to implement autocommands in the future? #457

hyperplural opened this issue May 28, 2020 · 4 comments

Comments

@hyperplural
Copy link
Contributor

For example, after successful authorization of the bot, commands that are written, for example, in the autocommands.cfg file will be executed. This was very helpful for people who constantly write the same commands after the bot logs on to the server.

Tell us about the pros and cons of this feature, if possible.

Thanks.

@Levak
Copy link
Owner

Levak commented May 28, 2020

I have it halfway implemented since 2018 or so. Problem I never released it because I believed I took the wrong approach.

The feature took the form of a list of files to be executed. -f file1.cfg -f file2.cfg would be configuration files while, let's say -p script1.cfg -p script2.cfg would be scripts to run after log on.

What I meant by "wrong approach" was that I wanted to move the whole command line out of the readline thread, so that I could factorise the code for such feature. I didn't and stopped half-way through. I didn't even remember if it actually worked. Just tested, seems to work but doesn't support comments. It basically transfers each line of the file as if it was one line in the command line. Exactly like the exec file.cfg command.

I may also add like you requested, a "default" file that, if present, would act as an autorun.cfg.

@hyperplural
Copy link
Contributor Author

I may also add like you requested, a "default" file that, if present, would act as an autorun.cfg.

It would be interesting to see this. Wait for update?

@hyperplural
Copy link
Contributor Author

@Levak, you can give an example of running this full command? Sorry, i didn't quite figure it out..

@Levak
Copy link
Owner

Levak commented Jul 7, 2020

@Levak, you can give an example of running this full command? Sorry, i didn't quite figure it out..

This feature is not yet in the public repository. I need to cleanup the code I already have from 2018, when I have free time, which is a valuable resource right now (I don't even have access to my PC right now).

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

No branches or pull requests

2 participants