IrcDotNet and Quit event
I am making an IRC client using IrcDotNet.
I am having problems with the IrcUser.Quit event, which is not always being called, leaving me with ghost users in my nick list.
I see in the source (see below) that its not always sent. How do you handle the users quitting so that the nick list is always accurate?
/// <summary> /// Occurs when the user has quit the network. This may not always be sent. /// </summary> public event EventHandler<IrcCommentEventArgs> Quit;
See also questions close to this topic
How does an irc daemon like Charybdis work?
I am pretty new to irc, and am poking around in it to try and understand it.
I am running CentOS 7 on a VM, and have installed charybdis-4.1.1 and atheme-7.2.10-r2, using this marvellous guide. However, while the guide does a fantastic job of telling me how to install it, it doesn’t really tell me how it works, which is kinda my aim of doing this.
What I had in mind was to set up a server and poke around it under the guidance of some online tutorial. However, I couldn’t really find any material online that explains how certain files work. I tried reading the documentation page on github, but it doesn’t really tell me how it works either.
I understand that most people use irc clients instead of actually installing and maintaining a server, which may be part of the reason why I couldn’t find any material. So….would any kind soul help in giving me a primer in how this works? Or perhaps provide a link to some tutorial on charybdis? Thank you so much!!
"Connection reset by peer" when using Twitch IRC in Python
I try to write my own bot in Python to connect and interact with the Twitch-chat via its IRC interface. I have the connection and can receive and send data. I also answer the incoming PINGs with PONG (they get send after around 5 minutes). But after about 3 minutes of inactivity (so before I even get a PING) the connection fails with
socket.error: [Errno 104] Connection reset by peer
I use the
socketmodule in Python for the connection. The error occurs when the
recv()method is called on my socket.
Some things I was able to figured out:
Before the connection fails, their is no incoming (unanswered) PING.
The time between the last chat message and the disconnect seams to be around 3 minutes every time. And its enough to receive something (linke a chat-message by someone else) to reset this timer. I don't have to send anything myself.
I first thought that I time out myself because I don't receive anything for to long. That doesn't seem to be the case, because if I set a lower timeout time for
socket.timeout: timed out, not the error shown above.
I think I don't miss any data send to me because all chat messages come through. But I post my main loop for receiving data below just to be sure.
My Question is now, why does the connection fail and how can I prevent this?
I have the feeling this is a vague question. It's the first time I try to work with an IRC interface and I don't rely know how to get more information on what exactly the problem is.
Just in case, here's the mains loop I use to receive data. I think this works fine because all the chat messages come through. But maybe there's a mistake and I miss some incoming data (like a PING).
readbuffer = '' while True: readbuffer = readbuffer + s.recv(1024) temp = string.split(readbuffer, '\n') readbuffer = temp.pop() for line in temp: print(line) # PING/PONG if "PING :tmi.twitch.tv" in line: print("PONG :tmi.twitch.tv") s.send(line.replace('PING', 'PONG'))
Is there an irc or twitch api function that let's me read all twitch chat messages from an already completed stream?
I'm trying to read in every Twitch chat message on already completed Twitch streams, with the intent to summarize and get some statistics on the messages. What API do I use to pull down a list of chat messages from completed streams?
There seems to be an API for getting messages as they come along in currently live streams: https://dev.twitch.tv/docs/irc. However, this only seems to work with currently live streams and it only gets the messages as they come along. Ideally, I want to be able to get a list of all chat messages from already completed streams instead. However I can't seem to find any API call that would let me do that, either as part of IRC or as part of the New Twitch API.