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

When a user quit the channel, it does not store the channel #37

Open
AntoineTurmel opened this issue Aug 13, 2015 · 6 comments
Open

When a user quit the channel, it does not store the channel #37

AntoineTurmel opened this issue Aug 13, 2015 · 6 comments

Comments

@AntoineTurmel
Copy link

When a user quit the channel, it does not store the channel in the main table.
"undefined" is put instead of the right channel name:

bug_pierc

@frdmn
Copy link
Contributor

frdmn commented Aug 13, 2015

I assume this is intended because the bot actually doesn't listen for "leaving a channel" (PART) event, instead it listens for the QUIT event, which doesn't reference a specific channel because the user disconnects from the IRC server completely.

@AntoineTurmel
Copy link
Author

It's not possible to write a quit line for each channel where the user was ?

@frdmn
Copy link
Contributor

frdmn commented Aug 13, 2015

No, not really, as you can see here, the bot tries to parse the channel if the event contains one. However if the user quits instead of parts the channel, the bot won't be able to tell which channels the person was participating.

Perhaps someone else has an idea how to solve this. I'm not a Python pro at all.

@AntoineTurmel
Copy link
Author

Well the bot can determine the quit is from X channel because the quit message is displayed on the channel no ?

@frdmn
Copy link
Contributor

frdmn commented Aug 13, 2015

I don't think that's how the IRC library works. In general it receives events, those can be messages, join events, quit events, topic change events, etc. At the moment, pierc just receives those and writes it's information into the database. However, the quit event doesn't contain a channel or target which we can parse. At this point we don't know "where" the quit came from.

@AntoineTurmel
Copy link
Author

Ok, so I suppose we need first to detect if an user is in the channel... and then deduce by the quit that he is no more in the channel.

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

No branches or pull requests

2 participants