/* yaRelay.cpp Yet Another Relay plugin. v.0.0.0.3 This plugin forwards all incoming messages to any contact. Features: - Forwards all messages from any specified contact (or from all contacts) - Works only if your status is equals to specified (of set of statuses) - Could be specified any template for sent messages - Original message could be split up (by size) - Could be specified number of split parts to send - Incoming message could be marked as 'read' (optional) - Outgoing messages could be saved in history (optional) (c)2005 Anar Ibragimoff (ai91@mail.ru) */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include "resource.h" #include "version.h" #define STATUS_OFFLINE 0x1 #define STATUS_ONLINE 0x2 #define STATUS_AWAY 0x4 #define STATUS_NA 0x8 #define STATUS_OCCUPIED 0x10 #define STATUS_DND 0x20 #define STATUS_FREECHAT 0x40 #define STATUS_INVISIBLE 0x80 #define MAXTEMPLATESIZE 1024 #define MODULENAME "yaRelay" struct CMPlugin : public PLUGIN { CMPlugin(); int Load() override; }; extern MCONTACT hForwardFrom, hForwardTo; extern wchar_t tszForwardTemplate[MAXTEMPLATESIZE]; extern int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus; struct MESSAGE_PROC { HANDLE hProcess; char *msgText; int retryCount; }; extern LIST arMessageProcs; int OptionsInit(WPARAM wParam, LPARAM);