mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
@@ -82,9 +82,9 @@ protected:
|
||||
CClient* m_pClient;
|
||||
};
|
||||
|
||||
class CClient : public CZNCSock {
|
||||
class CClient : public CIRCSocket {
|
||||
public:
|
||||
CClient() : CZNCSock() {
|
||||
CClient() : CIRCSocket() {
|
||||
m_pUser = NULL;
|
||||
m_pNetwork = NULL;
|
||||
m_bGotPass = false;
|
||||
|
||||
@@ -30,7 +30,8 @@ class CIRCNetwork;
|
||||
class CClient;
|
||||
// !Forward Declarations
|
||||
|
||||
class CIRCSock : public CZNCSock {
|
||||
// TODO: This class needs new name
|
||||
class CIRCSock : public CIRCSocket {
|
||||
public:
|
||||
CIRCSock(CIRCNetwork* pNetwork);
|
||||
virtual ~CIRCSock();
|
||||
|
||||
@@ -220,4 +220,37 @@ protected:
|
||||
CModule* m_pModule; //!< pointer to the module that this sock instance belongs to
|
||||
};
|
||||
|
||||
/**
|
||||
* @class CIRCSocket
|
||||
* @brief Base IRC socket for client<->ZNC, and ZNC<->server
|
||||
*/
|
||||
class CIRCSocket : public CZNCSock {
|
||||
public:
|
||||
#ifdef HAVE_ICU
|
||||
/**
|
||||
* @brief Allow IRC control characters to appear even if protocol encoding explicitly disallows them.
|
||||
*
|
||||
* E.g. ISO-2022-JP disallows 0x0F, which in IRC means "reset format",
|
||||
* so by default it gets replaced with U+FFFD ("replacement character").
|
||||
* https://code.google.com/p/chromium/issues/detail?id=277062#c3
|
||||
*
|
||||
* In case if protocol encoding uses these code points for something else, the encoding takes preference,
|
||||
* and they are not IRC control characters anymore.
|
||||
*/
|
||||
void IcuExtToUCallback(
|
||||
UConverterToUnicodeArgs* toArgs,
|
||||
const char* codeUnits,
|
||||
int32_t length,
|
||||
UConverterCallbackReason reason,
|
||||
UErrorCode* err) override;
|
||||
void IcuExtFromUCallback(
|
||||
UConverterFromUnicodeArgs* fromArgs,
|
||||
const UChar* codeUnits,
|
||||
int32_t length,
|
||||
UChar32 codePoint,
|
||||
UConverterCallbackReason reason,
|
||||
UErrorCode* err) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* SOCKET_H */
|
||||
|
||||
Reference in New Issue
Block a user