[contents of README]

ProgressQuest v6.2(probably pre-release)
-----------------------------------------
This directory represents an ex post facto rendering of pq6 in its
various versions in svn, so that changes will be trackable thataway.

The version as of this moment in svn is 6.2, but this is probably not
the final 6.2. That will come in the next checkin.

(I didn't add this file in PQ 6.0, but after that you can use this README
to trace the checkin history using svn.)
This commit is contained in:
Eric Fredricksen
2006-12-24 20:08:53 +00:00
parent 1e1e8379a6
commit 51792e632d
133 changed files with 793 additions and 19106 deletions
+16 -15
View File
@@ -4,8 +4,8 @@ unit SelServ;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls, Psock, NMHttp;
Windows, Messages, SysUtils, Forms, Dialogs, StdCtrls, ExtCtrls,
ComCtrls, Controls, Classes;
type
TServerSelectForm = class(TForm)
@@ -16,13 +16,11 @@ type
Desc: TRichEdit;
Select: TButton;
Button2: TButton;
ServerLoader: TNMHTTP;
Descs: TListBox;
Timer1: TTimer;
Hosts: TListBox;
Options: TListBox;
AccessCode: TLabeledEdit;
procedure ServerLoaderSuccess(Cmd: CmdType);
procedure ServersClick(Sender: TObject);
procedure SelectClick(Sender: TObject);
procedure AccessCodeChange(Sender: TObject);
@@ -31,6 +29,7 @@ type
private
procedure Fetch(path: String);
function CurrentOpts: Integer;
procedure ParseServerList(body: String);
public
function Go: Boolean;
end;
@@ -42,7 +41,7 @@ function Take(var s: String): String;
implementation
uses NewGuy, Login, Main;
uses NewGuy, Login, Main, Web;
{$R *.dfm}
@@ -57,12 +56,12 @@ begin
end;
end;
procedure TServerSelectForm.ServerLoaderSuccess(Cmd: CmdType);
procedure TServerSelectForm.ParseServerList(body: String);
var
s, def: String;
ndef: Integer;
begin
s := ServerLoader.Body;
s := body;
if (LowerCase(Take(s)) = 'ok') then begin
def := Take(s);
ndef := 0;
@@ -78,7 +77,7 @@ begin
ServersClick(Self);
// Select.Enabled := true;
end else begin
ShowMessage(ServerLoader.Body);
ShowMessage(body);
ModalResult := mrCancel;
end;
end;
@@ -96,6 +95,8 @@ begin
end;
procedure TServerSelectForm.Fetch(path: String);
var
url, reply: String;
begin
Select.Enabled := false;
Servers.Items.Clear;
@@ -106,17 +107,17 @@ begin
if path <> '' then
Caption := Caption + ' [' + path + ']';
Desc.Text := 'Fetching realm list from server...';
url := 'http://www.progressquest.com/list.php?' + RevString + '&p=' + path;
if AccessCode.Visible then
url := url + '&ac=' + UrlEncode(AccessCode.Text);
try
Screen.Cursor := crHourglass;
try
if AccessCode.Visible
then ServerLoader.HeaderInfo.Password := AccessCode.Text
else ServerLoader.HeaderInfo.Password := '';
ServerLoader.Get('http://www.progressquest.com/list.php?' + RevString + '&p=' + path +'&ac=' + UrlEncode(ServerLoader.HeaderInfo.Password));
reply := DownloadString(url);
ParseServerList(reply);
except
on ESockError do begin
ShowMessage('Error connecting to server');
ServerLoader.Abort;
on EWebError do begin
ShowMessage('Error connecting to Progress Quest server');
ModalResult := mrCancel;
end;
end;