diff --git a/.gitignore b/.gitignore index 6700d9b..ffaa94d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ # Ignore libxml2 while we're currently using the included distribution version before upgrading to newer HydraIRC/libs/libxml2/* -# Ignore libxml2-old folder, where we save the previous version of libxml -HydraIRC/libs/libxml2-old/* # Ignore VS Autogenerated Files *.ipch *.opensdf diff --git a/CHANGES.TXT b/CHANGES.TXT index 587ac9d..e40f47a 100644 --- a/CHANGES.TXT +++ b/CHANGES.TXT @@ -15,6 +15,15 @@ Key: (name) - the name of the person running HydraIRC who first reported the problem or requested the feature +9/October/2023 - PM (0.3.169) + gdwnldsKSC + + Resolved IRC Protocol issue from github issue https://github.com/HydraIRC/hydrairc/issues/17 + +24/August/2023 - AM (0.3.168) + gdwnldsKSC + * Updated libXML2 from 2.5.1 to current libXML2 master as of 22/October/2022 + * Upgraded WTL8 to WTL9.1 + 23/September/2022 - AM (0.3.167) - Experimental gdwnldsKSC * Updated DEVELOPER.TXT with instructonis for building under Visual Studio 2008 diff --git a/HydraIRC/HydraIRC.rc b/HydraIRC/HydraIRC.rc index de96e58..5690c4f 100644 --- a/HydraIRC/HydraIRC.rc +++ b/HydraIRC/HydraIRC.rc @@ -92,8 +92,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,3,168,0 - PRODUCTVERSION 0,3,168,0 + FILEVERSION 0,3,169,0 + PRODUCTVERSION 0,3,169,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -111,12 +111,12 @@ BEGIN VALUE "Comments", "http://www.HydraIRC.com" VALUE "CompanyName", "Hydra Productions" VALUE "FileDescription", "HydraIRC" - VALUE "FileVersion", "0, 3, 168, 0" + VALUE "FileVersion", "0, 3, 169, 0" VALUE "InternalName", "HydraIRC" VALUE "LegalCopyright", "Dominic Clifton - Copyright 2002-2022" VALUE "OriginalFilename", "HydraIRC.exe" VALUE "ProductName", "HydraIRC" - VALUE "ProductVersion", "0.3.168.0" + VALUE "ProductVersion", "0.3.169.0" END END BLOCK "VarFileInfo" diff --git a/HydraIRC/Server.cpp b/HydraIRC/Server.cpp index 4cd26c5..186343e 100644 --- a/HydraIRC/Server.cpp +++ b/HydraIRC/Server.cpp @@ -1985,6 +1985,9 @@ void IRCServer::Parse( char *processstr ) { username = a; topictime = b; + if (topictime[0] == ':') { + topictime++; + } time_t l = (time_t)atol(topictime); // FIXME - no check for null string t = localtime(&l); } @@ -2023,23 +2026,31 @@ void IRCServer::Parse( char *processstr ) { char *channelname; channelname = strtok(rest, " "); - //username = UseEmptyString(strtok(NULL, " ")); - - time_t l = (time_t)atol(UseEmptyString(strtok(NULL, ""))); // FIXME - no check for null string + char *timeStr = UseEmptyString(strtok(NULL, "")); + if (!timeStr) { + sys_Printf(BIC_ERROR, "ERROR: Failed to parse creation time for channel %s\n", channelname); + break; + } + // ircd protocol fix for servers not putting space after + if (timeStr[0] == ':') { + timeStr++; + } + + time_t l = (time_t)atol(timeStr); tm *t = localtime(&l); - m_Variables[VID_CHANNEL] = channelname; m_Variables[VID_PARAM1] = channelname; - m_Variables[VID_PARAM2] = t ? stripcrlf(asctime(t)) : "unknown"; + m_Variables[VID_PARAM2] = t ? stripcrlf(asctime(t)) : "unknown"; - IRCChannel *pChannel = FindChannel(channelname); - if (pChannel) - { - pChannel->OutputFormatter(BIC_TOPIC,num); - } - else - sys_Printf(BIC_ERROR,"ERROR: Received channel information for a channel that we've not joined (%s)\n",channelname); - } + IRCChannel *pChannel = FindChannel(channelname); + + if (pChannel) + { + pChannel->OutputFormatter(BIC_TOPIC,num); + } + else + sys_Printf(BIC_ERROR,"ERROR: Received channel information for a channel that we've not joined (%s)\n",channelname); + } break; case RPL_NAMREPLY: @@ -2117,6 +2128,10 @@ void IRCServer::Parse( char *processstr ) channelname = strtok(rest, " "); channelmode = UseEmptyString(strtok(NULL,"")); + if (channelmode && channelmode[0] == ':') { + channelmode++; + } + m_Variables[VID_CHANNEL] = channelname; m_Variables[VID_CHANNELMODE] = channelmode; m_Variables[VID_PARAM1] = channelname; @@ -2687,6 +2702,12 @@ void IRCServer::Parse( char *processstr ) m_Variables[VID_PARAM1] = to; m_Variables[VID_PARAM2] = tmpnick; m_Variables[VID_PARAM3] = UseEmptyString(rest); + + char *colonPos = strchr(rest, ':'); + if (colonPos) { + memmove(colonPos, colonPos + 1, strlen(colonPos)); + } + if (ischannelstartchar(to[0])) { IRCChannel *pChannel = FindChannel(to); diff --git a/HydraIRC/version.h b/HydraIRC/version.h index b7ed615..14a9cce 100644 --- a/HydraIRC/version.h +++ b/HydraIRC/version.h @@ -27,8 +27,8 @@ */ -#define VERSIONNUM "v0.3.168" -#define VERSIONDATE "(13/November/2022)" +#define VERSIONNUM "v0.3.169" +#define VERSIONDATE "(9/October/2023)" #ifdef RELEASE_VERSION #define VERSIONSTRING_EXTRA_1 ""