diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-06-30 15:07:52 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-06-30 15:07:52 +0000 |
commit | a68efd9f17a4255a22d7e63741d723f986b23d0e (patch) | |
tree | 619b53eb47952b0b9a1eaa7d3324cbba23e28560 /MySpace/MySpace.cpp | |
parent | 16827df7bc4a82d74f89dc81631bd2a7d05f3121 (diff) |
download buddies
set status on server
added away and invisible status
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@221 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/MySpace.cpp')
-rw-r--r-- | MySpace/MySpace.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/MySpace/MySpace.cpp b/MySpace/MySpace.cpp index cb1da5d..aa229b5 100644 --- a/MySpace/MySpace.cpp +++ b/MySpace/MySpace.cpp @@ -60,6 +60,19 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { return 0;
}
+void SetAllOffline() {
+ char *proto;
+ HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ while ( hContact != NULL )
+ {
+ proto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM )hContact,0 );
+ if ( proto && !strcmp( MODULE, proto)) {
+ DBWriteContactSettingWord(hContact, MODULE, "Status", ID_STATUS_OFFLINE);
+ }
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
+ }
+}
+
HANDLE hModulesLoaded;
extern "C" __declspec (dllexport) int Load(PLUGINLINK *link) {
DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0 );
@@ -76,6 +89,8 @@ extern "C" __declspec (dllexport) int Load(PLUGINLINK *link) { RegisterProto();
CreateProtoServices();
+ SetAllOffline();
+
// hook modules loaded
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
return 0;
|