diff options
author | George Hazan <ghazan@miranda.im> | 2023-01-28 19:58:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-01-28 19:58:25 +0300 |
commit | 3e00af6e0b04bca9e5398f250c7dd4280da608cc (patch) | |
tree | c435ee6859581a5226a9af4bcc989cf07196d115 /include/m_chat.h | |
parent | 11fbe8d4d458c856dcbf7e6d18561b467ef368d3 (diff) |
IRC: fix for event broadcasting
Diffstat (limited to 'include/m_chat.h')
-rw-r--r-- | include/m_chat.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/m_chat.h b/include/m_chat.h index 096811cf3c..5cb316087a 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -354,12 +354,17 @@ MIR_APP_DLL(struct SESSION_INFO*) Chat_NewSession( #define GCEF_SILENT 0x0002 // never add to log
#define GCEF_NOTNOTIFY 0x0004
#define GCEF_UTF8 0x0008
+#define GCEF_BROADCAST 0x0010 // means that pszModule is used
struct SESSION_INFO;
struct GCEVENT
{
- SESSION_INFO *si; // session to deal with
+ union {
+ SESSION_INFO *si; // session to deal with
+ const char *pszModule; // module name to broadcast
+ };
+
int iType; // Use GC_EVENT_* as defined above. Only one event per service call.
MAllCStrings pszText; //
@@ -414,11 +419,12 @@ MIR_APP_DLL(int) Chat_SetStatusEx(SESSION_INFO *si, int flags, const wchar_t *ws #define WINDOW_HIDDEN 3 // close the room window. Session is not terminated.
#define WINDOW_CLEARLOG 6 // clear the log of the room window
-// if wszId == NULL, this message is broadcasted to all windows of specified szModule
MIR_APP_DLL(int) Chat_Control(SESSION_INFO *si, int command);
+MIR_APP_DLL(int) Chat_Terminate(SESSION_INFO *si, bool bRemoveContact = false);
+// these functions broadcast a command to all windows of specified szModule
+MIR_APP_DLL(int) Chat_Control(const char *szModule, int command);
MIR_APP_DLL(int) Chat_Terminate(const char *szModule, bool bRemoveContact = false);
-MIR_APP_DLL(int) Chat_Terminate(SESSION_INFO *si, bool bRemoveContact = false);
/////////////////////////////////////////////////////////////////////////////////////////
// Use this function to get information on different aspects of the sessions that are registered with Chat.
|