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:
Cheers, for posting your code, not many do, more should
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
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:
Re: Badger Messenger, an MSN clone that uses the MSN Network.
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.
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.
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.
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
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
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.
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:
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
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.
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.
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;"
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,