Well, you need to define for yourself what you mean. How exactly do you define lag? Lag to yourself (??), to the server you are on, the average to several servers, and if so, which or all, to a specific user in your channel, or to an average of all.

Then you need to find a way to detect such lag. Are you going to take a standard ping reply, or send a command to a server and see how long it takes to get a response.

Assuming you have found your lag and have a single count in seconds, I assume with "graph" you mean some kind of progress bar. You can display just the bar, or display the entire range, with the bar colored differently from the range. Next decision is which characters you will use for such a bar. Some people use |, others insert a background-colored space, or even a dialog window.

Almost done on the decision making, you have to translate the lagtime to your bar. Are you gonna have it display absolute seconds (add one | for each second), or a procentual display (in which case: what is 100%?)

After you have made all these decisions for yourself, you can start writing the code. Don't be afraid to change a decision along the way if it isn't feasible, and be prepared for a lot of debugging and errorfinding.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius