summaryrefslogtreecommitdiff
path: root/protocols/Twitter
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Twitter')
-rw-r--r--protocols/Twitter/src/proto.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 5ad228ab3e..b2992b22f4 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -324,8 +324,11 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM)
mir_sntprintf(descr, SIZEOF(descr), TranslateT("%s server connection"), m_tszUserName);
nlu.ptszDescriptiveName = descr;
m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
- if (m_hNetlibUser == 0)
- MessageBox(0, TranslateT("Unable to get Netlib connection for Twitter"), TranslateT("Twitter"), 0);
+ if (m_hNetlibUser == NULL) {
+ TCHAR error[200];
+ mir_sntprintf(error, SIZEOF(error), TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
+ MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ }
// Create avatar network connection (TODO: probably remove this)
char module[512];
@@ -334,8 +337,11 @@ int TwitterProto::OnModulesLoaded(WPARAM, LPARAM)
mir_sntprintf(descr, SIZEOF(descr), TranslateT("%s avatar connection"), m_tszUserName);
nlu.ptszDescriptiveName = descr;
hAvatarNetlib_ = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
- if (hAvatarNetlib_ == 0)
- MessageBox(0, TranslateT("Unable to get avatar Netlib connection for Twitter"), TranslateT("Twitter"), 0);
+ if (hAvatarNetlib_ == NULL) {
+ TCHAR error[200];
+ mir_sntprintf(error, SIZEOF(error), TranslateT("Unable to initialize Netlib for %s."), TranslateT("Twitter (avatars)"));
+ MessageBox(NULL, error, _T("Miranda NG"), MB_OK | MB_ICONERROR);
+ }
twit_.set_handle(this, m_hNetlibUser);