IrcDotNet
IrcDotNet copied to clipboard
Network Information Received
So you connect to a network(Freenode), and it sends back the network information. 251, 252, 253, 254, 255, 265, 266, 250
IrcDotNet throws the NetworkInformationReceived event with the details in e.Comment.
e.Comment sometimes contains a properly formatted string
"There are 109 users and 84695 invisible on 32 servers"
and sometimes e.comment contains a number as a string.
"5"
The event is thrown 5 times out of the 8 responses. The last 3 never throw the event.
The way the Network Information is structured, I can't use sender to get the information, because there is no way to tell which piece of information threw the event.
You want to tell me that it splits on 84695 between 8469 and 5 ?
I have a wireshark capture, and it seems if the response from the server is incorrect, then IrcDotNet also gets it wrong. Let me post a screenshot.
Since freenode is sending packets which I presume are longer than the 1024 limit, it gets split in the wrong place. (in wireshark) and IrcDotNet can't handle that either. What happens is 265, 266, 250 don't throw an event. thats item 1.
Another issue is that IrcDotNet throws the NetworkInformationReceived event with just 35 as the comment. What it should be is "35 :IRC Operators online". Without that extra info there is no telling which of the 7 different network information properties it comes from.
So the issues here are:
- If the server sends a response with > 1024 bytes, it gets split in the wrong place.
- Event 252 (RPL_LUSEROP) has an integer field and some additional info
Is that correct?
The first one seems to be offspec, since the returned message can be only a certain size ... But we live nowadays with so much ubiquitous memory, I think we could use System.IO.Pipelines to actually address this. That library would resize the used buffers automatically for us, also the most simple example for it literally just read lines (ending with \n)
Here is a nice list of events https://www.alien.net.au/irc/irc2numerics.html
Yes, that is what I think is happening.
A few network information events return an int (and that is all they return) in e.Comment.
Really all events should be returning enough information so that you can post the response.
16
34
73
16, 34, 73 What do they mean. Without context they are useless.
This is not IRC, try to add all comments in one response :D Also do you know what all of the meanings of the integer parameter in notice 252 are? Maybe there is a source which describes them?
I think you are right that events in the library should contain everything that is needed, its just that in open source usually something happens when someone needs it or makes an issue out of what he dislikes about a certain library.
Just letting you guys know. It's not important at all.