Bug 253691

Summary: CTCP requests treated as PRIVMSGs if they're coming from the server
Product: [Applications] konversation Reporter: Martin Herkt <lachs0r>
Component: protocolAssignee: Konversation Developers <konversation-devel>
Status: CONFIRMED ---    
Severity: normal CC: hein
Priority: NOR    
Version: 1.5-rc1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Herkt 2010-10-09 19:42:17 UTC
Version:           Git (using Devel) 
OS:                Linux

Some IRC networks send their CTCP requests directly from the servers (nicknames can contain a "."). This apparently causes Konversation to treat these CTCP requests as regular PRIVMSGs (the \001 are ignored).

Reproducible: Always

Steps to Reproduce:
Connect to an IRC network with the above mentioned setup, for example irc.otakubox.at

Actual Results:  
A new query tab opens with for example:
<irc7.otakubox.at> TIME

Expected Results:  
CTCP requests from servers are not treated as regular PRIVMSGs.

Konversation: 1.3.1+ #4077
OS: Linux (x86_64) release 2.6.36-rc5-22-desktop
Compiler: gcc
Comment 1 Martin Herkt 2010-10-09 20:33:50 UTC
Update: Looks like the key to the problem is in line 146 of src/irc/inputfilter.cpp:

    if ((!prefix.contains('!')) && (prefix != server->getNickname()))

On those networks, the source of the CTCP messages does not contain a !, and parseServerCommand() doesn't do anything about CTCP messages.
Comment 2 Eike Hein 2010-10-11 00:39:31 UTC
Thanks a lot for a good report, we'll be looking into it.