Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Lenny on July 04, 2005, 12:47 AM

Title: An interesting twist in b.net chatting...
Post by: Lenny on July 04, 2005, 12:47 AM
It's been a little project I had spent my spare time on...
http://www.mycgiserver.com/~madc0w/ServlerBot/ServlerBot.html

100% Server Driven (Servlet, java's equivalent to PHP, CGI, ASP)
0% BNLS (Binary Connection)

SourceCode:
http://www.mycgiserver.com/~madc0w/ServlerBot/

*Note that a stream is possible, but the capability depends on the server which hosts the servlet.  In this case, the server does not support this ability.

It was a small project designed to show an interesting implementation of my core classes for a connection to battle.net via legacy clients (BNCC - Battle.net Connection Core).  
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 04, 2005, 03:42 AM
The connection time is determined by the servlet container which varies tremendously.  A connection may last from a few minutes to a few days depending on when the server decides to restart the container...

However, everytime a page is requested a servlet container will exist.  If the servlet container needs to be recreated, a new instance of the servlet will be initialized.  This will result in a new connection to Battle.net.
Title: Re: An interesting twist in b.net chatting...
Post by: ### Teh Gnube ### on July 04, 2005, 02:59 PM
Wow... That is genuinly neat. Chatting remotely to Battle.net, through a website... I like that idea. I like that a lot. With the correct applications, this could probably help many hangout channels to hold 24/7 channel moderation... Maybe. I don't know, but that's a very nice application, right on.
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 04, 2005, 03:33 PM
With so many proposals/requests of a way to reach Battle.net on mobile devices, it seemed like something many would find worthwhile.

It also might take away the hassle for Webbot requests/request handling.  All you need is a host which supports servlets (google.com).
Title: Re: An interesting twist in b.net chatting...
Post by: Blaze on July 04, 2005, 03:40 PM
Could you make it a zip? I'd like to host one. :P
Title: Re: An interesting twist in b.net chatting...
Post by: ### Teh Gnube ### on July 04, 2005, 03:48 PM
I would too. =D
Title: Re: An interesting twist in b.net chatting...
Post by: Blaze on July 04, 2005, 03:51 PM
After four minutes of draging and dropping clicking and renaming I go this:

http://blazenet.servebeer.com/site/BNCSApplet.zip
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 04, 2005, 03:58 PM
Note, it's not an applet, its a servlet.  Applets run locally, servlets run remotely...

To host one, you'll need a server which supports servlets.  AFAIK, the most popular http server which supports servlets is Apache Tomcat.

As far as setting it up, it really depends on how the server is setup.
Title: Re: An interesting twist in b.net chatting...
Post by: Mephisto on July 08, 2005, 12:42 AM
Do I have to compile this to use it?  Can't you just give us the compiled format ..
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 08, 2005, 01:02 AM
At the moment, the source is specific for that server.  One unfortunate aspect of servlets is that many servers which support servlets have their own specific requirements for running servlets.

But at the moment I am working on making a version which is as portable as possible. 
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 08, 2005, 01:56 AM
Another twist:  ;D

Generated images of Bnet chat. 
(See my signature)
If you want to give it a test, simply do a '/whois Servler' @ USEast and chat in the channel Servler is currently in.  The last chat msg will be displayed in my signature.

At the moment, much of the code of ServlerBot.java is sloppy/hardcoded.  The original intentions of the project had been to show an example use of my BNCC package.  But if enough are interested, I could continue on with the ServlerBot project.
Title: Re: An interesting twist in b.net chatting...
Post by: Newby on July 08, 2005, 03:17 PM
Awesome. :)
Title: Re: An interesting twist in b.net chatting...
Post by: Mephisto on July 08, 2005, 04:29 PM
Quote from: Lenny on July 08, 2005, 01:02 AM
At the moment, the source is specific for that server.  One unfortunate aspect of servlets is that many servers which support servlets have their own specific requirements for running servlets.

But at the moment I am working on making a version which is as portable as possible. 

So basically you're telling me that I can't use this because you haven't made it portable to other systems nor made it usable by only giving us the source ...
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 08, 2005, 05:10 PM
Well if you read the first post in the entire thread, the source is available.  In fact, those class files will ALWAYS be the files used by the server.

The reason the portability is questionable on other machines is because I have never tested this on any other server capable of running servlets.  If anyone minds adding the servlet ability to their server, it would be greatly appreciated if you provide me with some hosting.

The server which I'm presently using is a development server for servlets.  It has some slight differences than a normal server which has servlet support.  Thus, my source has to be modified to comply with these differences.

If anyone wishes to add servlet support to their server or already have hosting to a servlet supporting server, I would appreciate the help.

Also, if you need help adding such support, simply ask....
Title: Re: An interesting twist in b.net chatting...
Post by: Kp on July 08, 2005, 09:54 PM
As a side note, I would highly advise that anyone who makes patches for this consider submitting them back in -D format (instead of the more common unified format used when reverting the change is considered extremely unlikely), so that the changes can be conditionally included/excluded, thereby allowing the same sources to build on both Lenny's development server and a more typical non-developer server.
Title: Re: An interesting twist in b.net chatting...
Post by: effect on July 09, 2005, 03:55 AM
As a side nite, kp u need to get out more and concetrate less on trying to impress 13 year old kids on a forum mmk.

loser much?
Title: Re: An interesting twist in b.net chatting...
Post by: DarkMinion on July 09, 2005, 09:41 AM
This has been done before
Title: Re: An interesting twist in b.net chatting...
Post by: Mephisto on July 09, 2005, 10:48 AM
why hasn't he been banned yet?
Title: Re: An interesting twist in b.net chatting...
Post by: Lenny on July 09, 2005, 12:44 PM
Quote from: DarkMinion on July 09, 2005, 09:41 AM
This has been done before

What has been done before?