• Welcome to Valhalla Legends Archive.
 

online command

Started by gorshing, March 17, 2003, 06:06 PM

Previous topic - Next topic

gorshing

I would just like to get some of you guys opinion on how to implement an online command in VB.  This is also for a chat bot, I haven't yet made the step into the binary bot world :-/

First off if anybody knows of any site/thread/code that already discusses this, could you please post the link and my apologies for posting a stupid thread.  But I have searched and haven't yet found anything.

One of my thoughts is once the command is executed, to do a whois on all usernames in an array.  Then as the results are returned back, store those in an array also.  Once all the results are accounted for /msg the user.  But this seems very ineffeciant to me.

Another way would to do this about every 10-30 seconds, but again I don't like this way either.

I have a single threaded application and do not want to do a multi threaded application for this reason.

Does anybody else have any comments or other ideas?  BTW I am going to store the usernames in an access database for now, but that doesn't matter at this point ... I think.

Thanks again,

Noodlez

#1
exactly what are you trying to accomplish?

Kp

#2
There is another way to go about it, depending on how "dedicated" this application is going to be (and on how limited).  If you are willing to confine it to <= 25 users and a dedicated account, just friendlist all the people you want to watch and send "/f l" on a timer and parse the results. :p  If you want something more flexible, the idea you discussed would be better.  However, be aware that doing all those queries could take up a substantial portion of your flood queue.  Additionally, since battle.net uses the amazingly unhelpful "That user is not logged on." response when someone isn't online (I'd much prefer if it had the username), you'll have to do some heuristics to figure when you have all the results.  You could just count up number of responses, but that then presumes the user hasn't manually tried anything in the interim (which he/she very well might, if you're querying enough people not to be able to use the friendlist -- that'd be a lot of people and quite a bit of time).  Another potential problem, if you search on command, is that the user gets impatient waiting for the bot to perform its queries and leaves, thus wasting your work. :p

Your ideas are on the right track, but I suggest seriously thinking about whether an online list is worth the amount of effort you'll have to put into it to make it work well.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Camel

#3
eurijk! solved this long ago. have your bot log in 15 or 20 times, and have each one do a whois one one user. :)

gorshing

#4
Thanks for the replies

Kp, I never though of using the friends list, and this may be what I'll end up doing.

I do not believe that I'll end up with more than that.

Camel, I'll have to look into that also.

Thanks again,
gorshing

Zakath

#5
QuoteAdditionally, since battle.net uses the amazingly unhelpful "That user is not logged on." response when someone isn't online (I'd much prefer if it had the username), you'll have to do some heuristics to figure when you have all the results.

Woo! Kp, you used the word "heuristic" in normal speech. :P
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Grok

#6
QuoteWoo! Kp, you used the word "heuristic" in normal speech. :P

That's the pragmatic choice.

tA-Kane

#7
Quoteeurijk! solved this long ago. have your bot log in 15 or 20 times, and have each one do a whois one one user. :)
Obviously, long ago, there was no friends list.

But, you could keep tabs on more than 25 people fairly efficiently this way; using multiple accounts' friends lists, and doing /f l on each everytime you do /online.

Of course, if you have quite a number of people to keep tabs with, it'll eat up your bandwidth fairly quick, especially if you're not on broadband or better.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Arta

#8
Perhaps I'm missing something, but the "That user is not logged on." problem doesn't seem like a problem at all to me...

If you have 10 users you want to check, do a /whois on them all, parse the "name is using product in ..." messages and mark the users they specify as being online. Mark everyone else as being offline. Problem solved?

gorshing

#9
Arta, that is the way I'm heading.  I just didn't know if anybody else had another trick up their sleave.

I googled for eurijk! but I couldn't find anything, and also nobody on this board by that name.

Thanks again for the replies

Zakath

#10
Eurijk! wrote zDsBot. His website can be found here, but I don't know if you'll find anything useful there.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

tA-Kane

#11
QuoteEurijk! wrote zDsBot.
He also headed up Prolix.
http://prolix.sourceforge.net.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com