• Welcome to Valhalla Legends Archive.
 

[Poll] A CSB .NET

Started by MyndFyre, May 24, 2004, 12:36 PM

Previous topic - Next topic

Should I release a CSB equivalent for .NET?

Yes
17 (44.7%)
No
21 (55.3%)

Total Members Voted: 25

MyndFyre

Okay.....

When I got started in my foray into bot development, part of the goal was to make a reasonable high-level design.  Part of this involved separating the connection work from the display, data, and other parts of the program -- which ultimately garnered to three APIs available for my bot (the connection API, the data API, and the plugin API).

The data and extensibility APIs can only be used by my bot -- I suppose they *could* be used elsewhere, but considering that a person would have to create objects that are not publicly-creatable, if someone can, then by all means.

On the other hand, the connections API is completely encapsulated, and only requires a few bits to set up.  Here's how it works:

1.) A consumer must implement the IConnectionSettings interface -- which tells the API what server(s) to connect to, using what client, what CD keys, username, password, home channel, etc.
2.) A static Connections class must have a call made to validate a key distributed by me to authenticate that client to my server (stats tracking).  Only the key is sent, and the server returns my bot's BNLS username and password -- so the API can't connect until it's validated.
3.) The consumer must call Connections.GetConnectionManager(IConnectionSettings), passing in the implementation of IConnectionSettings to retrieve an appropriate connection manager.  The call returns an IConnectionManager interface, which is basically defined as Connect(), Disconnect(), .ConnectionStatus, .EventHost, .CurrentUser, and .CurrentChannel.
4.) Before connecting (or after, if that's really desired), the consumer must "register events" with the IEventHost interface obtained from the connection manager.  So, if I want to capture the ChatText event, I might say:

myConnMgr.EventHost.RegisterEvent(EventType.ChatText, new ChatEventHandler(this.Chat_Text));

To prevent memory leaks, my suggested optimal design is to declare all delegates as class member fields, and call RegisterEvent before connection and UnregisterEvent after disconnect.

That's it.  I put together a chat connection (binary authentication) in VB .NET in about two hours, with only the userlist with basic icons (the API supports binary friends automatically, as well as clan membership).

I'm really interested in seeing what vL members have to say about this.  In any case, my bot is nearing another release, and the API is nearly complete (it's definitely usable at this point) -- so I guess I'd need to know soon, whether or not to be applying declarative code-access security.

Thanks all.

[edit] Changed the subject to include "[Poll]". [/edit]
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Eric

#1
CSB was the stupidest thing ever made.  
People that don't understand what takes place in a connection to Battle.net shouldn't be allowed to program bots for Battle.net.

drivehappy

It really depends upon if you want to support it, e.g. answering people's questions on how to do such-and-such.

Eli_1

This sounds like a decent personal project... but don't you dare release it.
* Eli_1 glares

Zeller

I voted yes. Although I never used csb for vb 6, it seems like a great idea. It gives programmers more time to focus on developing there bots features.

UserLoser.

Yes, but don't offer support/help for it since they should already know how to use the language and such a simple control

Fr0z3N

Quote from: UserLoser. on May 24, 2004, 02:35 PM
Yes, but don't offer support/help for it since they should already know how to use the language and such a simple control

I agree with UserLoser.

hismajesty

Quote from: Zeller on May 24, 2004, 02:34 PM
I voted yes. Although I never used csb for vb 6, it seems like a great idea. It gives programmers more time to focus on developing there bots features.

Connecting isn't a feature?

iago

I said no because I'm racist against CSB :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


BaDDBLooD

There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Newby

- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Falcon[anti-yL]


MyndFyre

Quote from: LW-Falcon on May 24, 2004, 07:51 PM
CSB is nub. >:(

I disagree.  Newbs USE CSB.  CSB itself is pretty slick.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Banana fanna fo fanna

You should have it require a test.

When you call connect(), pass in a callback function which is the implementation of some algorithm they must be smart enough to write. CSB.NET will require it to pass in order for them to connect.

CrAz3D

But eventually that will be released to the public by some one some way or another, then it will be easy again.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...