forked from MarkHofmann11/WWIVEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WEREPLY.PAS
53 lines (46 loc) · 1.1 KB
/
WEREPLY.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
UNIT WEReply;
{$DEFINE CAN_OVERLAY}
{$I WEGLOBAL.PAS}
INTERFACE
FUNCTION HandleReply:Boolean;
IMPLEMENTATION
USES WELine, WEVars, WEInput, WEOutput,WEUser,WEEsm;
FUNCTION HandleReply:Boolean;
VAR
l:LineType;
s:string;
typ:integer;
ch:char;
BEGIN
Typ:=Info.AskReply;
IF Typ>Setting.ReplyType THEN Typ:=Setting.ReplyType;
IF (typ=2) OR
((typ=1) AND ((pos('@',Destination)>0) OR (pos('#',Destination)>0))) THEN
BEGIN
StatusLine3(Gets(XSTR+57));
REPEAT
ch:=ReadSet(['Y','N','M','Q','D','?',#27,#13]);
IF ch='?' THEN
statusline3(Gets(XSTR+58))
ELSE IF (ch='Q') OR (ch=#27) THEN BEGIN
HandleReply:=FALSE;
StatusLine3('');
END ELSE BEGIN
s:=Gets(XSTR+59);
IF ch='Y' THEN s:=s+Gets(XStr+60)
ELSE IF ch='N' THEN s:=s+Gets(XSTR+61)
ELSE IF ch='M' THEN s:=s+Gets(XSTR+62)
ELSE s:='';
IF s<>'' THEN
BEGIN
StringToLine(s,l);
InsertLine(1,l);
InitLine(l);
InsertLine(2,l);
END;
HandleReply:=TRUE;
END;
UNTIL ch<>'?';
END;
END;
END.