Server History - You can submit a revised version

Author Topic: Server History - You can submit a revised version  (Read 4564 times)

Server History

Server History records the servers you have joined and saves it in a text file. You can then join them later and view your history / clear it by pressing the cyan History button on the join server window.


Features :
-Clearing history
-Joining servers from history list
-Button to open history list
-History list scroll gui
-Saves to a text file
-Records history right when you join a server
-Oldest history is at the top while latest history is at the bottom


Planned :
-Post your edits to improve this add-on

Possible :
-Make limits

Questions :

Q : Why does it display IPs in the list gui?
A :
I'd have to read the hist.txt file and match the host and server name then get the IP from the right line in the file (there could be multiple) and then i'd have to store the ip and port and then finally connect to it - with this, i can just use string manipulation directly on the textlistctrl and connect faster. With multiple records, it could also attempt to join multiple times so i'd have to make a simple solution for that - yet right now it's just more straightforward to get the ip and port directly from the gui.

Q : Is there a limit to my history?
A : Not as of now. I might do this.

Q : Where is my history stored?
A : config/client/hist.txt

Q : How does it work?
A : Stores host+servername then SPACE ipAndPort in hist.txt, adds a row to the history list gui for it. Clearing history clears the history list gui and deletes the hist.txt file. OnConnectionAccepted detects that you joined a server, and that's when it starts to record history.
« Last Edit: July 07, 2013, 09:03:21 AM by Pacnet2012³ »

Get those IPs out of the gui

Get those IPs out of the gui
I'd have to read the hist.txt file and match the host and server name then get the IP from the right line in the file (there could be multiple) and then i'd have to store the ip and port and then finally connect to it - with this, i can just use string manipulation directly on the textlistctrl and connect faster. With multiple records, it could also attempt to join multiple times so i'd have to make a simple solution for that - yet right now it's just more straightforward to get the ip and port directly from the gui.

If anyone is willing to do this for me - go ahead and edit it, you will get credit. History is saved in config/client/hist.txt and to get the last word in a line you have just read you can use getWord(line, getWordCount(line)-1); but of course replace "line" with the right variable
« Last Edit: July 06, 2013, 02:33:47 PM by Pacnet2012³ »


-blah-
Try whether you can add the ip in a field that is technically not visible (for example field 5 if your list is set to display 4), I don't know whether it works but it's worth a try


Hey! My server's in there! =D

I'd have to read the hist.txt file and match the host and server name then get the IP from the right line in the file (there could be multiple) and then i'd have to store the ip and port and then finally connect to it - with this, i can just use string manipulation directly on the textlistctrl and connect faster. With multiple records, it could also attempt to join multiple times so i'd have to make a simple solution for that - yet right now it's just more straightforward to get the ip and port directly from the gui.
Color-code it.

Make everything after the server name white.

Cool, but can you make the esc key close it?

Would be better if when you pressed the button, the actual player list clears and shows your server history.

it looks like it repeats entries in the picture

does it actually do this or am i stupid

also i think most recent at top would make more sense


it's a nice thing regardless; i like it

the server browser is really crowded I think we need an addon to completely overhaul it and add like different tabs and stuff

*Sees my server on server list*
yeee boii

OT: This add-on is great.

the server browser is really crowded I think we need an addon to completely overhaul it and add like different tabs and stuff
This

I really don't like the current gui

it looks like it repeats entries in the picture

does it actually do this or am i stupid
Made on purpose.

more recent at the top

Sure, will do.
« Last Edit: July 07, 2013, 09:04:45 AM by Pacnet2012³ »