int Chat_Load() { CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Messaging")_T("/")LPGENT("Group chats"), FONTMODE_SKIP }; mir_getCI(&data); saveCI = *pci; pci->OnCreateModule = OnCreateModule; pci->OnNewUser = OnNewUser; pci->OnLoadSettings = OnLoadSettings; pci->OnSetStatus = OnSetStatus; pci->OnAddLog = OnAddLog; pci->OnRemoveSession = OnRemoveSession; pci->OnRenameSession = OnRenameSession; pci->OnReplaceSession = OnReplaceSession; pci->OnDblClickSession = OnDblClickSession; pci->OnEventBroadcast = OnEventBroadcast; pci->OnSetStatusBar = OnSetStatusBar; pci->OnFlashWindow = OnFlashWindow; pci->OnFlashHighlight = OnFlashHighlight; pci->ShowRoom = ShowRoom; pci->DoPopup = DoPopup; pci->DoTrayIcon = DoTrayIcon; pci->ReloadSettings(); g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU)); TranslateMenu(g_hMenu); return 0; }
extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); mir_getCLI(); AddIcons(); RegisterFonts(); CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Chat module"), FONTMODE_SKIP }; mir_getCI(&data); saveCI = *pci; pci->OnAddUser = OnAddUser; pci->OnNewUser = OnNewUser; pci->OnRemoveUser = OnRemoveUser; pci->OnAddStatus = OnAddStatus; pci->OnSetStatus = OnSetStatus; pci->OnSetTopic = OnSetTopic; pci->OnAddLog = OnAddLog; pci->OnClearLog = OnClearLog; pci->OnCreateModule = OnCreateModule; pci->OnOfflineSession = OnOfflineSession; pci->OnRemoveSession = OnRemoveSession; pci->OnRenameSession = OnRenameSession; pci->OnReplaceSession = OnReplaceSession; pci->OnDblClickSession = OnDblClickSession; pci->OnEventBroadcast = OnEventBroadcast; pci->OnLoadSettings = OnLoadSettings; pci->OnSetStatusBar = OnSetStatusBar; pci->OnFlashWindow = OnFlashWindow; pci->OnFlashHighlight = OnFlashHighlight; pci->ShowRoom = ShowRoom; pci->DoPopup = DoPopup; pci->DoTrayIcon = DoTrayIcon; pci->ReloadSettings(); g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU)); LoadIcons(); TabsInit(); HookEvent(ME_OPT_INITIALISE, OptionsInitialize); HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); return 0; }
static int OnLoadInit(WPARAM, LPARAM) { mir_getCI(NULL); CMenuItem mi; mi.position = -0x7FFFFFFF; mi.flags = CMIF_TCHAR; mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); mi.name.t = LPGENT("Custom contact sound"); mi.pszService = "XSoundNotify/ContactMenuCommand"; hChangeSound = Menu_AddContactMenuItem(&mi); InitSelfSounds(); return 0; }
int Chat_Load() { CheckUpdate(); CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Message Sessions")_T("/")LPGENT("Group chats"), FONTMODE_ALTER }; mir_getCI(&data); saveCI = *pci; pci->OnCreateModule = OnCreateModule; pci->OnNewUser = OnNewUser; pci->OnSetStatus = OnSetStatus; pci->OnSetTopic = OnSetTopic; pci->OnAddLog = OnAddLog; pci->OnCreateSession = OnCreateSession; pci->OnRemoveSession = OnRemoveSession; pci->OnRenameSession = OnRenameSession; pci->OnReplaceSession = OnReplaceSession; pci->OnDblClickSession = OnDblClickSession; pci->OnEventBroadcast = OnEventBroadcast; pci->OnSetStatusBar = OnSetStatusBar; pci->OnChangeNick = OnChangeNick; pci->ShowRoom = ShowRoom; pci->OnLoadSettings = OnLoadSettings; // this operation is unsafe, that's why we restore the old pci state on exit pci->DoSoundsFlashPopupTrayStuff = DoSoundsFlashPopupTrayStuff; pci->IsHighlighted = IsHighlighted; pci->LogToFile = LogToFile; pci->DoPopup = DoPopup; pci->ShowPopup = ShowPopup; pci->Log_CreateRtfHeader = Log_CreateRtfHeader; pci->UM_CompareItem = UM_CompareItem; pci->ReloadSettings(); g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU)); g_Settings.Highlight = new CMUCHighlight(); return 0; }