Shoutbox

NickChange Plugin - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: NickChange Plugin (/showthread.php?tid=51412)

NickChange Plugin by J-Thread on 10-05-2005 at 11:29 AM

New!!
NickChange has been released as a script for Messenger Plus! Live.

After a lot of research, testing, chatting and mailing with other plugin writers, I've finally finished a version of NickChange that is good enough to publish.

It has been written in C#, and that was the problem, but I hope a lot of people will test this betá version and give me clues, so I can finally find out what the problem really is. But, off course it does also work on a lot of pc's.

The bugs I know right now are:
-If doesn't work together with other .NET plugins. I think it's a bug in msgplus, so I'll contact Patchou about that. I tested together with Music Logger Plus!, and when MLP is loaded, NickChange will not load. When you turn off MLP, NickChange is loaded. Please reply here if you are able to load 2 or more .NET (C# and VB.NET) plugins together. It could help me.

-It doesn't seem to work at windows 98 pc's. My guess is you need Windows Messenger for it. I didn't test on a windows 98 machine with Windows Messenger, so I'm not sure. Please reply here if you are able to use NickChange on a Windows 98 machine. Please check if you have the Windows Messenger and tell me(Y).

If you use Windows XP and don't use other plugins, this should be working properly. If not, please tell me, it can help me! When replying here, please include your windows version, msn version, msgplus version and a list of other plugins you use. Off course if you notice other bugs or spelling mistakes (my english isn't that good) you can just tell me, I don't need your windows version to correct my spelling mistake;)

Features:
With this plugin, you can:
-Make a list with nicknames
-Let your nickname change every "time interval" (ie 10 seconds, or a day) according to this list
-Let your names change randomly or ordered (you could tell a store by change your name to a new line of the story every 10 seconds)
-Turn the plugin on and off
-Restore your old name when you turn the plugin off
-The plugin will stay on when you close msn messenger (or even your pc) and will continue the next time you sign in
-It can also write to the event log when it has been turned on and off
-Display the status of the plugin (off or on, and if it's on, displays the interval etc.)

Available commands:
/xncabout - displays the about window
/xncadd - Adds a name to the list
/xncon - Turn NickChange on
/xncoff - Turn NickChange off
/xncoption - Display the options window, that is also displayed when turning the plugin on
/xncstatus - Displays the actual status of the plugin (On or Off, and if on then Interval etc)

UPDATE: I've updated the file to version 0.95. You can use this installer as an update, it'll overwrite the old one so there's no need of uninstalling it first. The update includes the following:

-A few bugs have been solved
-There is now an option to let NickChange log when it is turned on and off. To let this work, your msgplus option to make an Event Log has to be on also. It'll log when it's turned on, and when it's turned off.
-There is an option to let NickChange read the names file ({installdir}/{youremail}.txt) every time when the name is changed. This may slow down your computer, only use this option when you really need it (for example when another proces writes something to a file every time). By default, NickChange reads the file at initialize

Update 2:
The version is now 0.96. There was a little bug in the setup, so people with multiple framework versions couldn't install the plugin. I've also included a check for the msgplus api version, so the version to log to plus will be disabled when that isn't possible.

Jeroen A.K.A. J-Thread


RE: NickChange Plugin by Supersonicdarky on 10-05-2005 at 11:32 AM

downloading...

will look for bugs :)


RE: NickChange Plugin by [MR] on 10-05-2005 at 11:38 AM

i will download it too...


RE: NickChange Plugin by L. Coyote on 10-05-2005 at 01:32 PM

Well, I installed, set it up and everything...

But the nick doesn't change... :P

Tested without other plugins running, same thing.

Versions:
Windows Version: Windows XP, 5.01.2600
Messenger Client Version: 7.0.0816
Messenger Plus! Version: 3.61.0145


RE: NickChange Plugin by J-Thread on 10-05-2005 at 02:57 PM

Are you sure there are some Nicknames in the list to change to? Do /xncoption and look at Nicknames if there is at least one nickname in the list.

Also, the first change is actually AFTER "Interval", so not immediately. So if you set Interval to Daily, tomorrow will be the first time it does change...

And just to check, you did turn it on do you? By the way, you can always check the status with /xncstatus, it should give a toast telling you it's on and the interval. Btw, sometimes turn it off and on again may work....


RE: NickChange Plugin by L. Coyote on 10-05-2005 at 03:11 PM

quote:
Originally posted by J-Thread
And just to check, you did turn it on do you?
Didn't know it had an on/off option... :P It should be on the dialog too, imo.

Anyway, nice work. (Y)
RE: NickChange Plugin by remkot on 10-05-2005 at 03:24 PM

