[bug #41640] [PATCH] irc_message_parse requires '!' in prefix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #41640] [PATCH] irc_message_parse requires '!' in prefix

Eric L.-2
URL:
  <http://savannah.nongnu.org/bugs/?41640>

                 Summary: [PATCH] irc_message_parse requires '!' in prefix
                 Project: WeeChat
            Submitted by: tribut
            Submitted on: Wed 19 Feb 2014 06:35:51 PM GMT
                Category: irc plugin
                Severity: 3 - Normal
              Item Group: irc protocol
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.4-dev
                IRC nick: vendor

    _______________________________________________________

Details:

Both RFC1459 and RFC2812 allow the prefix in an IRC message to only contain
nick and host, such as ":nick@host PRIVMSG #weechat :foo". irc_message_parse
will in this case use "nick@host" as nick instead of just "nick".

Reference (from RFC2812):

message    =  [ ":" prefix SPACE ] command [ params ] crlf
prefix     =  servername / ( nickname [ [ "!" user ] "@" host ] )


See the attached patch for my proposed fix. Alternatively, feel free to merge
the parse-privmsg branch from my repository at
https://github.com/tribut/weechat.git

Thanks!



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 19 Feb 2014 06:35:51 PM GMT  Name:
0001-irc-make-optional-in-message-prefix.patch  Size: 987B   By: tribut

<http://savannah.nongnu.org/bugs/download.php?file_id=30608>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?41640>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[bug #41640] [PATCH] irc_message_parse requires '!' in prefix

Eric L.-2
Update of bug #41640 (project weechat):

                  Status:                    None => Fixed                  
             Assigned to:                    None => flashcode              
                 Release:               0.4.4-dev => 0.4.3                  

    _______________________________________________________

Follow-up Comment #1:

Merged with a small change: check that pos is not NULL in the condition, so
that it works with malformed messages where there is nothing after nick/host.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?41640>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev