Author Topic: New protocol: Dummy  (Read 7068 times)

0 Members and 1 Guest are viewing this topic.

Offline Vulpix

New protocol: Dummy
« on: 16 09 2014, 12:27:46 »
Hello all!

I'm curious how difficult it would be to implement a "Dummy" protocol.

For example, in case a protocol is retired (Skype, soon-to-be MSN, who knows what else) and the related plugin is unloaded (either by user or because it's deprecated), you will end up with history that is rather unreadable.



With the kernel metacontacts, a dummy protocol would be a way to create a "dummy" contact for the sole purpose of changing it into a metacontact.

This "Dummy" protocol would never be retired as it wouldn't really require anything special. It should support all of the database events and there should be a way to migrate to it - just like you currently can when a protocol is retired:



Since the protocol would really be a dummy, I doubt there would be much to code as there will be no need to connect to anything, authenticate etc.

A super ultra utopia scifi that will never happen - the protocol is used proprietarily by miranda to sync chats across mutliple devices :D

Thoughts?
 

Offline Robyer

Re: New protocol: Dummy
« Reply #1 on: 16 09 2014, 17:00:58 »
Sounds interesting... but I'm not sure how real could be implementation, because you need to handle different user IDs, names, etc.
But yeah, some kind of Dummy protocol could be useful :-)
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Robyer

Re: New protocol: Dummy
« Reply #2 on: 18 09 2014, 09:35:28 »
Ok, I implemented this Dummy Protocol.

You can try and get it here: https://www.dropbox.com/s/lf2vmmt2nq8wae3/DummyProto.7z?dl=0

How it works? Just upgrade your unloaded protocol to this Dummy one through Account manager. Then you can also set there Setting and Name of unique setting of that protocol. This is to handle contact IDs (to show them it in Tipper, etc.).
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Vulpix

Re: New protocol: Dummy
« Reply #3 on: 18 09 2014, 11:33:14 »
Hello Robyer!

Yeah, something like this! We're getting there :D

I have two issues;

a) it's not possible to create a metacontact out of the dummy contact (after conversion, for example). It complains about missing UIDs
b) the database entry for the contact remains with "SKYPE" protocol, instead of dummy; even though I can now properly see the history.
c) it's not possible to upgrade multiple accounts into the same dummy protocol. I agree that being able to use metacontacts will act the same way, but just curious how difficult it would be to implement that.

Thanks for the effort! Much appreciated~

Also, cute "dummy" protocol icon for old skype. When I converted an IRC account into a dummy, it retained the IRC protocol icon.

Post Merge: 18 09 2014, 11:38:19
Edit:

Moreover, I have another question. Would it be possible to make it so that you can "upgrade" any account; not just a deprecated one? I.e. if MSN is still working but I no longer want to use it, but I wish to retain the histories; I want to be able to "upgrade" it to dummy as well - but it's not possible right now.
« Last Edit: 18 09 2014, 11:38:19 by Vulpix »
 

Offline Robyer

Re: New protocol: Dummy
« Reply #4 on: 18 09 2014, 12:51:03 »
a) it's not possible to create a metacontact out of the dummy contact (after conversion, for example). It complains about missing UIDs
Have you set correctly that unique id setting in dummy account options?  ;)

b) the database entry for the contact remains with "SKYPE" protocol, instead of dummy; even though I can now properly see the history.
Yes, that's correct internal name of that account and that won't change.

c) it's not possible to upgrade multiple accounts into the same dummy protocol. I agree that being able to use metacontacts will act the same way, but just curious how difficult it would be to implement that.
Of course it isn't possible, because that wouldn't be "upgrade", but "merge". And "merge" is not possible and it won't be implemented (it would be complicated and not worth it). ;)

Also, cute "dummy" protocol icon for old skype. When I converted an IRC account into a dummy, it retained the IRC protocol icon.
AFAIK it depends on many factors (protocol name, internal name, custom settings...) so if you want to change icons for account, feel free to do it manually in Options / Icons.

Moreover, I have another question. Would it be possible to make it so that you can "upgrade" any account; not just a deprecated one? I.e. if MSN is still working but I no longer want to use it, but I wish to retain the histories; I want to be able to "upgrade" it to dummy as well - but it's not possible right now.
Yes. Just disable MSN.dll, restart and you'll be able to "upgrade" MSN accounts.
« Last Edit: 18 09 2014, 13:00:22 by Robyer »
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Vulpix

Re: New protocol: Dummy
« Reply #5 on: 18 09 2014, 13:51:43 »
Have you set correctly that unique id setting in dummy account options?  ;)
Yup. "DummySky" and "DummyText". Does it have problems with capital letters?

Yes, that's correct internal name of that account and that won't change.
I see! Fair enough.

Of course it isn't possible, because that wouldn't be "upgrade", but "merge". And "merge" is not possible and it won't be implemented (it would be complicated and not worth it). ;)
Fair enough! After all, the Dummy protocol will take care of it; no problem having several dummies :P

AFAIK it depends on many factors (protocol name, internal name, custom settings...) so if you want to change icons for account, feel free to do it manually in Options / Icons.

Yes. Just disable MSN.dll, restart and you'll be able to "upgrade" MSN accounts.
Oooh. Handy. Thanks!
 

Offline Robyer

Re: New protocol: Dummy
« Reply #6 on: 18 09 2014, 14:44:33 »
Yup. "DummySky" and "DummyText".

That's the problem. You must use setting name of original protocol. Open dbeditor and see what name has field with id of skype contact.
EDIT: I think it should be "sid" for Skype proto.
« Last Edit: 18 09 2014, 14:46:36 by Robyer »
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Robyer

Re: New protocol: Dummy
« Reply #7 on: 19 09 2014, 10:02:44 »
I wrote a simple explanation and usage to our wiki: http://wiki.miranda-ng.org/index.php?title=Plugin:Dummy/en
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline Vulpix

Re: New protocol: Dummy
« Reply #8 on: 24 09 2014, 05:44:08 »
Thanks for this protocol, Robyer!

It's working as expected, or I haven't seen any big issues with it so far.

There are some bugs though.

When you open the account manager and select any dummy protocol (if you have more than one), you will see the following:

<account name>
Protocol: Dummy
<unique ID text>:<unique id>

So for example for Skype (skypekit), I put a "D" in front of whatever the unique ID is. Therefore, I would see this:

DummySkype
Protocol: Dummy
Dsid: (my actual old skype id)

That's all good. However! Here is where an issue occurs:

1)
If you select any other dummy protocol, they will all have "Dsid" in the <unique id text> list.

So for example if I select "DummyYahoo" account, I expect to see Dyahoo_id in the <unique ID text> because that's what I put in when I first made the account.

But instead, it is using the Dsid.

I noticed that it will always show the Unique ID text of the first dummy account you select; so the situation would be reversed if I first clicked on the DummyYahoo and then on DummySkype. I assume some variable is set globally and not unset/freed or something.

2)
The unique ID is only shown correctly for Skype, it seems - the other protocols just say "<unknown>" in the unique ID on the protocol account screen. The protocol itself works fine though (or at least I hope it does; I haven't seen it misbehave though).
 

Offline Robyer

Re: New protocol: Dummy
« Reply #9 on: 24 09 2014, 12:02:36 »
Hi, you're right about global variable. I fixed it so you can try it tomorrow. Probably it will fix also the second problem ;-)
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.