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

[PROPOSAL] Properly Parsing all IRC Tags #14

Open
mahony0 opened this issue Sep 11, 2019 · 4 comments
Open

[PROPOSAL] Properly Parsing all IRC Tags #14

mahony0 opened this issue Sep 11, 2019 · 4 comments

Comments

@mahony0
Copy link
Contributor

mahony0 commented Sep 11, 2019

I just looked at Project cardboard. I think before creating an User Class, we need to parse IRC tags properly (yes, all of them at once). After that, we can handle all user-related tags easily in the Class.

I just saw this IRC Parser and it looks good and lightweight to me. Twitch uses IRCv3 and this library is also looks suitable with that version.

@vdeville
Copy link
Owner

Twitch use more than IRCv3 From flag you send at connection of user.
My idea is to crate an User class to begin, and after upgrade this class to add new possibilities.

But at the start of this project i dont want any process in class, but after reflexion, maybe, move some process make for the moment in IrcConnect class to respectivly User/Message/Command class.

If possible, I would prefer to do not use third-party library. My twitch framework is made to be robust and less consumption as possible

@mahony0
Copy link
Contributor Author

mahony0 commented Sep 11, 2019

It's not mandatory to use and depend external libraries, we can adopt them. I think it's logical to parse IRC message and use every single tag in related helper Class with _get methods.

User class is usable only if there are some kind of extra functionalities which depends on user data. For example methods like $message->getUser()->allMessages() or $message->getUser()->banInfo() or $message->getUser()->timeouts() is likely handy if there will be a database which holds all of this information.

Also it needs to be listen 2nd socket connection on Pubsub Endpoint for getting realtime timeout/ban/unban details of current message sender user.

I recommend to start with getting every single data from IRC string, log them for use later and assign them on appropriate Classes.

Or not improve this library too much for not bloating and leave it as is for keeping simple and robust.

@vdeville
Copy link
Owner

I think they are a middle decision ^ ^ Parse all tag possible Ok, but make this properly to keep performance optimization. This week and week-end i will work on this project and check what is better. But for the moment, i'm sure to do not make any connection with DB to store data history.

@mahony0
Copy link
Contributor Author

mahony0 commented Sep 12, 2019

If you wish, I can send PRs related to some code style and performance optimizations which I made my own library. Most of them are not changing the way of working the bot.

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