on/off option? Where can i find it?


RE: NickChange Plugin by J-Thread on 10-05-2005 at 03:29 PM

Thought it wouldn't be that difficult...:S I'll include a readme file in the final version.

Available commands:
/xncabout - displays the about window
/xncadd - Adds a name to the list
/xncon - Turn NickChange on
/xncoff - Turn NickChange off
/xncoption - Display the options window, that is also displayed when turning the plugin on
/xncstatus - Displays the actual status of the plugin (On or Off, and if on then Interval etc)

All those commands can also be found in the Plus! menu.. Plus! -> Plugins -> NickChange Plugin

By the way, when you do /xncon, you see the options menu again. When you click Cancel there, off course the plugin isn't turned on!


RE: NickChange Plugin by remkot on 10-05-2005 at 04:50 PM

I'm so sorry for my supid questions, but where i can fill in the command's?

I have open a confrontation screen (" dutch" gesprek's venster)
then i'ts works fine. But can i set the commando's white oute the confrontation screen (" dutch" gesprek's venster)? So yes, please thel me please where to put it.

Sorry, but this is my first plugin that i install.
And sorry for my bad english.

Keep up the good job!

Greeds remko


RE: NickChange Plugin by CookieRevised on 10-05-2005 at 04:57 PM

Commands are always meant to be entered in a conversation screen. There is no other way to invoke a command (unless the plugin in question has some buttons for those commands or something in the preferences dialog of that plugin.)


RE: NickChange Plugin by remkot on 10-05-2005 at 05:02 PM

Oke, thank you ferry mutch.

Thank it's works all everything allright!!!!!

Thank you!!!!

Gr remko


RE: NickChange Plugin by J-Thread on 10-10-2005 at 10:47 AM

The file has been updated! Please install the new version and test it. See my first post for the changes(Y)

I think the release of the final version will be soon(Y)


RE: NickChange Plugin by remkot on 10-10-2005 at 03:09 PM

I going test it :-))


RE: NickChange Plugin by n0n4m3 on 11-06-2005 at 06:01 AM

There's a problem with the installer when you have more than one .net framework installed. It was searching for RegAsm.exe file in my $WINDOWSDIR\Microsoft.Net\Framework but since I have different versions, the RegAsm.exe isn't in this folder.

When we have different versions of .Net Framework the RegAsm.exe will be located at $WINDOWSDIR\Microsoft.Net\Framework\vx.x.xxxx

In my case it was in:
$WINDOWSDIR\Microsoft.Net\Framework\v1.1.4322
or
$WINDOWSDIR\Microsoft.Net\Framework\v2.0.50215


RE: NickChange Plugin by J-Thread on 11-06-2005 at 07:31 AM

Strange, it should take:

$WINDOWSDIR\Microsoft.Net\Framework\v2.0.50215

What was the error you got? My setup uses some registry values to get the latest framework version (v2.0.50215 in your case) so the other directory shouldn't be used...

The regasm.exe is always in a subfolder in the folder framework, so it isn't because of your 2 version... I'll talk to you at msn about this later today, it is interesting(Y)


RE: NickChange Plugin by n0n4m3 on 11-06-2005 at 02:12 PM

First it says that this program needs the .NET Framework and that it wasn't found on my system and if I choose to bypass the downloading and installation of the .NET Framework, it will give me the error that RegAsm.exe wasn't found at $WINDOWSDIR\Microsoft.NET\Framework\


RE: NickChange Plugin by J-Thread on 11-06-2005 at 02:34 PM

Ok thanks to n0n4m3, the bug is fixed! Take a look at my first post for the new version :-).

About the release of the final version, I will not release it untill I'm sure about what the problem is with multiple C# plugins... n0n4m3 is doing some tests and I'll talk with him about it, so I hope we can finally figure out what the problem is :-)


RE: NickChange Plugin by TazDevil on 11-06-2005 at 10:41 PM

hey J-Thread
i have an article for you to study about C# plugins although i dont understand much of it, cause i dont have time to learn how C# works, so, i thought to pass it on to you, you should understand better...

Anyways, in this article it says that

quote:
Does your app need to unload or reload plug-ins while it's running? Does your app need to control the security access that plug-ins have to files and other resources? If you answer yes to either question, you'll need AppDomains.

