-
1 Attachment(s)
Badger Messenger, an MSN clone that uses the MSN Network.
IMPORTANT: (updated 25 Feb 2010) In the last few months Microsoft have stopped the MSN network using the MSNP9 protocol. This means the following project does NOT work since it replies on this protocol. See posts 118 to 120 in this thread as to why this doesn't work in more depth. I will be looking at writing a newer .NET version using the latest protocol later this year.
Ok, here it is.
Still rough, but it's good enough to put up here now.
This is the source code to a version of MSN messenger I have written.
The original source code I got this from was posted here a week or so ago by alkatran. The link for this thread is here:
http://www.vbforums.com/showthread.php?t=323108
Cheers, for posting your code, not many do, more should :thumb:
Badger Messenger so far doesn't actually do much.
You can log into your MSN account, see your contacts, change your status, add and delete groups. You can sort contacts numerous ways too. That's it.
There's a lot more coded into the DLL, I just haven't added the functionality in the UI yet.
Conversations don't work yet. I had them working but refractured the code and haven't got round to putting it in. The old code is just remarked out.
SOme of the features include:
- Set initial status before login
- Add Group
- Delete Group
- Rename Group
- Set Contacts Nickname (different to their displayname. The nick name is a name you can give them and see them by)
- Set your displayname
- Set your status
- Remembers last login and settings
- List contacts by email, nickname or displayname
- See which of your contacts DO NOT have you on their contacts list :D
The MSNMessenger code is in a DLL, so you can refernece this in any of your apps and easily write your own UI for it.
You can even link it to your corporate DB and only allow certain emails to be registered as contacts, ie for a site engineer, the MSN network is great to chat to your mates but it's really for contacting ya boss back at the office.
Think that's it so far.
The site I got the MSN protocols from was quite handy:
http://www.hypothetic.org/docs/msn/n...le_session.php
Comments are most welcome.
Future revisions will be posted here frequently over the next week.
Just unzip the file, and then run Test.vpg
This code ain't for the faint hearted ;)
A newer Version can be foound 2 posts down...the attachment on this post is the old version, but is left here for historical reasons
Even newer post!
Updated 20th Sept 2005: See post #34
Woof
-
2 Attachment(s)
Here's some screen shots:
2 screen shots. Quite basic.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Bad Woka bad!
SetDisplayName hammers the msn server till it disconnects you. :p
And you still haven't fixed the line in vbMSNMessenger.modMSPassport:GetPassPort()
mobjHttp.SetRequestHeader "Authorization", "Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in=" & pstrEmail & ",pwd=" & pstrPassword & "," & pstrProtocol
to allow the use of nonstandard characters. :p
-
1 Attachment(s)
Re: Badger Messenger, an MSN clone that uses the MSN Network.
OK, here's the new version.
It has a few more features added.
Most of the above features have now bneen fully implemented in the UI.
Auto login feature, plus initial login status.
Change displayname and status.
Contacts in RED do NOT have you on their contact list ;)
Easily see who's on your banned and allowed list.
You can now initiate a chat, or receive a chat.
The code is a little buggy in some places, it's still only an alpha release, but it's comming along.
Need more testers and feedback.
Woof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
:eek: :D :bigyello: VERY NICE! lolz, a good thing to add to this would be the ability to send files to your contacts, so if you have friends using msn 6 or 7 and u sign on usng this, you are still able to send and receive files from your contacts, please can you help me with this, i need help sending files accross msn 6, i want to set up a file server at home where when a message is received, it check it and if it is something then it will send that file to that person, how to send files over msn please
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
i cant get it to an exe from some reason :cry:
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
sorry for double post but..
Woka i did what you sayd but it says:
Code:
The Project 'DemoUi' can not be build because it references project '*my path*\vbMSNMessenger.vbp' That Has Not Been Build
:afrog: :eek: :ehh:
i dont understand why it doesnt work =\ im a vb newb kidda..
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Yes. You have to change the reference that it points to.
Toools...References....Now select vbMSNMessenger, but the DLL version. Remove the current vbMSNMessenger ref as this looks at the project.
Woka
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
i still cant get it...
so what your saying is that i have to remove the vbmsnmessenger reference?
:wave: Gunner
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Hi,
when i send it to other persons it requiers dll's well woka said all ref things , so thats what i did. but he still cant run it
also im trying to change the status pictures but it doesnt work =\
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
You need to remove all the references, compile each of the projects in the project group and then add the references again.
If you want to give it to someone else then you'll need to get them to register the dll files, which can be done using an installer or, from Run the regsvr32 command, but I can't remember the syntax... I think its just 'regsvr32 Pathtodllgoeshere'....
And my understanding was that "display pictures" weren't support at the moment, its using the protocol before display pictures? And even then, he hasn't included support for it.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
yes i know but what are the dll files i need to send to them?
and i mean status pictures: like away and busy and stuff like that.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Hi Wokawidget,
As you know(from my postings), I like to keep things simple.
Thus I usually avoid VBG's and DLLs etc, so an idiot like me can compile and distribute very easily.
I recently was looking at a project which required a DLL. The author pointed out that we should not register his DLL. Instead we just ensure it is in the same path as the exe. Or if we like, we can place it in the Windows\System32 folder.
That sounded 'like a piece of cake' to me.
This question may expose my lack of knowledge regarding DLLs, but could yours be made like that ?
Or are there apples and oranges with DLLs (different types, with different requirements) >
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
The DLLs in my project definately require registering.
AxtiveX Usercontrols, OCX files, can be placed in the apps folder, or System32, and they will get registered automatically. Not sure about different DLLs though.
Mine DO require installing.
I have heard you mention keeping it simple before :D
But what is even simpler is learning Inno setup and using that to install the app.
ALL vb apps require DLLs. Even a simple EXE requires 3 DLLs for the VB runtimes. Most PCs have these installed from other apps, and so your app works. But this will not always be the case.
What people fail to realise is that using an installer is JUST as important as any other process involved in your app. I have nevr quite understood why people are scared of them :confused:
Woka
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Generally a case a of hosting size restrictions and being on dial up is usually the reason for wanting to avoid Installers... espiceally when the program is a 50k exe and a 20k dll. :p
Remind me to show you my blocking code, it works but when you log back in again it nolonger recieves the contacts display Name. :(
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
hey, nice code, do you think you could make something that runs alongside msn7 and changes ur name at certain time interval... for example.. you could have your name, with a smiley bouncing left and right through ur name:
:)Arachnid13
Ar:)achnid13
Arac:)hnid13
Arachni:)d13
Arachnid1:)3
Arachnid13:)
Arachnid1:)3
Arachni:)d13
Arac:)hnid13
Ar:)achnid13
:)Arachnid13
i've been wanting to do this for ages and been trying to find code to do it but i havent been able to
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
You can only change your name so many times and then the server will block the command for a while.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
hmm, well i may just have to design my own chat network then! ;)
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
it is very good i ihave to say, is there a way of making it get info from my site regesterants. so only people who are in my site can chat.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Yup.
This is what I wrote it for....as a demo to my boss that we can use the MSN network for our engineers, but you can check your own local DB for permissions as well as having an MSN account.
In the frmMain you have the following function:
VB Code:
Public Sub SignIn(ByVal pblnAutoLogin As Boolean)
Dim strEmail As String
Dim strPassword As String
Dim enmStatus As vbBadgerMessenger.vbBadgerStatusConstants
Dim blnLogin As Boolean
If pblnAutoLogin Then
strEmail = GetSysSetting(SECTION_LOGIN, SETTING_LOGIN_EMAIL)
strPassword = DecryptData(GetSysSetting(SECTION_LOGIN, SETTING_LOGIN_PASSWORD))
enmStatus = ctlLoginStatus.Status
End If
If Len(strEmail) > 0 And Len(strPassword) > 0 Then
blnLogin = True
Else
If GetLoginDetails(strEmail, strPassword, enmStatus) Then
ctlLoginStatus.Status = enmStatus
blnLogin = True
End If
End If
If blnLogin Then
If pblnAutoLogin Then
SetSysSetting SECTION_LOGIN, SETTING_LOGIN_STATUS, ctlLoginStatus.Status
End If
Screen.MousePointer = vbHourglass
mnuSignIn.Enabled = False
cmdSignIn.Enabled = False
mobjMSN.SignIn strEmail, strPassword, enmStatus
End If
End Sub
The line of code that logs you in is:
VB Code:
mobjMSN.SignIn strEmail, strPassword, enmStatus
So, what you want is something like.
VB Code:
'rest of code from function
If CustomLogin() Then
mobjMSN.SignIn strEmail, strPassword, enmStatus
End If
'rest of fucntion code
Private Function CustomLogin() As Boolean
'code to validate engineers login against your DB
End Function
You may want to open another username password form so they can enter their site details, but I wud just validate the email address to be fair, something like:
VB Code:
Private Function CustomLogin(ByVal pstrEmail As String) As Boolean
'code to validate engineers login against your DB
End Function
What code here completely depends on your system, or how your uses are going to validate against your DB.
If the DB in on a local LAN, which is what it is in my case, then I can just use ADO to connect to the SQL DB, or access, and validate the email address.
If you are doing this via the web, ie the DB is on your web server, then there are a number of ways to do this. I would go for a WebService written in .NET, but this does require you to learn webservices and have a copy of .NET.
You could also use ADO again, and by specifying the IP of the server you may be able to connect to your remote DB. Klienma, an admin here, does this all the time so you may want to ask him about this.
The other method would be to use a INet control on the form. You then write a web page that handles an Email param. Then using JS and VBscript or PHP, whatever, you can take that param and validate it. Then all you need to do is write a response to the page of True, or False. Your Msnger client will then just look at the text of the web page to see if it's been valdiated or not.
Hope that points you in the right direction. If you have any questions then give me a shout.
Woka
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
OK i don't know how i can connect to sql db using vb how can i do it? i will be using a remote server will it be possible?
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
connecting to a SQL Server using ADO is pretty simple, and just as simple connecting to a remote one as a local one.
this function will return an open connection to a SQL Server... replace the DBNAMEHERE,PASSWORDHERE, etc with your own values.
VB Code:
Public Function OpenCN() As ADODB.Connection
On Error GoTo EH:
Set OpenCN = New ADODB.Connection
'*********************************************
'SQL SERVER CONNECTION
OpenCN.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=false;User ID=USERIDHERE;pwd=PASSWORDHERE;Initial Catalog=DBNAMEHERE;Server=SERVERNAMEHERE;Database=DBNAMEHERE;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
'*********************************************
OpenCN.Open
Exit Function
EH:
MsgBox "Error connecting to SQL Server.", vbCritical
Set OpenCN = Nothing
End Function
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Cheers Klienma...where would you put an IP address in there?
Woof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
sorry, IP would be the server name...
something like this
Quote:
"Provider=SQLOLEDB;Persist Security Info=false;User ID=kleinma;pwd=kleinmaspassword;Initial Catalog=kleinmasdb;Server=42.36.101.5;Database=kleinmasdb;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
standard port for SQL Server (2000) is 1433, the connection will use that by default. If the port is different you specify it like this
IP,PORT
like this
Quote:
"Provider=SQLOLEDB;Persist Security Info=false;User ID=kleinma;pwd=kleinmaspassword;Initial Catalog=kleinmasdb;Server=42.36.101.5,2433;Database=kleinmasdb;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
can this be used to connect to mysql?
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
you could connect to mysql, but the connection string provided is for SQL Server only. Each type of DB server has its own set of information needed to connect.
check out this site: http://www.connectionstrings.com/
you can find connection string configurations to virtually any DB you can imagine
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
the link only does vb.net wile i am using vb6?
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
a connection string is a connection string so even if its says its .net, thats because its showing you a connection using .net objects, but the actual string sent to the database is still the same
for example under MySQL ole db connection info, it shows
Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;"
this would still be the same in VB6
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
hi woof, how can i help you with this vb clone to the msn network ?
Quote:
Originally Posted by Wokawidget
OK, here's the new version.
It has a few more features added.
Most of the above features have now bneen fully implemented in the UI.
Auto login feature, plus initial login status.
Change displayname and status.
Contacts in RED do NOT have you on their contact list ;)
Easily see who's on your banned and allowed list.
You can now initiate a chat, or receive a chat.
The code is a little buggy in some places, it's still only an alpha release, but it's comming along.
Need more testers and feedback.
Woof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
errrr...i am not sure. random feedback is always good;
woof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Can you give me some advice on how I can make a similar kind of thing for yahoo messenger using vb.net? If you have any plans of making it,I would Love to help :) doesnt matter even if its for msn..but,using .net.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
I have no idea what type of advice to give.
The main structure and implementation of a yahoo messenger would be very similar, just a different protocol.
I am currently writting badgermessenger.Net although it's quite a way off yet. Still playing with it.
If you find any info on the yahoo protocol then that would be great,
Woof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Oh sure,Ill be checking it out :) and ill ask you if I have doubts :)
-
1 Attachment(s)
Re: Badger Messenger, an MSN clone that uses the MSN Network.
OK. The new version is here.
I've had it for ages, and not posted it. Sorry :(
Have been writting BadgerMessenger .NET and have switched to the new MSNP12 protocol, which MSN Messenger 7.5 uses.
I noticed some old bugs to do with payloads that my old app had, so I have just fixed them, and decided to post the newer version here.
Badger Messenger.NET will be forthcoming, but I don't know when.
If anyone has any MSNP12 code they would like to share then that would be great.
Woka
-
3 Attachment(s)
Re: Badger Messenger, an MSN clone that uses the MSN Network.
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
You should update the first post to let members know that the updated version is in post #34 now. :D
I bet your going to get allot of spam now too with your email in the SS's :(
Hey, where am I? :(
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Quote:
Originally Posted by Wokawidget
OK. The new version is here.
I've had it for ages, and not posted it. Sorry :(
Have been writting BadgerMessenger .NET and have switched to the new MSNP12 protocol, which MSN Messenger 7.5 uses.
I noticed some old bugs to do with payloads that my old app had, so I have just fixed them, and decided to post the newer version here.
Badger Messenger.NET will be forthcoming, but I don't know when.
If anyone has any MSNP12 code they would like to share then that would be great.
Woka
Is this project still going??? :sick:
And MSNP13 is now in use, with MSNM 8 (Which I of course, do have :))
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Yup. Sort of. Am writing Badger Messenger .NET that uses MSNP12.
When did they release 13?
Wof
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Don't know for sure, but MSN Messenger 8 uses it ;)
-
Re: Badger Messenger, an MSN clone that uses the MSN Network.
Can you download a demo of this?
Is MSN 8 the one that includes Yahoo IM?
That protocol will be all over the shop.
Woka