What?
For the project and source code see Yahoo Messenger Bot
Yes, there are a lot of bots out there for MSN messenger but I needed to have one that I could program for Yahoo Messenger.
While searching the internet for anything interesting I found many different projects that I thought were cool. However most of the only worked with older versions of the Yahoo messenger protocol that changes quite often. This renders anything written for an anterior version useless.
My only choice after searching for a long time was to use either libyahoo2 (written in C) or openymsg (written in Java). Of course I first picked the C one, I manually compiled it.. set up some things and it worked. But I saw that making changes to the sample settings could render it unstable and it wasn't very portable, being a noob at C at that time(2011) I just gave up! Then I thought hey, just use the Java version.
The Java version gave me a few hours of struggling to implement everything (just like the C version) but after that everything became clear. I eventually implemented a MySQL database connection for the bot so it could save the data on a server. It has access based on login names.
What it could do:
- It can "spy" on other people, meaning you can talk to other people through the bot as if you where talking to that person directly, kinda funny until that person finds out.
- Save data to the database, create new username objects in memory, remove them after 10 minutes of user inactivity (to save memory because JAVA is so memory intensive) and save the data in the MySQL database (again, after 10 minutes so it doesn't query the DB like crazy for everything)
- Different user levels where you can ban people, add new people.. annoy people, send ascii art ETC.
- Generate google url's for lazy people
- Search google for you (this has been disabled because of google changing the API again and again..)
- Work in progress for a TRIVIA game to be played with multiple people.
This project is quite unfinished but it's still usable in a manner. Though the setup of MySQL might be a little stupid, a library to use SQlite has been included, maybe if I ever redo a yahoo bot i'll just use SQlite.