In the .NET Framework, there's no way to directly unload an assembly. The only way is to load the assembly into a separate AppDomain, then unload the whole AppDomain. Each AppDomain can also have its own security permissions. AppDomains provide a processing unit with the isolation usually afforded by separate processes, without the overhead, and multiple AppDomains can exist within the same process. AppDomains are typically used in server apps, where the server runs 24/7 or nearly so, and needs to load and unload components on the fly without restarting. AppDomains are also used to limit the permission that plug-ins are granted, so that an application can load untrusted components without fear of them doing something malevolent. To enable this isolation, using multiple AppDomains requires remoting; objects in different AppDomains can't call each other directly, they must be marshaled across the AppDomain boundary. In particular, shared instances of classes must derive from MarshalByRefObject.

So right now heh you cannot unload/reload C# plugins unless you build them in such a way and Plus is developed in such a way

And i would suggest to you to work with Patchou and pass this article to him, if the implemetation of this kind works, maybe you could work it out ;)

Check the article here, and tell me if it works for you....
Article Link

Also read http://blogs.msdn.com/jasonz/archive/2004/05/31/145105.aspx
That probably could be linked to why you cant load more than 1 C# plugin...

Wierd enough your dll doesnot show in the loaded modules list althought the actual plugin is loaded in plus! Only the .Net framework files are loaded ...
RE: RE: NickChange Plugin by n0n4m3 on 11-06-2005 at 11:20 PM

quote:
Originally posted by TazDevil
hey J-Thread
i have an article for you to study about C# plugins although i dont understand much of it, cause i dont have time to learn how C# works, so, i thought to pass it on to you, you should understand better...

Anyways, in this article it says that
quote:
Does your app need to unload or reload plug-ins while it's running? Does your app need to control the security access that plug-ins have to files and other resources? If you answer yes to either question, you'll need AppDomains.

In the .NET Framework, there's no way to directly unload an assembly. The only way is to load the assembly into a separate AppDomain, then unload the whole AppDomain. Each AppDomain can also have its own security permissions. AppDomains provide a processing unit with the isolation usually afforded by separate processes, without the overhead, and multiple AppDomains can exist within the same process. AppDomains are typically used in server apps, where the server runs 24/7 or nearly so, and needs to load and unload components on the fly without restarting. AppDomains are also used to limit the permission that plug-ins are granted, so that an application can load untrusted components without fear of them doing something malevolent. To enable this isolation, using multiple AppDomains requires remoting; objects in different AppDomains can't call each other directly, they must be marshaled across the AppDomain boundary. In particular, shared instances of classes must derive from MarshalByRefObject.

So right now heh you cannot unload/reload C# plugins unless you build them in such a way and Plus is developed in such a way

And i would suggest to you to work with Patchou and pass this article to him, if the implemetation of this kind works, maybe you could work it out ;)

Check the article here, and tell me if it works for you....
Article Link

Also read http://blogs.msdn.com/jasonz/archive/2004/05/31/145105.aspx
That probably could be linked to why you cant load more than 1 C# plugin...

Wierd enough your dll doesnot show in the loaded modules list althought the actual plugin is loaded in plus! Only the .Net framework files are loaded ...


Hey,
Curious that I read this article yesterday and it illuminated me! I finally found a way to unload/load a C# plugin :D The solution is to unload the appdomain of your plugin like this (if you're executing code in your plugin, otherwise you have to find you plugin appdomain and unload it): AppDomain.Unload(AppDomain.CurrentDomain);

Maybe I'll do a simple plugin tomorrow or the day after tomorrow because now I'm getting an alpha version of a plugin I'm developing for plus :)
RE: NickChange Plugin by TazDevil on 11-06-2005 at 11:34 PM

quote:
Originally posted by n0n4m3
Hey,
Curious that I read this article yesterday and it illuminated me! I finally found a way to unload/load a C# plugin :D The solution is to unload the appdomain of your plugin like this (if you're executing code in your plugin, otherwise you have to find you plugin appdomain and unload it): AppDomain.Unload(AppDomain.CurrentDomain);

Maybe I'll do a simple plugin tomorrow or the day after tomorrow because now I'm getting an alpha version of a plugin I'm developing for plus :)
Ok, so now you need to unload your appdomain, in the Unintialize() method or whatever so when it is called, (when changing email account and when closing and reloading) by calling this command maybe...

And let me know in the reloader thread if it works ;)
RE: NickChange Plugin by n0n4m3 on 11-06-2005 at 11:45 PM

