What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [REQ] Name Remote

Pages: (2): « First « 1 [ 2 ] Last »
[REQ] Name Remote
Author: Message:
m0nst3rkill3r
Junior Member
**

Avatar

Posts: 51
Joined: Sep 2009
RE: [REQ] Name Remote
Read Already.
but i cannot think about everything.

This post was edited on 10-01-2009 at 05:37 PM by m0nst3rkill3r.
10-01-2009 05:37 PM
Profile E-Mail PM Find Quote Report
alice.sw
New Member
*

Avatar

Posts: 3
34 / Female / Flag
Joined: Sep 2009
O.P. RE: [REQ] Name Remote
Oh, so nice of you, guys. Thank you alot! :)
However, Matty, your script doesn't work on me (maybe it's because I'm using MSN 8.5 not 9.0), but m0nst3rkill3r's script does. :)

This post was edited on 10-02-2009 at 04:57 AM by alice.sw.
10-02-2009 04:50 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [REQ] Name Remote
Interesting, my testing showed it should work... I didn't actually test it using WLM; I just used a JScript engine.
10-02-2009 12:39 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [REQ] Name Remote
My guess would be that Messenger.MyName doesn't like to be set null when a normal message is received. The regular expression could use some improvement as well. (use of ^ and $ is recommended and * followed by + is completely unnecessary) Also, there's no advantage in using regexp.exec() in this case, so I decided to go with string.match() since it's more common - but that's just a matter of taste. :P
Javascript code:
function OnEvent_ChatWndReceiveMessage ( oChatWnd , sOrigin , sMessage , nMessageKind ) {
    var match = false;
    if( match = sMessage.match( /^!name (.+)$/ ) ) {
        Messenger.MyName = match[1];
    }
}

Tested and confirmed to work.

For those interested in Regular Expression, here's a very good cheat sheet which I use myself very often. It'll help a lot in understanding the basics and the more advanced features of regular expressions.

This post was edited on 10-02-2009 at 05:14 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-02-2009 04:38 PM
Profile E-Mail PM Web Find Quote Report
m0nst3rkill3r
Junior Member
**

Avatar

Posts: 51
Joined: Sep 2009
RE: [REQ] Name Remote
You're Welcome, between.
I'm a Coding starter so i  have to learn a lot.
but if i had helped you, im Happy^^
10-02-2009 06:39 PM
Profile E-Mail PM Find Quote Report
alice.sw
New Member
*

Avatar

Posts: 3
34 / Female / Flag
Joined: Sep 2009
O.P. RE: [REQ] Name Remote
Yes, you helped me alot and I'm happy about it and thanks everyone else too. :)

However, now I'm standing in front of another problem - security. Is it possible to extend the script a little? Something like...it can be executed only by contacts, who are in X (certain) group on my list? Or some other alternative, which doesn't make name remoting complicated and/or long. :$

// Hmm, then got to figure out some other alternative.

This post was edited on 10-02-2009 at 09:26 PM by alice.sw.
10-02-2009 09:00 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [REQ] Name Remote
Plus! doesn't have access to the groups.
10-02-2009 09:19 PM
Profile E-Mail PM Find Quote Report
m0nst3rkill3r
Junior Member
**

Avatar

Posts: 51
Joined: Sep 2009
RE: [REQ] Name Remote
Why not an Array with Some Contacts?
Something like allowed{"bla@mail.com"};
And is saved in the Registry.
I think thats Possible. Because the " OnEvent_ChatWndReceiveMessage" Can show, who has send it. A Simple "if" could open the registry and checks it.
Its just Theory but, i Think that is possible.

regards

This post was edited on 10-03-2009 at 10:48 AM by m0nst3rkill3r.
10-03-2009 10:47 AM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
RE: RE: [REQ] Name Remote
quote:
Originally posted by m0nst3rkill3r
Why not an Array with Some Contacts?


I think if you were to use the array, it would work, but could have a couple of exploits possible.  Because OnEvent_ChatWndReceiveMessage will tell you the name of the message sender, not the email address.  You could check if the name matches that of any of the email addresses that are allowed to change and then do it, but this will give a false positive if one of your contacts without permission has the same name as one who does.
[Image: adsig.jpg]
10-03-2009 12:57 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On