Open kegsay opened 9 years ago
The reason for this is that it's not supposed to be parsed. In a RPL_TOPICWHOTIME
the server is the sender and the topic setter is merely an argument. node-irc parses senders with the code you linked but there's nothing to parse arguments because they could be anything.
You can simply copy that hostmask parsing code and apply it onto the argument by hand.
The reason for this is that it's not supposed to be parsed.
Says who? Given 333 has well defined arguments, we know which one the nick is. To not parse this because it's an argument is crazy.
What I mean is that the current code isn't supposed to parse masks in arguments and there is no existing machinery to selectively do and return that. Also I'm not so sure about the well-defined part as UnrealIRCd only has nick in that argument.
This
rpl
doesn't seem to be parsed correctly. On Freenode, it produces the full prefix as inmynick!~myuser@mydomain.com
instead ofmynick
. The following regex parses this correctly:https://github.com/martynsmith/node-irc/blob/master/lib/parse_message.js#L26
But this doesn't seem to be getting called for this
rpl
. Easy to test by just setting a topic on Freenode.