Damn!
False alarm :( I was doing some tests and now it doesn't work, I guess I didn't have the plugin loaded or something. The AppDomain is unloaded but for some reason the dll file isn't released.


RE: NickChange Plugin by Lou on 11-07-2005 at 12:07 AM

sorry for looking stupid but it says nowhere in this thread what this plugin actually does..so tell me, what does it do exactly?


RE: RE: NickChange Plugin by n0n4m3 on 11-07-2005 at 01:01 AM

quote:
Originally posted by lou_habs
sorry for looking stupid but it says nowhere in this thread what this plugin actually does..so tell me, what does it do exactly?


This plugin allows you to have a personalized list of nicks and change to one of them automatically from time to time or manually when you want. There's also the options to:
- change nicks sequentially or randomly accordingly to their order in the nicks' list.
- restore the old name when turned off
- write to event log
RE: RE: NickChange Plugin by J-Thread on 11-07-2005 at 08:19 AM

quote:
Originally posted by lou_habs
sorry for looking stupid but it says nowhere in this thread what this plugin actually does..so tell me, what does it do exactly?


At the first release there was another thread with a discussion about this, but it is indeed a good idea to write down the features here. So I've updated my first post;)

About the reloading etc, I don't have much time at the moment to test it, but I will keep it in mind. Btw, about the loading of multiple C# plugins, I already send Patchou an e-mail about it but never got an answer... But that doesn't really matter, if I find something usefull I will of course send him another mail. But I doubt if it is a problem in msg plus, because I have already been able to run multiple C# plugins, the problem is, I can't reproduce...
RE: RE: RE: NickChange Plugin by n0n4m3 on 11-07-2005 at 03:06 PM

quote:
Originally posted by J-Thread
About the reloading etc, I don't have much time at the moment to test it, but I will keep it in mind. Btw, about the loading of multiple C# plugins, I already send Patchou an e-mail about it but never got an answer... But that doesn't really matter, if I find something usefull I will of course send him another mail. But I doubt if it is a problem in msg plus, because I have already been able to run multiple C# plugins, the problem is, I can't reproduce...


I think TazDevil is right, it must be done in the messenger plus side since doesn't make sense a plugin to release itself.
Also, i think that the appdomain thing explains why we can only have one c# plugin at a time. Since there's no appdomain for a plugin, the .net framework will load a default appdomain for every plugin and this will make appdomains to collide and load only one plugin.

I'll read more about this to get facts and not just thoughts :P
RE: NickChange Plugin by TazDevil on 11-07-2005 at 06:51 PM

I was trying yesterday with n0n4m3
to try make the Typelib available to be loaded by LoadTypeLib(), and i was wandering if this is altoghether possible
(i mean i dont want to extract the typelibrary to a tlb file, i just want it available from within the dll.

anyway one more comment on your plugin...
i was trying to dynamically invoke your Configure command supplied by Plus!.. but got an .NET error and then the dialog appeared...
Then i checked with the reflector and you have 3 Configure() methods with different set of arguments...
So i think it would be wise to rename those functions and leave only one (the Plus! one) called Configure...


RE: NickChange Plugin by J-Thread on 11-07-2005 at 06:55 PM

Well it just a programming style to have functions with the same name and different params (overloading).

It works correctly with msgplus so I don't think there will be any problems... But well, I may change the function name in the final version, although I don't see why it should be changed...


RE: NickChange Plugin by TazDevil on 11-07-2005 at 07:04 PM

yeah i works fine with plus...
but this is what i get when i try to call the function

Anyway do you know anything about the other question ?


RE: NickChange Plugin by J-Thread on 11-07-2005 at 07:46 PM

This isn't an error according to the overload functions, but my plugin is designed to be loaded by plus, and the Configure function is usually always called after the Initialize function...

So when you do Initialize first and then Configure it should work(Y)

About the other question, I don't really understand what the question is...


RE: RE: NickChange Plugin by zejeske on 06-10-2011 at 09:04 PM

quote:
Originally posted by J-Thread
This isn't an error according to the overload functions, but my plugin is designed to be loaded by plus, and the Configure function is usually always called after the Initialize function...

So when you do Initialize first and then Configure it should work(Y)

About the other question, I don't really understand what the question is...


I wish it were possible that you may also release this version for windows live 2011
I use this script too for my ads!

Congrats Script
RE: NickChange Plugin by Spunky on 06-10-2011 at 09:23 PM

quote:
Originally posted by zejeske
quote:
Originally posted by J-Thread
This isn't an error according to the overload functions, but my plugin is designed to be loaded by plus, and the Configure function is usually always called after the Initialize function...

So when you do Initialize first and then Configure it should work(Y)

About the other question, I don't really understand what the question is...


I wish it were possible that you may also release this version for windows live 2011
I use this script too for my ads!

Congrats Script

This "Plugin" is not to be confused with "Scripts" that replaced them. Windows Live Messenger 2011 changes your name through your live profile. This causes a bit of a problem when trying to script it. I think it could be done, but won't be as it'll send all your updated names as actions to any linked social media sites (Facebook for example may post on your wall every x seconds)