Merge pull request 'Fix crash when trying to send data to a disconnected socket. Readme updates.' (#41) from more_fixups into master

Reviewed-on: #41
Reviewed-by: daniel_j <daniel@danieljon.es>
pull/55/head
daniel_j 4 years ago
commit 65b3d3cd2a
  1. 11
      CMakeLists.txt
  2. 12
      IRCClient/IRCBase.cpp
  3. 8
      README

@ -28,12 +28,15 @@ include_directories(${CMAKE_BINARY_DIR})
#
# Additional paths
#
option(IIRC_DEP_EXTRAS OFF)
option(IIRC_DEP_INCLUDE "")
option(IIRC_DEP_LIBRARY "")
if (${IIRC_DEP_EXTRAS})
set(IIRC_DEP_INCLUDE "" CACHE PATH "Additional include path (single path only)")
set(IIRC_DEP_LIBRARY "" CACHE PATH "Additional library path (single path only)")
if (NOT IIRC_DEP_INCLUDE STREQUAL "")
include_directories(${IIRC_DEP_INCLUDE})
message("Using additional include path: ${IIRC_DEP_INCLUDE}")
endif()
if (NOT IIRC_DEP_LIBRARY STREQUAL "")
link_directories(${IIRC_DEP_LIBRARY})
message("Using additional library path: ${IIRC_DEP_LIBRARY}")
endif()
# For GCC and Clang, basically.

@ -601,6 +601,9 @@ void IRCBase::exceptSSL_Expired(bool except)
void IRCBase::command(const std::string& command, const std::vector<std::string>& args, const std::string& msg)
{
if (!mp->isConnected)
return;
if (msg.empty())
mp->writeNoMsg(command, args);
else
@ -609,16 +612,25 @@ void IRCBase::command(const std::string& command, const std::vector<std::string>
void IRCBase::command(const std::string& command, const std::string& msg)
{
if (!mp->isConnected)
return;
mp->write(command, msg);
}
void IRCBase::raw(const std::string& data)
{
if (!mp->isConnected)
return;
mp->writeNoMsg(data, {});
}
void IRCBase::ctcp(const std::string& target, const std::string& command, const std::string& message)
{
if (!mp->isConnected)
return;
std::string ctcpdata;
ctcpdata.push_back(CTCPflag);
ctcpdata.append(command);

@ -5,6 +5,9 @@ http://www.idealirc.org/
Licensed under the GNU General Public License version 2.
See LICENSE for more licensing information.
Source code located at
https://git.idealirc.org/idealirc/idealirc
The goal for IdealIRC is to provide a modern compliance of the IRC protocol. It aims to be a simple IRC client
with only the bare minimum for comfort implemented. The intent is to extend the client using scripts.
@ -15,11 +18,12 @@ There is also IRCv3 support which fixes some of the issues with the protocol, su
- Multiple prefixes - Mitigates a bug in the IRC protocol where users with with multiple privileges only listed
the most significant privilege.
- Userhosts in /NAMES
For more info about IRCv3, visit https://ircv3.net/irc/
For more info about IRCv3, visit
https://ircv3.net/irc/
For general help with the client, visit
http://www.idealirc.org/wiki
For building instructions and source code documentation, visit
https://git.idealirc.org:3000/idealirc/idealirc/wiki/Home
https://git.idealirc.org/idealirc/idealirc/wiki/Home

Loading…
Cancel
Save