-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRC.PAS
80 lines (69 loc) · 1.21 KB
/
IRC.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Unit IRC;
Interface
Procedure IRCChat;
Implementation
Uses OpCrt,Dos,GenSubs,IO,Multi,
IRCStart,Cmds,IRCDis,IRCVars,IRCIO;
Procedure IOLoop;
Var Loop:Integer;
Begin
Repeat
Slice;
If CharPressed Then
Begin
GoXY(LastX,24);
GetChar(Ch);
If Ch<>#13 Then
Begin
Case Ch of
#8:Begin
Print(^H+' '+^H);
LastX:=WhereX;
Delete(OutStr,Length(OutStr),1);
End;
#27,^I:;
Else
Begin
OutStr:=OutStr+Ch;
Print(Ch);
LastX:=WhereX;
End;
End;
End;
End
Else
Begin
For Loop:=1 To 500 Do
Begin
Slice;
If (Not CharPressed) Then
Begin
Delay(1);
Slice;
If Loop=500 Then ReadChat;
End;
End;
End;
Slice;
Until Ch=#13;
ReadChat;
If OutStr[1]='/' Then Cmd(OutStr) Else SaveChat('P');
LastX:=1;
GoXy(1,24); ClsEol;
Ch:=#0;
OutStr:='';
End;
Procedure Main;
Begin
Repeat
IOLoop;
Until QuitIRC;
End;
Procedure IRCChat;
Begin
Start;
Main;
Cls;
End;
Begin
End.