Author |
Message |
ede Guest
Offline
|
Posted: Sat Dec 06, 2003 10:19 pm Post subject: Check lag with mervbot? |
 |
|
|
|
How do you check players lag with mervbot?
|
|
Back to top |
|
 |
SuSE Me measures good

Joined: Dec 02 2002 Posts: 2307 Offline
|
Posted: Sat Dec 06, 2003 11:22 pm Post subject: |
 |
|
|
|
there's a plugin for it - I think Explody wrote it
get it from mervbot.com when it's back online (hopefully soon)
or someone might provide it for you or perhaps it's somewhere on ssdownloads.com somewhere
|
|
Back to top |
|
 |
ede Guest
Offline
|
Posted: Sat Dec 06, 2003 11:38 pm Post subject: |
 |
|
|
|
I dont want a bot. I want to know code to do it.
|
|
Back to top |
|
 |
myke Seasoned Helper
Gender: Joined: Sep 11 2003 Posts: 142 Offline
|
Posted: Sun Dec 07, 2003 12:04 am Post subject: |
 |
|
|
|
private message the person with *lag if you're a sysop? not sure if it's only sys op or what that can do it
if you mean in c++ i can't help you cause i don't have c++ and not in the mood to look for my CD
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Dec 07, 2003 12:17 pm Post subject: |
 |
|
|
|
Ask Explody for the source to his lagbot. I don't know why you'd want to recode it though, as his version is great. _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
|
|
Back to top |
|
 |
ExplodyThingy Server Help Squatter
Age:38 Gender: Joined: Dec 15 2002 Posts: 528 Location: Washington DC Offline
|
Posted: Sun Dec 07, 2003 12:18 pm Post subject: |
 |
|
|
|
Its really quite simple. A player requests "!lag MooMan". The bot iterates the player list and sends *lag when it finds a match. Then, in EVENT_Chat in MSG_Arena, you wait for a message that starts with "PING ". Thats the response from *lag. Then you just piece it apart and convert to integer the various numbers.
From there you can formulate a response and compare it against the limits.
Ill post the source if you wish, but keep in mind, it was one of the first ones I wrote and makes exessive use of Cat's String datatype. ITs really easy with that type, since its split() and to integer methods are quite useful with this type of message _________________ There are no stupid question, but there are many inquisitive idiots.
Loot
Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
|
|
Back to top |
|
 |
Ede Guest
Offline
|
Posted: Mon Dec 08, 2003 4:36 pm Post subject: |
 |
|
|
|
Well, that works then. I know how to send commands and then examine it in the EVENT_Chat. I might have problems spliting it up, but that shouldnt be too big of a problem... How do you know what chat message is which players? Like what if two players check two peoples lag at same time?
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Dec 08, 2003 6:12 pm Post subject: |
 |
|
|
|
MERVBot works where each command is processed in exact order received so you don't have to worry about two people asking at once.
But my question still stands... why rewrite Explody's plugin??
|
|
Back to top |
|
 |
ExplodyThingy Server Help Squatter
Age:38 Gender: Joined: Dec 15 2002 Posts: 528 Location: Washington DC Offline
|
Posted: Mon Dec 08, 2003 8:22 pm Post subject: |
 |
|
|
|
Well, actually, that is a known flaw. If two players request stats on two diferent players, the second checked player may be blamed for the first player's lag. You can really see this if your running the bot on a dialup machine, as the ~1200ms round trip data can delay it a bunch (300 there, 300 to send *lag, 300 to recieve readout). Another possible flaw that is present in my bot is the potential for spoofed messages. If a mod does "*arena PING Current: Muhahaha I pwnzor you!" then the bots response may very well be trashed. This can be minimized by the last thing in this post.
Also, you should be careful about how you store players such as the person requesting the check and the person checked. Its best to keep the player name in sting and iterate the list each time you need to get a player, rather than to store a pointer for each. It is possible for either one of the players to leave in that second delay between sending *lag and recieving the data.
If youre using atoi or equivalant to convert the string to numbers, make sure to spilt the ploss at the decimal point, and convert both of them into doubles. Divide the second one by 10, add it to the first and then youll have a legitimate readout. Also make sure to account for the funky negative ploss, as the display is -0.-1 instead of -0.1.
You should play with timers, too. Set a time to a player's tag to make sure they dont spam the bot with !lag or whatever you use. Set a timeout thing, to make sure that if the bot doesnt get a *lag response in ~5 seconds, expire it.
|
|
Back to top |
|
 |
ede Guest
Offline
|
Posted: Tue Dec 09, 2003 9:53 pm Post subject: |
 |
|
|
|
Quote: | But my question still stands... why rewrite Explody's plugin?? |
I dont want a lagger speccing bot, im going to be doing something else with the info... in fact, there are no limits, no speccing, no anything to do with dealing with laggers.
|
|
Back to top |
|
 |
ede Guest
Offline
|
Posted: Thu Dec 11, 2003 6:07 pm Post subject: |
 |
|
|
|
Explody, any way possible you could share your code with us for that plugin?
|
|
Back to top |
|
 |
ExplodyThingy Server Help Squatter
Age:38 Gender: Joined: Dec 15 2002 Posts: 528 Location: Washington DC Offline
|
Posted: Thu Dec 11, 2003 7:42 pm Post subject: |
 |
|
|
|
Enjoi.
What Im already working on as an alternative to this version is an "average lagger" it systematically *lags everyone in the arena, continuously, probably 1 send every minute, 1 player per send. It logs all the fields of the lag data and generates averages of a players info. If in league or in another event, thier current data deviates an excessive ammount from their average, then staff is notified of potential cheating.
lagbot merv plugin version .71
lagbot.zip - 10.27 KB
File downloaded or viewed 32 time(s)
|
|
Back to top |
|
 |
ede Guest
Offline
|
Posted: Fri Dec 12, 2003 10:54 am Post subject: |
 |
|
|
|
Well sometimes the lag may not be your fault, more lag on the current line, ISP problems, ect.
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Dec 12, 2003 6:02 pm Post subject: |
 |
|
|
|
That's why it would notify, not automatically ban them.
|
|
Back to top |
|
 |
|