# M-Browser by M Hambloch, https://hambloch.com/kingpin
# game server browser for "Kingpin - Life of Crime" and "KingpinQ3"

# Installation
- Option 1:
  - Unzip the file Kingpin_M_Browser.exe and run it.
    Press "t" and ENTER to edit the path(s) to your Kingpin and/or KingpinQ3 game(s) manually.
- Option 2:	
  - Kingpin: Unzip the file Kingpin_M_Browser.exe to your Kingpin directory, where the kingpin.exe is, 
    e.g. C:\Program Files\Kingpin\ (if the file Kingpin_M_Browser.exe already exists, overwrite it.)
  - KingpinQ3: Unzip the file Kingpin_M_Browser.exe to your KingpinQ3 directory, where the KingpinQ3-32.exe is, 
    e.g. C:\Program Files\KingpinQ3-Beta-1\ (if the file already exists, overwrite it.)

- To change M-Browser's font size, right click the title bar of the M-Browser console window
  and click 'Properties'. See here: https://hambloch.com/kingpin/mbrowser/font_size.png

- Type "m" and press ENTER to enable joining games by clicking a URL
  (e.g. by clicking the "M" links on the list page at https://hambloch.com/kingpin)

# Files created/downloaded by M-Browser:  
  - "Kingpin_M_Browser.cfg" is your config file (optional) which you can create/edit by typing "t" and ENTER.
  - "Kingpin_M_Browser_kingpin.lst" and "Kingpin_M_Browser_kingpinq3.lst" are your Favorites lists (optional).
     You can download a list of all recently active servers into your Favorites list by typing "z" when in Favorites mode
     (Type "l" or "L" and ENTER to go to FAVORITES mode) or you can create one from scratch. 
     You can edit the list by typing "e" when in Favorites mode.     
     There can also be a backup version of each of the two lists named 
     "Kingpin_M_Browser_kingpin_backup.lst" and "Kingpin_M_Browser_kingpinq3_backup.lst".
  - "Kingpin_M_Browser_readme.txt" (optional) can be downloaded from within M-Browser
     (type "h" and ENTER to download/open readme file).

  - M-Browser doesn't read or in any other way touch any of your files, except:
    - It checks if the path(s) to the game exe file(s) as configured in the cfg file for Kingpin and/or KingpinQ3 exist(s).
      If so, they will be launched when you join a server using M-Browser. 
    - If you activate joining by URL (M-Links), M-Browser will write an entry to your windows registry. Type "m" and ENTER for more.
    - No other files are read by M-Browser other than those created by M-Browser itself.

# Please make sure you have the latest version of M-Browser which is available at 
  https://forum.hambloch.com/kingpin.php?dl=mbrowser
  M-Browser can also update itself to the latest version: Start M-Browser, then type "u" and press ENTER. 

# ANTIVIRUS SOFTWARE WARNINGS
- It is possible you get a virus warning when running M-Browser.
  This is a "false positive" warning, so you may need to allow M-Browser in your anti-virus software.
- New versions of M-Browser are uploaded to virustotal.com on release. 
  If you want to make sure you have the original version 2.35, upload your copy of Kingpin_M_Browser.exe 
  to virustotal.com. If you have the correct version it will immediately redirect you to 
  https://www.virustotal.com/gui/file/73bbc8ad1d5f38860281f6d1aae01fb5cc95e3357850e9ca2832db80c4794549
  To make sure you have the latest version of this text/readme file (Kingpin_M_Browser_readme.txt), delete the readme file, 
  run M-Browser and type "u" or "h" to download the latest version or go to the latest version here: 
  https://forum.hambloch.com/kingpin.php?dl=mbrowser

# What M-Browser does ;)
  M-Browser is a game server browser for both "Kingpin - Life of Crime" and "KingpinQ3".
  It loads a live list of running servers and allows to join the servers.
  It also allows to maintain favorite servers lists for each game.
  
  When you start M-Browser, it will look for both kingpin.exe and KingpinQ3-32.exe (in that order)
  in the directory it is run from 
  unless a cfg file (Kingpin_M_Browser.cfg) is present. 
  If a cfg file is present, M-Browser will use the game listed first in the cfg file
  where you can set the paths to both games.
  Type "t" and ENTER for more information and to create or edit the cfg file.
  When you specify paths for both Kingpin and KingpinQ3 games, you can switch between
  the games by typing 'w' in M-Browser, which will switch the order of games in the cfg file
  around, so that M-Browser remembers the last game used.
  When none of the two game paths is specified, M-Browser will delete the cfg file.

  You can also run multiple instances of M-Browser with individual configurations even
  from the same folder. Just create a copy of Kingpin_M_Browser.exe under a new name.
  Each copy maintains its own configuration and server lists.
  (Avoid spaces in file names when renaming Kingpin_M_Browser.exe)

  If you have activated the M-Links feature to join via URL, please note that each game
  (Kingpin and KingpinQ3) can only have one version of M-Browser registered to open links
  with at a time. The last version of M-Browser you activated the feature from will be used.

  When you have activated the M-Links feature,
  you can join Kingpin servers by clicking a URL like this:
   m-browser://IP:PORT (e.g. m-browser://45.94.58.60:31510)
  and KingpinQ3 servers like this:
   m-browser2://IP:PORT (e.g. m-browser2://62.75.216.22:31610)
  (You can also use hostnames instead of IP addresses.)
  You need to activate the feature for each game (Kingpin and KingpinQ3) separately.
  You can use different versions for each game, i.e. one for Kingpin and one for KingpinQ3.
  See M-Links on https://hambloch.com/kp


######################################################################
# M-Browser
# version history

# v2.35, May 05 2024
- fixed cosmetic bug when server has no hostname

# v2.34, March 02 2024
- updated offline list

# v2.33, February 24 2024
- updated offline list

# v2.32, December 17 2023
- fixed bug with joining by URL (m-browser://) when run from game directory

# v2.31, October 21 2023
- updated offline list

# v2.30, June 06 2023
- updated offline list

# v2.29, March 18 2023
- minor improvements to navigation and cosmetic bug fixes
- updated offline list

# v2.28, November 23 2022
- minor improvements to navigation and cosmetic bug fixes

# v2.27, November 19 2022
- further improvements to navigation and cosmetic bug fixes

# v2.26, November 19 2022
- further improvements to navigation
- fixed some/most/all of the bugs introduced in v2.25 ;) sigh...

# v2.25, November 17 2022
- major refactoring...
- improved help texts, error messaging and navigation in a ton of scenarios
- a lot of changes to file management and navigation overall
- further developed switching between games (option "w")
- fixed bugs introduced in v2.24:
  - bug with Offline mode not working when M-Browser not run from Kingpin directory (introduced in v2.24)
  - bugs with joining servers when game exe file names or paths had blanks/spaces in them
  - bugs with switching games

# v2.24, November 13 2022
- M-Browser can now be run from any directory.
  Paths to Kingpin and KingpinQ3 games can now be configured
  so you can switch between games between in M-Browser (Type "w" and ENTER).
  Start M-Browser and type "t" for more!

# v2.23, November 11 2022
- new error messaging when Kingpin or KingpinQ3 game executable cannot be found.
- fixed motd format when resizing window

# v2.22, November 10 2022
- fixed going to offline mode when no live list
- more bug fixes
- more color coding

# v2.21, November 10 2022
- fixed bug with offline mode (introduced in v2.19)
- fixed screen width and height

# v2.20, November 09 2022
- added some color coding

# v2.19, November 08 2022
- live list reformat
- always allowing "m" now, i.e. registering M-Browser to join via URL (run M-Browser and type "m" for more)

# v2.18, October 20 2022
- fixed bug with KingpinQ3 menu
- fixed bug with KingpinQ3 beta version "KingpinQ3-32.exe"

# v2.17, October 20 2022
- fixed bug with fallback sequence to offline mode

# v2.16, October 19 2022
- M-Browser now automatically uses SSL if available and otherwise automatically switches to http 
  if a https connection cannot be established. If a http connection cannot be made, either,
  M-Browser will go to Offline Mode. 

# v2.15, October 18 2022
- added error message when Kingpin_M_Browser.exe file has been renamed and new name has spaces/blanks in it
- updated offline lists
- If you have issues running this version on an old computer or operating system,
  please use version 2.13 instead which is included in the download - or better use the latest version.

# v2.14 ssl, June 22 2022
- M-Browser now uses SSL for all connections to our server.
  If you have issues running this version on an old computer or operating system,
  please use version 2.13 instead which is included in the download - or better use the latest version.
  
# v2.13, May 01 2022
- some cosmetic changes and small bug fixes
- updated offline lists

# v2.12, January 15 2021
- some cosmetic changes and small bug fixes
- updated offline lists

# v2.11, January 12 2021
- minor bug fixes and cosmetic updates

# v2.10, January 11 2021
- renamed "Custom List" to "Favorites" throughout whole program! 
- modified option "z" when in Favorites mode to download all servers 
  to your Favorites that had players in the last 6 months.

# v2.09, January 11 2021
- updated offline lists
- added option "p" to show ip addresses in live list mode (used to show hostname only)

# v2.08, January 8 2021
- improved download and program upgrade procedures

# v2.07, January 7 2021
- cosmetic bug fixes: menu dialogues, menu and list formatting

# v2.06, December 28 2020
- further improved KingpinQ3 support
- added support to join KingpinQ3 servers by clicking "M" on the https://hambloch.com/kingpin server list page
- A default Favorites list can be downloaded for either Kingpin or KingpinQ3, depending on which game you run M-Browser with
- better error messaging when kingpin or kingpinq3 exe not found

# v2.05, December 28 2020
- M-Browser now works with KingpinQ3. Just copy M-Browser to your KingpinQ3 directory
  (Offline mode only works for Kingpin and not KingpinQ3 though).
- fixed bug where manually connecting by typing host:port no longer worked when in live mode
- fixed bug that allowed b and z when in live mode (should only work in Favorites mode)

# v2.04, December 28 2020
- fixed bug that allowed b and z when in offline mode (should only work in Favorites mode)

# v2.03, December 26 2020
- fixed cosmetic bug with option "g"
- changed live list player count display format

# v2.02, December 24 2020
- fixed bugs with:
 - option "u" (upgrade to latest version) now always works, even if there is no newer version available. 
   Will also download/update the readme and will download the default Favorites list
   unless you already have a Favorites list!
 - option "d" (download latest version) now always works, even if there is no newer version available.

# v2.01, December 12 2020
- option "u" (upgrade to latest version) now always works when in live or offline mode,
  even if there is no newer version available. 
  Will also download/update the readme and will download the default Favorites list - unless you already have a Favorites list!
- option "d" (download latest version) now always works even if there is no newer version available.
- fixed menu format bug

# v2.0, December 10 2020
- various bug fixes
- updated offline fallback list
- improved MOTD and menu formatting and text
- changed command prompt (repeat previous input) defaults 
- added option "g" to LIVE LIST menu: when a game is scheduled which you would see in the MOTD section below the menu in M-Browser, you can type "g" and press ENTER to join the game. Visit www.kingpin.info for our regular games schedule (Thursdays and Fridays from 9:30pm UK).
- added option "h" to download/open readme file: You can open the M-Browser readme file by typing "h" and pressing ENTER. It will then open Kingpin_M_Browser_readme.txt (in case you have renamed Kingpin_M_Browser.exe to XXX.exe, it will look for a file named XXX_readme.txt).
  To download the latest readme file, delete the current readme, then open M-Browser and type "h" and press ENTER. The latest readme will be downloaded. Once a readme is present, "h" will allow you to open it. The latest readme is also automatically downloaded when you type "u" to upgrade M-Browser.
- added new mode: FAVORITES
	When you launch M-Browser, it will try to download the current live server list from kingpin.hambloch.com. When that is successful, the list will be displayed and M-Browser runs in LIVE LIST mode.
	When the live list cannot be retrieved, M-Browser will switch to OFFLINE mode automatically. It will display a hardcoded (in the exe) list of servers that you can try to connect to. You can also type "o" to go to offline mode manually. 
        If you want M-Browser to start in offline mode and not download the live list, start it like this: "KingpinM_Browser.exe o"
	New in this version: In addition to LIVE LIST mode and OFFLINE mode, there is now a third mode "FAVORITES" available. You can type "l" to go to FAVORITES mode manually. If you want M-Browser to start in FAVORITES mode, start it like this: "KingpinM_Browser.exe l"
	FAVORITES mode looks for a list file named "Kingpin_M_Browser.lst" (in case you have renamed Kingpin_M_Browser.exe to XXX.exe, it will look for a file named XXX.lst). When it finds it, it will display the list. You can download a default list from kingpin.hambloch.com that contains all known servers by typing "z". Then type "e" to edit the list.
	If no list can be found, help is displayed, including how to format the list. Type "e" to create a list (you will then be prompted to confirm creating the list file). Make your changes, save the file, in M-Browser type "l" to display/refresh the list.
	If you already have a Favorites list and then download the latest servers, a backup of the previous list will be created. Type "b" to restore the previous list / switch between lists.


# v1.9o, December 5 2020 - never released

# v1.9n, November 17 2020
- updated offline fallback list

# v1.9m, October 24 2020
- fixed MOTD formatting
- improved add/remove own servers menu
- updated offline fallback list

# v1.9l, May 6 2020
- further improved OFFLINE mode. (M-Browser is run in OFFLINE mode when it cannot receive a server list from kp.hambloch.com OR when you run it like this: "Kingpin_M_Browser.exe o" OR when you type "o" from M-Browser's menu.)
- updated offline fallback list.
- changed command prompt so that pressing ENTER repeats previous input

# v1.9k, September 08 2019
- improved OFFLINE mode.
- updated offline fallback list

# v1.9j, June 25 2019
- updated offline fallback list

# v1.9i, April 8 2019
- updated offline fallback list

# v1.9h, December 19 2018
- updated offline fallback list

# v1.9g, October 9 2018
- updated offline fallback list

# v1.9f, July 27 2017
- updated offline fallback list
- changed some menu texts
- continuing to try to avoid false positive Anti Virus warnings

# v1.9e, May 8 2017
- fixed bug with menu

# v1.9d, May 8 2017
- fixed bug with player count

# v1.9c, May 8 2017
- added option to connect to manually entered IP:port (to connect to servers that are not in the list)

# v1.9b, May 7 2017
- re-compiled to avoid false positive virus warnings

# v1.9a, February 24 2017
- updated offline fallback list with current servers

# v1.9, November 7 2016
- updated offline fallback list with current servers

# v1.8, June 5 2016
- server admins: -added "add/remove servers" option to add/remove/exclude your servers to/from the kingpin.hambloch.com server list
  -added command line options that can be used in a batch file to add/remove/exclude servers on server start/stop
  -for details on this, start the program, then type "s" and then press ENTER
- added help texts
- updated offline fallback list
- some bug fixes
- added help texts

# v1.7, June 1 2016
- added support to join servers per URLs. you can now activate the "M" links on the server list page at https://hambloch.com/kingpin.
  once activated, you can simply join a server by clicking the "M" icon next to a server in the list on the webpage (just check out the page if you don't know what i am talking about ;))
- you may have to run M-Browser as Administrator when you activate the links initially, as otherwise the changes might not be written to the registry.
  (Once you have the links working you don't need to activate them again. You also don't need to run M-Browser to click the M links.
  you may have to restart your browser for changes to take effect after initially activating the links.)
- the following key is created in the registry to make the links work; delete that to deactivate the links again:
	[HKEY_CLASSES_ROOT\M-Browser]
  that's the only change made by M-Browser. other than that it doesnt touch any of your files!

# v1.6, May 31 2016
- improved update process 
- added more servers to offline fallback server list

# v1.5, May 30 2016
- added option to upgrade when a new version of M-Browser is released!
- added link to provide feedback or bug reports

# v1.4, May 30 2016
- added option to switch between offline fallback list and live list any time
- added download link to latest version when a new version of M-Browser is released
- added misc links (e.g. chat, kingpin.hambloch.com, kingpin.info)

# v1.3, May 30 2016
- added highlighting for servers with players online

# v1.2, May 29 2016
- added fallback server list of known servers, which will be displayed when no live server list can be retrieved from the server list at kingpin.hambloch.com
   (to start M-Browser in offline mode, run it like this: "Kingpin_M_Browser.exe o")
- added version checking (a message is displayed when a new version of M-Browser is available)
- added MOTD. Used to e.g. display a countdown to the next game or to push any other message to clients
- removed fixed console position

# v1.1, May 28 2016
- added fixed position for the console window (removed in 1.2)
- added totals for number of players and servers online

# v1.0 (has no version number), May 27 2016
- retrieves Kingpin server list from kingpin.hambloch.com
- shows current map and number of players
- offers menu to connect to servers and to refresh list 
- when you connect using M-Browser, console will be enabled

########################################################################################

# M-Browser is independent from qtracker or gamespy, so it works even when all that is down ;)

# Your version of Kingpin needs to be updated to the latest version 1.21 which you can get here:
  https://forum.hambloch.com/portal_database.php?action=view&fid=25&cid=3&styleid=25

# It is also highly recommended you download MH's Kingpin Patch from https://kingpin.info or here:
  https://forum.hambloch.com/portal_database.php?action=view&fid=214&cid=3&styleid=25
  It gives you a lot of enhancements like higher resolutions etc..
