diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 16:50:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 16:50:53 +0000 |
commit | d57b6799dac75f3c428393666d079fe59361c4b5 (patch) | |
tree | 4bcb3de1b241e89c4dca03bd8b031bc17dbe9b56 /protocols | |
parent | 85e27141c915d057deeb4be6c4bc81d387c39be6 (diff) |
fixes for PS_SETAWAYMSG calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@13939 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/ICQCorp/src/services.cpp | 70 | ||||
-rw-r--r-- | protocols/Xfire/src/all_statusmsg.cpp | 13 |
3 files changed, 42 insertions, 42 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 3c9380a83c..2d0dfd6702 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -57,7 +57,6 @@ GGPROTO::GGPROTO(const char* pszProtoName, const TCHAR* tszUserName) : CreateProtoService(PS_SETMYAVATART, &GGPROTO::setmyavatar);
CreateProtoService(PS_GETMYAWAYMSG, &GGPROTO::getmyawaymsg);
- CreateProtoService(PS_SETAWAYMSG, (MyServiceFunc)&GGPROTO::SetAwayMsg);
CreateProtoService(PS_CREATEACCMGRUI, &GGPROTO::get_acc_mgr_gui);
CreateProtoService(PS_LEAVECHAT, &GGPROTO::leavechat);
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index d4c8379d75..ee34dc062f 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -536,54 +536,52 @@ char *CreateServiceName(char *serviceName, char *functionName) int LoadServices()
{
- char serviceName[MAX_PATH + 30];
+ char serviceName[MAX_PATH + 30];
- if (!icq.load()) return 1;
+ if (!icq.load()) return 1;
HookEvent(ME_DB_CONTACT_DELETED, icqContactDeleted);
- HookEvent(ME_OPT_INITIALISE, icqOptionsInitialise);
- HookEvent(ME_SYSTEM_MODULESLOADED, icqModulesLoaded);
-
- CreateServiceFunction(CreateServiceName(serviceName, PS_GETCAPS), icqGetCaps);
- CreateServiceFunction(CreateServiceName(serviceName, PS_GETNAME), icqGetName);
- CreateServiceFunction(CreateServiceName(serviceName, PS_LOADICON), icqLoadIcon);
- CreateServiceFunction(CreateServiceName(serviceName, PS_SETSTATUS), icqSetStatus);
- CreateServiceFunction(CreateServiceName(serviceName, PS_GETSTATUS), icqGetStatus);
- CreateServiceFunction(CreateServiceName(serviceName, PS_SETAWAYMSG), icqSetAwayMsg);
- CreateServiceFunction(CreateServiceName(serviceName, PS_AUTHALLOW), icqAuthAllow);
- CreateServiceFunction(CreateServiceName(serviceName, PS_AUTHDENY), icqAuthDeny);
- CreateServiceFunction(CreateServiceName(serviceName, PS_BASICSEARCH), icqBasicSearch);
- CreateServiceFunction(CreateServiceName(serviceName, PS_SEARCHBYEMAIL), icqSearchByEmail);
- CreateServiceFunction(CreateServiceName(serviceName, PS_SEARCHBYNAME), icqSearchByName);
-// CreateServiceFunction(MS_ICQ_SEARCHBYDETAILS, icqSearchByDetails);
- CreateServiceFunction(CreateServiceName(serviceName, PS_ADDTOLIST), icqAddToList);
-// CreateServiceFunction(CreateServiceName(serviceName, PS_ADDTOLISTBYEVENT), icqAddToListByEvent);
- CreateServiceFunction(CreateServiceName(serviceName, PS_FILERESUME), icqFileResume);
-
- CreateServiceFunction(CreateServiceName(serviceName, PSS_GETINFO), icqGetInfo);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_MESSAGE), icqSendMessage);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_URL), icqSendUrl);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_GETAWAYMSG), icqGetAwayMsg);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_FILE), icqSendFile);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_FILEALLOW), icqFileAllow);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_FILEDENY), icqFileDeny);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_FILECANCEL), icqFileCancel);
- CreateServiceFunction(CreateServiceName(serviceName, PSS_SETAPPARENTMODE), icqSetApparentMode);
-
- CreateServiceFunction(CreateServiceName(serviceName, PSR_MESSAGE), icqRecvMessage);
- CreateServiceFunction(CreateServiceName(serviceName, PSR_URL), icqRecvUrl);
+ HookEvent(ME_OPT_INITIALISE, icqOptionsInitialise);
+ HookEvent(ME_SYSTEM_MODULESLOADED, icqModulesLoaded);
+
+ CreateServiceFunction(CreateServiceName(serviceName, PS_GETCAPS), icqGetCaps);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_GETNAME), icqGetName);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_LOADICON), icqLoadIcon);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_SETSTATUS), icqSetStatus);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_GETSTATUS), icqGetStatus);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_SETAWAYMSG), icqSetAwayMsg);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_AUTHALLOW), icqAuthAllow);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_AUTHDENY), icqAuthDeny);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_BASICSEARCH), icqBasicSearch);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_SEARCHBYEMAIL), icqSearchByEmail);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_SEARCHBYNAME), icqSearchByName);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_ADDTOLIST), icqAddToList);
+ CreateServiceFunction(CreateServiceName(serviceName, PS_FILERESUME), icqFileResume);
+
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_GETINFO), icqGetInfo);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_MESSAGE), icqSendMessage);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_URL), icqSendUrl);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_GETAWAYMSG), icqGetAwayMsg);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_FILE), icqSendFile);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_FILEALLOW), icqFileAllow);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_FILEDENY), icqFileDeny);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_FILECANCEL), icqFileCancel);
+ CreateServiceFunction(CreateServiceName(serviceName, PSS_SETAPPARENTMODE), icqSetApparentMode);
+
+ CreateServiceFunction(CreateServiceName(serviceName, PSR_MESSAGE), icqRecvMessage);
+ CreateServiceFunction(CreateServiceName(serviceName, PSR_URL), icqRecvUrl);
CreateServiceFunction(CreateServiceName(serviceName, PSR_AWAYMSG), icqRecvAwayMsg);
CreateServiceFunction(CreateServiceName(serviceName, PSR_FILE), icqRecvFile);
- return 0;
+ return 0;
}
///////////////////////////////////////////////////////////////////////////////
int UnloadServices()
{
- icq.unload();
- return 0;
+ icq.unload();
+ return 0;
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Xfire/src/all_statusmsg.cpp b/protocols/Xfire/src/all_statusmsg.cpp index d08db0920f..6387f5a798 100644 --- a/protocols/Xfire/src/all_statusmsg.cpp +++ b/protocols/Xfire/src/all_statusmsg.cpp @@ -259,14 +259,15 @@ BOOL SetGameStatusMsg() XFireLog("-> SetStatusMsg of %s with Miranda with occupied status.", protoname->at(i).c_str());
//statusmsg für beschäftigt setzen
- CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, oltostatus->at(i), (LPARAM)statusMsg);
+ ptrW wszStatus(mir_a2u(statusMsg));
+ CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, oltostatus->at(i), wszStatus);
//status auf beschäftigt wechseln
CallProtoService(temp[i]->szModuleName, PS_SETSTATUS, oltostatus->at(i), 0);
//statusmsg für beschäftigt setzen
if (CallProtoService(temp[i]->szModuleName, PS_GETSTATUS, 0, 0) != oltostatus->at(i))
{
XFireLog("Set StatusMsg again, Status was not succesfully set.");
- CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, oltostatus->at(i), (LPARAM)statusMsg);
+ CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, oltostatus->at(i), wszStatus);
}
}
}
@@ -274,7 +275,8 @@ BOOL SetGameStatusMsg() {
XFireLog("-> SetStatusMsg of %s.", protoname->at(i).c_str());
- CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), (LPARAM)statusMsg);
+ ptrW wszStatus(mir_a2u(statusMsg));
+ CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), wszStatus);
}
}
}
@@ -293,18 +295,19 @@ BOOL SetOldStatusMsg() {
if (olstatus->at(i) != -1)
{
+ ptrW wszStatus(mir_a2u(olstatusmsg->at(i).c_str()));
if (statustype)
{
//alten status setzen
CallProtoService(temp[i]->szModuleName, PS_SETSTATUS, olstatus->at(i), 0);
//status wurde nicht gewechselt, dann statusmsg nachträglich setzen
if (CallProtoService(temp[i]->szModuleName, PS_GETSTATUS, 0, 0) != olstatus->at(i))
- CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), (LPARAM)olstatusmsg->at(i).c_str());
+ CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), wszStatus);
}
else
{
CallProtoService(temp[i]->szModuleName, PS_SETSTATUS, olstatus->at(i), 0);
- CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), (LPARAM)olstatusmsg->at(i).c_str());
+ CallProtoService(temp[i]->szModuleName, PS_SETAWAYMSG, olstatus->at(i), wszStatus);
}
}
}
|