Author | Message | Time |
---|---|---|
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, | March 18, 2003, 12:06 AM |
Noodlez | exactly what are you trying to accomplish? | March 18, 2003, 12:33 AM |
Kp | 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. | March 18, 2003, 6:43 PM |
Camel | eurijk! solved this long ago. have your bot log in 15 or 20 times, and have each one do a whois one one user. :) | March 18, 2003, 7:25 PM |
gorshing | 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 | March 18, 2003, 7:28 PM |
Zakath | [quote]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.[/quote] Woo! Kp, you used the word "heuristic" in normal speech. :P | March 18, 2003, 8:46 PM |
Grok | [quote] Woo! Kp, you used the word "heuristic" in normal speech. :P[/quote] That's the pragmatic choice. | March 19, 2003, 7:47 AM |
tA-Kane | [quote]eurijk! solved this long ago. have your bot log in 15 or 20 times, and have each one do a whois one one user. :)[/quote] 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. | March 19, 2003, 10:21 PM |
Arta | 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? | March 20, 2003, 9:55 AM |
gorshing | 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 | March 20, 2003, 10:31 AM |
Zakath | Eurijk! wrote zDsBot. His website can be found here, but I don't know if you'll find anything useful there. | March 20, 2003, 2:44 PM |
tA-Kane | [quote]Eurijk! wrote zDsBot.[/quote] He also headed up Prolix. http://prolix.sourceforge.net. | March 20, 2003, 6:39 PM |