From c4d854d847fccf44fc2afbea6afb495fbe226b69 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Dec 2017 17:28:31 +0300 Subject: auth system to take control last, not first, allowing spam filters to kill auth requests --- src/mir_app/src/auth.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/auth.cpp b/src/mir_app/src/auth.cpp index 9c582bcfc6..bb55fc3a5e 100644 --- a/src/mir_app/src/auth.cpp +++ b/src/mir_app/src/auth.cpp @@ -346,11 +346,16 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) return 0; } +static void CALLBACK LaunchAuth() +{ + HookEvent(ME_DB_EVENT_ADDED, AuthEventAdded); +} + int LoadSendRecvAuthModule(void) { CreateServiceFunction(MS_AUTH_SHOWREQUEST, ShowReqWindow); CreateServiceFunction(MS_AUTH_SHOWADDED, ShowAddedWindow); - HookEvent(ME_DB_EVENT_ADDED, AuthEventAdded); + Miranda_WaitOnHandle(LaunchAuth); Skin_AddSound("AuthRequest", LPGENW("Alerts"), LPGENW("Authorization request")); Skin_AddSound("AddedEvent", LPGENW("Alerts"), LPGENW("Added event")); -- cgit v1.2.3