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

CTCP not according to specifcation? #69

Open
Querela opened this issue Jan 9, 2018 · 2 comments
Open

CTCP not according to specifcation? #69

Querela opened this issue Jan 9, 2018 · 2 comments

Comments

@Querela
Copy link

Querela commented Jan 9, 2018

https://github.com/Shizmob/pydle/blob/60ede96669d77e86b8ee264ebc21ab669418fb7b/pydle/features/ctcp.py#L102

I think, there may be cases where CTCP is not correctly recognized. More specifically, if the CTCP message follows a normal text message (or is embedded in it).

see example 3 in http://www.irchelp.org/protocol/ctcpspec.html


The text part of a PRIVMSG or NOTICE might contain zero or more
extended messages, intermixed with zero or more chunks of non-extended
data.
https://github.com/irchelp/wio/blame/gh-pages/protocol/ctcpspec.md#L189

Furthermore, it should be possible to send multiple CTCP messages (chained together). A check for CTCP should therefore
(1) check for CTCP_DELIMITER and if found
(2) check/extract all CTCP messages.
(3) handle CTCP messages/handle remaining text messages (if available)


I'm not sure how CTCP (aside from DCC) occurs in the wild but the current approach may not work for all cases.

@rakiru
Copy link

rakiru commented Jan 26, 2018

Basically no client implements the original CTCP spec. The only real potential case where it doesn't catch current usage is where message splitting results in the last character not being the delimiter any more.

A draft of an updated spec that details what is commonly implemented today: https://tools.ietf.org/html/draft-oakley-irc-ctcp-02

@shizmob
Copy link
Owner

shizmob commented Mar 14, 2018

This seems important to double-check, thanks! I'll see if there's any cases out there that aren't caught by current pydle.

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

3 participants