4 \83A
\83v
\83\8a\83P
\81[
\83V
\83\87\83\93\91S
\91Ì
\82Å
\8eg
\82¤
\82³
\82Ü
\82´
\82Ü
\82È
\83f
\81[
\83^
\82ð
\92è
\8b`
9 uses Windows, IniFiles, BRegExp, Graphics, SysUtils, Forms, Dialogs, Classes,
13 TReturnKeyFunction = (kfYenN, kfReturn, kfYenNReturn, kfConstText);
14 TSoundArrived = (saFalse, saTrue, saParent);
15 TLogWindowPreviewStyle = (psConversation, psScript, psScriptWithLineBreak);
16 TLogListPreviewStyle = (psNormal, psTagStripped);
17 TSurfacePreviewOnScriptPointPosition = (spspMainWindowLeft, spspMainWindowRight);
19 //SSTP Bottle
\82Ì
\90Ý
\92è
20 TBottlePrefs = class(TObject)
24 FIgnoreTimeCritical: boolean;
26 FShowConstBar: boolean;
28 FDblClkInsert: boolean;
29 FShowToolBar: boolean;
30 FDefaultScript: TStringList;
32 FMetaWordColor: TColor;
34 FMarkErrorColor: TColor;
39 FWhenCtrlReturn: TReturnKeyFunction;
40 FWhenShiftReturn: TReturnKeyFunction;
41 FWhenReturn: TReturnKeyFunction;
42 FNoTranslate: boolean;
46 FSilentWhenHidden: boolean;
48 FSenderWindowPosition: TRect;
49 FTabPosition: TTabPosition;
50 FLogWindowPosition: TRect;
52 FIgnoreFrequentYenS: boolean;
53 FWaitScriptEnd: integer;
54 FNoSendGhostList: boolean;
55 FCgiNameGhost: String;
58 FLogWindowDividerPos: integer;
60 FUseHttpProxy: boolean;
62 FProxyAddress: String;
63 FConfirmOnExit: boolean;
64 FFixMessySurface: boolean;
65 FResetIfGhostAfterSend: boolean;
66 FGhostDropDownCount: integer;
67 FLogWindowPreviewStyle: TLogWindowPreviewStyle;
70 FLogWindowColumnWidth: String;
71 FClearAfterSend: boolean;
72 FAutoJoinChannels: TStrings;
74 FHUTagTo01Tag: boolean;
75 FWarnYenTNotExist: boolean;
76 FWarnScopeChangeInSynchronize: boolean;
77 FNeedConfirmBeforeSend: boolean;
80 FVisibleGhostsList: TStringList;
81 FSurfacePreviewOnHint: boolean;
82 FSurfacePreviewOnScriptPoint: boolean;
83 FSurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition;
84 FNoExtraSSTPHeaders: boolean;
85 FLogListPreviewStyle: TLogListPreviewStyle;
86 procedure SetDblClkInsert(const Value: boolean);
87 procedure SetDefaultScript(const Value: String);
88 procedure SetIgnoreTimeCritical(const Value: boolean);
89 procedure SetMarkErrorColor(const Value: TColor);
90 procedure SetMarkUpColor(const Value: TColor);
91 procedure SetMetaWordColor(const Value: TColor);
92 procedure SetNoConfirm(const Value: boolean);
93 procedure SetShowConstBar(const Value: boolean);
94 procedure SetShowToolBar(const Value: boolean);
95 procedure SetStayOnTop(const Value: boolean);
96 procedure SetTalkColorH(const Value: TColor);
97 procedure SetTalkColorU(const Value: TColor);
98 procedure SetAutoStart(const Value: boolean);
99 procedure SetWhenCtrlReturn(const Value: TReturnKeyFunction);
100 procedure SetWhenReturn(const Value: TReturnKeyFunction);
101 procedure SetWhenShiftReturn(const Value: TReturnKeyFunction);
102 procedure SetNoTranslate(const Value: boolean);
103 procedure SetNoDescript(const Value: boolean);
104 procedure SetBgColor(const Value: TColor);
105 procedure SetServerPort(const Value: integer);
106 procedure SetSilentWhenHidden(const Value: boolean);
107 procedure SetLUID(const Value: String);
108 procedure SetSenderWindowPosition(const Value: TRect);
109 procedure SetTabPosition(const Value: TTabPosition);
110 procedure SetLogWindowPosition(const Value: TRect);
111 procedure SetIgnoreFrequentYenS(const Value: boolean);
112 procedure SetNoTransUrl(const Value: boolean);
113 procedure SetWaitScriptEnd(const Value: integer);
114 procedure SetNoSendGhostList(const Value: boolean);
115 procedure SetLogWindowDividerPos(const Value: integer);
116 procedure SetProxyAddress(const Value: String);
117 procedure SetProxyPort(const Value: integer);
118 procedure SetUseHttpProxy(const Value: boolean);
119 procedure SetConfirmOnExit(const Value: boolean);
120 procedure SetFixMessySurface(const Value: boolean);
121 procedure SetResetIfGhostAfterSend(const Value: boolean);
122 procedure SetGhostDropDownCount(const Value: integer);
123 procedure SetLogWindowPreviewStyle(const Value: TLogWindowPreviewStyle);
124 procedure SetTalkColorS(const Value: TColor);
125 procedure SetLogWindowColumnWidth(const Value: String);
126 procedure SetClearAfterSend(const Value: boolean);
127 procedure SetAutoJoinChannels(const Value: TStrings);
128 procedure SetFMOName(const Value: TStrings);
129 function GetDefaultScript: String;
130 procedure SetHUTagTo01Tag(const Value: boolean);
131 procedure SetWarnScopeChangeInSynchronize(const Value: boolean);
132 procedure SetWarnYenTNotExist(const Value: boolean);
133 procedure SetNeedConfirmBeforeSend(const Value: boolean);
134 procedure SetShowRuler(const Value: boolean);
135 procedure SetHideGhosts(const Value: boolean);
136 procedure SetVisibleGhostsList(const Value: TStringList);
137 procedure SetSurfacePreviewOnHint(const Value: boolean);
138 procedure SetSurfacePreviewOnScriptPoint(const Value: boolean);
139 procedure SetSurfacePreviewOnScriptPointPosition(
140 const Value: TSurfacePreviewOnScriptPointPosition);
141 procedure SetNoExtraSSTPHeaders(const Value: boolean);
142 procedure SetLogListPreviewStyle(const Value: TLogListPreviewStyle);
144 property NoSendGhostList: boolean read FNoSendGhostList write SetNoSendGhostList;
145 property ConfirmOnExit: boolean read FConfirmOnExit write SetConfirmOnExit;
146 property AutoStart: boolean read FAutoStart write SetAutoStart;
147 property TabPosition: TTabPosition read FTabPosition write SetTabPosition;
148 property GhostDropDownCount: integer read FGhostDropDownCount write SetGhostDropDownCount;
149 property NoTranslate: boolean read FNoTranslate write SetNoTranslate;
150 property NoDescript: boolean read FNoDescript write SetNoDescript;
151 property NoTransUrl: boolean read FNoTransUrl write SetNoTransUrl;
152 property SilentWhenHidden: boolean read FSilentWhenHidden write SetSilentWhenHidden;
153 property FixMessySurface: boolean read FFixMessySurface write SetFixMessySurface;
154 property HUTagTo01Tag: boolean read FHUTagTo01Tag write SetHUTagTo01Tag;
155 property ResetIfGhostAfterSend: boolean read FResetIfGhostAfterSend write SetResetIfGhostAfterSend;
156 property ClearAfterSend: boolean read FClearAfterSend write SetClearAfterSend;
157 property NeedConfirmBeforeSend: boolean read FNeedConfirmBeforeSend write SetNeedConfirmBeforeSend;
158 property IgnoreFrequentYenS: boolean read FIgnoreFrequentYenS write SetIgnoreFrequentYenS;
159 property WarnYenTNotExist: boolean read FWarnYenTNotExist write SetWarnYenTNotExist;
160 property WarnScopeChangeInSynchronize: boolean read FWarnScopeChangeInSynchronize write SetWarnScopeChangeInSynchronize;
161 property WaitScriptEnd: integer read FWaitScriptEnd write SetWaitScriptEnd;
162 property StayOnTop: boolean read FStayOnTop write SetStayOnTop;
163 property IgnoreTimeCritical: boolean read FIgnoreTimeCritical write SetIgnoreTimeCritical;
164 property TalkColorH: TColor read FTalkColorH write SetTalkColorH;
165 property TalkColorU: TColor read FTalkColorU write SetTalkColorU;
166 property TalkColorS: TColor read FTalkColorS write SetTalkColorS;
167 property MarkUpColor: TColor read FMarkUpColor write SetMarkUpColor;
168 property MetaWordColor: TColor read FMetaWordColor write SetMetaWordColor;
169 property MarkErrorColor: TColor read FMarkErrorColor write SetMarkErrorColor;
170 property BgColor: TColor read FBgColor write SetBgColor;
171 property DefaultScript: String read GetDefaultScript write SetDefaultScript;
172 property ShowRuler: boolean read FShowRuler write SetShowRuler;
173 property DblClkInsert: boolean read FDblClkInsert write SetDblClkInsert;
174 property ShowToolBar: boolean read FShowToolBar write SetShowToolBar;
175 property ShowConstBar: boolean read FShowConstBar write SetShowConstBar;
176 property NoConfirm: boolean read FNoConfirm write SetNoConfirm;
177 property HomePage: string read FHomePage;
178 property WhenReturn: TReturnKeyFunction read FWhenReturn write SetWhenReturn;
179 property WhenShiftReturn: TReturnKeyFunction read FWhenShiftReturn write SetWhenShiftReturn;
180 property WhenCtrlReturn: TReturnKeyFunction read FWhenCtrlReturn write SetWhenCtrlReturn;
181 property ServerPort: integer read FServerPort write SetServerPort;
183 property CgiName: string read FCgiName;
184 property CgiNameGhost: String read FCgiNameGhost;
185 property CgiFetchLog: String read FCgiFetchLog;
186 property GLogPage: String read FGLogPage;
187 property VotePage: String read FVotePage;
188 property HelpPage: String read FHelpPage;
190 //
\83`
\83\83\83\93\83l
\83\8b\8aÖ
\8cW
191 property AutoJoinChannels: TStrings read FAutoJoinChannels write SetAutoJoinChannels;
193 property LUID: String read FLUID write SetLUID;
195 //
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
196 property SenderWindowPosition: TRect
197 read FSenderWindowPosition write SetSenderWindowPosition;
198 property LogWindowPosition: TRect read FLogWindowPosition write SetLogWindowPosition;
199 property LogWindowDividerPos: integer
200 read FLogWindowDividerPos write SetLogWindowDividerPos;
201 property LogWindowColumnWidth: String
202 read FLogWindowColumnWidth write SetLogWindowColumnWidth;
203 //
\83v
\83\8d\83L
\83V
\8aÖ
\8cW
204 property UseHttpProxy: boolean read FUseHttpProxy write SetUseHttpProxy;
205 property ProxyAddress: String read FProxyAddress write SetProxyAddress;
206 property ProxyPort: integer read FProxyPort write SetProxyPort;
207 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
208 property LogWindowPreviewStyle: TLogWindowPreviewStyle
209 read FLogWindowPreviewStyle write SetLogWindowPreviewStyle;
210 property LogListPreviewStyle: TLogListPreviewStyle
211 read FLogListPreviewStyle write SetLogListPreviewStyle;
213 property FMOName: TStrings read FFMOName write SetFMOName;
214 property HideGhosts: boolean read FHideGhosts write SetHideGhosts;
215 property VisibleGhostsList: TStringList read FVisibleGhostsList write SetVisibleGhostsList;
216 property NoExtraSSTPHeaders: boolean read FNoExtraSSTPHeaders write SetNoExtraSSTPHeaders;
217 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
218 property SurfacePreviewOnHint: boolean
219 read FSurfacePreviewOnHint write SetSurfacePreviewOnHint;
220 property SurfacePreviewOnScriptPoint: boolean
221 read FSurfacePreviewOnScriptPoint write SetSurfacePreviewOnScriptPoint;
222 property SurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition
223 read FSurfacePreviewOnScriptPointPosition write SetSurfacePreviewOnScriptPointPosition;
224 //
\83R
\83\93\83X
\83g
\83\89\83N
\83^
\81E
\83f
\83X
\83g
\83\89\83N
\83^
\81E
\95Û
\91¶
226 destructor Destroy; override;
227 procedure SaveSettings;
230 TChannelListItem = class(TObject)
238 procedure SetGhost(const Value: String);
239 procedure SetInfo(const Value: String);
240 procedure SetMembers(const Value: integer);
241 procedure SetName(const Value: String);
242 procedure SetNoPost(const Value: boolean);
243 procedure SetWarnPost(const Value: boolean);
245 property Name: String read FName write SetName;
246 property Info: String read FInfo write SetInfo;
247 property Ghost: String read FGhost write SetGhost;
248 property Members: integer read FMembers write SetMembers;
249 property NoPost: boolean read FNoPost write SetNoPost;
250 property WarnPost: boolean read FWarnPost write SetWarnPost;
253 TChannelList = class(TList)
255 function GetChannel(Name: String): TChannelListItem;
256 function GetChannelItem(Index: integer): TChannelListItem;
258 procedure Clear; override;
259 property Channel[Name: String]: TChannelListItem read GetChannel;
260 property ChannelItem[Index: integer]: TChannelListItem read GetChannelItem;
263 TScriptTransOption = (
264 toIgnoreTimeCritical,
267 toIgnoreFrequentYenS,
275 TScriptTransOptions = set of TScriptTransOption;
280 ChannelList: TChannelList; //
\83`
\83\83\83\93\83l
\83\8b\83\8a\83X
\83g
\82ð
\95Û
\8e\9d\82·
\82é
281 JoinChannels: TStringList; //
\8c»
\8dÝ
\8eQ
\89Á
\82µ
\82Ä
\82¢
\82é
\83`
\83\83\83\93\83l
\83\8b
284 BottleServerTimeOut = 400000; //
\83^
\83C
\83\80\83A
\83E
\83g
\82·
\82é
\82Ü
\82Å
\82Ì
\8e\9e\8aÔ
286 BottleServer = 'bottle.mikage.to';
287 DefaultCGI = '/bottle2.cgi';
288 DefaultCGIGhost = '/glog/bottleglog.cgi';
289 DefaultCGIFetchLog = '/fetchlog.cgi';
292 DefaultHomePage = 'http://bottle.mikage.to/';
293 DefaultGLogPage = 'http://bottle.mikage.to/glog/glogview.cgi';
294 DefaultVotePage = 'http://bottle.mikage.to/viewvotes.cgi';
295 DefaultHelpPage = 'http://bottle.mikage.to/clihelp/';
300 VersionString = 'SSTP Bottle Client ver ' + Version + 'a NO MUTEX VERSION';
302 VersionString = 'SSTP Bottle Client ver ' + Version;
305 SentLogFile = 'sent.log';
307 BottleDisclaimer = '(C)2001 - 2003 naru/Mikage Sawatari'#13#10 +
314 constructor TBottlePrefs.Create;
315 var ARect, Dum: TRect;
317 FAutoJoinChannels := TStringList.Create;
318 FDefaultScript := TStringList.Create;
319 FFMOName := TStringList.Create;
320 FVisibleGhostsList := TStringList.Create;
322 FIni := TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
324 NoSendGhostList := FIni.ReadBool('System', 'NoSendGhostList', false);
325 ConfirmOnExit := FIni.ReadBool('System', 'ConfirmOnExit', false);
326 AutoStart := FIni.ReadBool('System', 'AutoStart', false);
327 TabPosition := TTabPosition(FIni.ReadInteger('System', 'TabPosition', 0));
328 GhostDropDownCount := FIni.ReadInteger('System', 'GhostDropDownCount', 30);
330 NoTranslate := FIni.ReadBool('System', 'NoTranslate', true);
331 NoDescript := FIni.ReadBool('System', 'NoDescript', false);
332 NoTransUrl := FIni.ReadBool('System', 'NoTransUrl', false);
333 SilentWhenHidden:= FIni.ReadBool('System', 'SilentWhenHidden', true);
334 FixMessySurface := FIni.ReadBool('System', 'FixMessySurface', false);
335 HUTagTo01Tag := FIni.ReadBool('System', 'HUTagTo01Tag', false);
336 ResetIfGhostAfterSend := FIni.ReadBool('System', 'ResetIfGhostAfterSend', false);
337 ClearAfterSend := FIni.ReadBool('System', 'ClearAfterSend', false);
338 NeedConfirmBeforeSend := FIni.ReadBool('System', 'NeedConfirmBeforeSend', false);
339 WarnYenTNotExist := FIni.ReadBool('System', 'WarnYenTNotExist', false);
340 WarnScopeChangeInSynchronize := FIni.ReadBool('System', 'WarnScopeChangeInSynchronize', false);
342 IgnoreFrequentYenS := FIni.ReadBool('System', 'IgnoreFrequentYenS', false);
343 WaitScriptEnd := FIni.ReadInteger('System', 'WaitScriptEnd', 0);
344 StayOnTop := FIni.ReadBool('System', 'StayOnTop', false);
345 ShowConstBar := FIni.ReadBool('System', 'ShowConstBar', true);
346 ShowToolBar := FIni.ReadBool('System', 'ShowToolBar', true);
347 NoConfirm := FIni.ReadBool('System', 'NoConfirm', false);
348 IgnoreTimeCritical := FIni.ReadBool('System', 'IgnoreTimeCritical', false);
349 FDefaultScript.CommaText := FIni.ReadString('System', 'DefaultScript', '\t\h\s[0]|\e');
350 ShowRuler := FIni.ReadBool('System', 'ShowRuler', false);
353 TalkColorH := StringToColor(FIni.ReadString('System', 'TalkColorH', 'clBlack'));
354 TalkColorU := StringToColor(FIni.ReadString('System', 'TalkColorU', 'clMaroon'));
355 TalkColorS := StringToColor(FIni.ReadString('System', 'TalkColorS', 'clPurple'));
356 MarkUpColor := StringToColor(FIni.ReadString('System', 'MarkUpColor', 'clGreen'));
357 MetaWordColor := StringToColor(FIni.ReadString('System', 'MetaWordColor', 'clBlue'));
358 MarkErrorColor := StringToColor(FIni.ReadString('System', 'MarkErrorColor', 'clRed'));
359 BgColor := StringToColor(FIni.ReadString('System', 'BgColor', 'clWhite'));
361 on EConvertError do begin
362 ShowMessage('
\83J
\83\89\81[
\82Ì
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[
\82Å
\82·
\81B');
363 TalkColorH := clBlack;
364 TalkColorU := clMaroon;
365 MarkUpColor := clGreen;
366 MetaWordColor := clBlue;
367 FMarkErrorColor := clRed;
371 WhenReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenReturn', 0));
372 WhenShiftReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenShiftReturn', 0));
373 WhenCtrlReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenCtrlReturn', 0));
374 //
\83\
\83P
\83b
\83g
\82ð
\83{
\83g
\83\8b\94z
\91\97\82ÌSSTP
\92Ê
\90M
\82É
\8eg
\97p
\82·
\82é
\8fê
\8d\87\82Ì
\90Ý
\92è
375 ServerPort := FIni.ReadInteger('System', 'ServerPort', 11000);
377 FCgiName := FIni.ReadString('System', 'CgiName', DefaultCGI);
378 FCgiFetchLog := FIni.ReadString('System', 'CgiFetchLog', DefaultCGIFetchLog);
379 FHomePage := FIni.ReadString('System', 'HomePage', DefaultHomePage);
380 FGLogPage := FIni.ReadString('System', 'GLogPage', DefaultGLogPage);
381 FVotePage := FIni.ReadString('System', 'VotePage', DefaultVotePage);
382 FHelpPage := FIni.ReadString('System', 'HelpPage', DefaultHelpPage);
383 FCgiNameGhost := FIni.ReadString('System', 'GHOST', DefaultCGIGhost);
384 FLUID := FIni.ReadString('System', 'LUID', '');
385 FAutoJoinChannels.CommaText := FIni.ReadString('System', 'AutoJoinChannels', '');
387 ARect.Top := FIni.ReadInteger('System', 'SenderWindowPositionTop', 100);
388 ARect.Left := FIni.ReadInteger('System', 'SenderWindowPositionLeft', 100);
389 ARect.Bottom := FIni.ReadInteger('System', 'SenderWindowPositionBottom', 500);
390 ARect.Right := FIni.ReadInteger('System', 'SenderWindowPositionRight', 500);
391 if not IntersectRect(Dum, Rect(0, 0, Screen.Width, Screen.Height), ARect) then
392 ARect := Rect(100, 100, 500, 500);
393 SenderWindowPosition := ARect;
394 ARect.Top := FIni.ReadInteger('System', 'LogWindowPositionTop', 200);
395 ARect.Left := FIni.ReadInteger('System', 'LogWindowPositionLeft', 200);
396 ARect.Bottom := FIni.ReadInteger('System', 'LogWindowPositionBottom', 600);
397 ARect.Right := FIni.ReadInteger('System', 'LogWindowPositionRight', 400);
398 LogWindowDividerPos := FIni.ReadInteger('System', 'LogWindowDividerPos', 150);
399 LogWindowColumnWidth := FIni.ReadString('System', 'LogWindowColumnWidth', '');
400 if not IntersectRect(Dum, Rect(0, 0, Screen.Width, Screen.Height), ARect) then begin
401 ARect := Rect(200, 200, 600, 400);
402 LogWindowDividerPos := 150;
404 LogWindowPosition := ARect;
406 UseHttpProxy := FIni.ReadBool('System', 'UseHttpProxy', false);
407 ProxyAddress := FIni.ReadString('System', 'ProxyAddress', '');
408 ProxyPort := FIni.ReadInteger('System', 'ProxyPort', 0);
409 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
410 LogWindowPreviewStyle := TLogWindowPreviewStyle(
411 FIni.ReadInteger('System', 'LogWindowPreviewStyle', 0));
412 LogListPreviewStyle := TLogListPreviewStyle(
413 FIni.ReadInteger('System', 'LogListPreviewStyle', 0));
415 FMOName.CommaText := FIni.ReadString('System', 'FMOName', 'Sakura');
416 HideGhosts := FIni.ReadBool('System', 'HideGhosts', false);
417 VisibleGhostsList.CommaText := FIni.ReadString('System', 'VisibleGhostsList', '');
418 NoExtraSSTPHeaders := FIni.ReadBool('System', 'NoExtraSSTPHeaders', false);
419 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
420 SurfacePreviewOnHint := FIni.ReadBool('System', 'SurfacePreviewOnHint', false);
421 SurfacePreviewOnScriptPoint := FIni.ReadBool('System', 'SurfacePreviewOnScriptPoint', false);
422 SurfacePreviewOnScriptPointPosition :=
423 TSurfacePreviewOnScriptPointPosition(FIni.ReadInteger('System', 'SurfacePreviewOnScriptPointPosition', 0));
425 ShowMessage('INI
\83t
\83@
\83C
\83\8b\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[');
426 Application.Terminate;
430 destructor TBottlePrefs.Destroy;
436 if FAutoJoinChannels <> nil then
437 FAutoJoinChannels.Free;
438 if FDefaultScript <> nil then
440 if FFMOName <> nil then
442 if FVisibleGhostsList <> nil then
443 FVisibleGhostsList.Free;
446 procedure TBottlePrefs.SetAutoStart(const Value: boolean);
451 procedure TBottlePrefs.SetBgColor(const Value: TColor);
456 procedure TBottlePrefs.SetConfirmOnExit(const Value: boolean);
458 FConfirmOnExit := Value;
461 procedure TBottlePrefs.SetDblClkInsert(const Value: boolean);
463 FDblClkInsert := Value;
466 procedure TBottlePrefs.SetDefaultScript(const Value: String);
468 FDefaultScript.Text := Value;
471 procedure TBottlePrefs.SetFixMessySurface(const Value: boolean);
473 FFixMessySurface := Value;
476 procedure TBottlePrefs.SetGhostDropDownCount(const Value: integer);
478 FGhostDropDownCount := Value;
481 procedure TBottlePrefs.SetIgnoreFrequentYenS(const Value: boolean);
483 FIgnoreFrequentYenS := Value;
486 procedure TBottlePrefs.SetIgnoreTimeCritical(const Value: boolean);
488 FIgnoreTimeCritical := Value;
491 procedure TBottlePrefs.SetLogWindowDividerPos(const Value: integer);
493 FLogWindowDividerPos := Value;
496 procedure TBottlePrefs.SetLogWindowPosition(const Value: TRect);
498 FLogWindowPosition := Value;
501 procedure TBottlePrefs.SetLUID(const Value: String);
506 procedure TBottlePrefs.SetMarkErrorColor(const Value: TColor);
508 FMarkErrorColor := Value;
511 procedure TBottlePrefs.SetMarkUpColor(const Value: TColor);
513 FMarkUpColor := Value;
516 procedure TBottlePrefs.SetMetaWordColor(const Value: TColor);
518 FMetaWordColor := Value;
521 procedure TBottlePrefs.SetNoConfirm(const Value: boolean);
526 procedure TBottlePrefs.SetNoDescript(const Value: boolean);
528 FNoDescript := Value;
531 procedure TBottlePrefs.SetNoSendGhostList(const Value: boolean);
533 FNoSendGhostList := Value;
536 procedure TBottlePrefs.SetNoTranslate(const Value: boolean);
538 FNoTranslate := Value;
541 procedure TBottlePrefs.SetNoTransUrl(const Value: boolean);
543 FNoTransUrl := Value;
546 procedure TBottlePrefs.SetLogWindowPreviewStyle(
547 const Value: TLogWindowPreviewStyle);
549 FLogWindowPreviewStyle := Value;
552 procedure TBottlePrefs.SetProxyAddress(const Value: String);
554 FProxyAddress := Value;
557 procedure TBottlePrefs.SetProxyPort(const Value: integer);
562 procedure TBottlePrefs.SetResetIfGhostAfterSend(const Value: boolean);
564 FResetIfGhostAfterSend := Value;
567 procedure TBottlePrefs.SetSenderWindowPosition(const Value: TRect);
569 FSenderWindowPosition := Value;
572 procedure TBottlePrefs.SetServerPort(const Value: integer);
574 if Value > 0 then FServerPort := Value;
577 procedure TBottlePrefs.SetShowConstBar(const Value: boolean);
579 FShowConstBar := Value;
582 procedure TBottlePrefs.SetShowToolBar(const Value: boolean);
584 FShowToolBar := Value;
587 procedure TBottlePrefs.SetSilentWhenHidden(const Value: boolean);
589 FSilentWhenHidden := Value;
592 procedure TBottlePrefs.SetStayOnTop(const Value: boolean);
597 procedure TBottlePrefs.SetTabPosition(const Value: TTabPosition);
599 FTabPosition := Value;
602 procedure TBottlePrefs.SetTalkColorH(const Value: TColor);
604 FTalkColorH := Value;
607 procedure TBottlePrefs.SetTalkColorU(const Value: TColor);
609 FTalkColorU := Value;
612 procedure TBottlePrefs.SetUseHttpProxy(const Value: boolean);
614 FUseHttpProxy := Value;
617 procedure TBottlePrefs.SetWaitScriptEnd(const Value: integer);
619 if Value > 0 then FWaitScriptEnd := Value;
622 procedure TBottlePrefs.SetWhenCtrlReturn(const Value: TReturnKeyFunction);
624 FWhenCtrlReturn := Value;
627 procedure TBottlePrefs.SetWhenReturn(const Value: TReturnKeyFunction);
629 FWhenReturn := Value;
632 procedure TBottlePrefs.SetWhenShiftReturn(const Value: TReturnKeyFunction);
634 FWhenShiftReturn := Value;
637 procedure TBottlePrefs.SetTalkColorS(const Value: TColor);
639 FTalkColorS := Value;
642 procedure TBottlePrefs.SetLogWindowColumnWidth(const Value: String);
644 FLogWindowColumnWidth := Value;
647 procedure TBottlePrefs.SetClearAfterSend(const Value: boolean);
649 FClearAfterSend := Value;
652 procedure TBottlePrefs.SetAutoJoinChannels(const Value: TStrings);
654 FAutoJoinChannels.Assign(Value);
657 procedure TBottlePrefs.SetFMOName(const Value: TStrings);
659 FFMOName.Assign(Value);
662 procedure TBottlePrefs.SaveSettings;
664 FIni.WriteBool('System', 'NoSendGhostList', NoSendGhostList);
665 FIni.WriteBool('System', 'ConfirmOnExit', ConfirmOnExit);
666 FIni.WriteBool('System', 'AutoStart', AutoStart);
667 FIni.WriteInteger('System', 'TabPosition', Ord(TabPosition));
668 FIni.WriteInteger('System', 'GhostDropDownCount', GhostDropDownCount);
670 FIni.WriteBool('System', 'NoTranslate', NoTranslate);
671 FIni.WriteBool('System', 'NoDescript', NoDescript);
672 FIni.WriteBool('System', 'NoTransUrl', NoTransUrl);
673 FIni.WriteBool('System', 'SilentWhenHidden', SilentWhenHidden);
674 FIni.WriteBool('System', 'FixMessySurface', FixMessySurface);
675 FIni.WriteBool('System', 'HUTagTo01Tag', HUTagTo01Tag);
676 FIni.WriteBool('System', 'ResetIfGhostAfterSend', ResetIfGhostAfterSend);
677 FIni.WriteBool('System', 'ClearAfterSend', ClearAfterSend);
678 FIni.WriteBool('System', 'NeedConfirmBeforeSend', NeedConfirmBeforeSend);
679 FIni.WriteBool('System', 'WarnYenTNotExist', WarnYenTNotExist);
680 FIni.WriteBool('System', 'WarnScopeChangeInSynchronize', WarnScopeChangeInSynchronize);
682 FIni.WriteBool('System', 'IgnoreFrequentYenS', IgnoreFrequentYenS);
683 FIni.WriteInteger('System', 'WaitScriptEnd', WaitScriptEnd);
684 FIni.WriteBool('System', 'StayOnTop', StayOnTop);
685 FIni.WriteBool('System', 'NoConfirm', NoConfirm);
686 FIni.WriteBool('System', 'IgnoreTimeCritical', IgnoreTimeCritical);
687 FIni.WriteString('System', 'TalkColorH', ColorToString(TalkColorH));
688 FIni.WriteString('System', 'TalkColorU', ColorToString(TalkColorU));
689 FIni.WriteString('System', 'TalkColorS', ColorToString(TalkColorS));
690 FIni.WriteString('System', 'MarkUpColor', ColorToString(MarkUpColor));
691 FIni.WriteString('System', 'MetaWordColor', ColorToString(MetaWordColor));
692 FIni.WriteString('System', 'MarkErrorColor', ColorToString(MarkErrorColor));
693 FIni.WriteString('System', 'BgColor', ColorToString(BgColor));
694 FIni.WriteBool('System', 'ShowToolBar', ShowToolBar);
695 FIni.WriteBool('System', 'ShowConstBar', ShowConstBar);
696 FIni.WriteString('System', 'DefaultScript', FDefaultScript.CommaText);
697 FIni.WriteBool('System', 'ShowRuler', ShowRuler);
698 FIni.WriteInteger('System', 'WhenReturn', Ord(WhenReturn));
699 FIni.WriteInteger('System', 'WhenShiftReturn', Ord(WhenShiftReturn));
700 FIni.WriteInteger('System', 'WhenCtrlReturn', Ord(WhenCtrlReturn));
701 FIni.WriteInteger('System', 'ServerPort', ServerPort);
702 FIni.WriteString('System', 'LUID', LUID);
703 FIni.WriteString('System', 'AutoJoinChannels', FAutoJoinChannels.CommaText);
705 FIni.WriteInteger('System', 'SenderWindowPositionLeft', SenderWindowPosition.Left);
706 FIni.WriteInteger('System', 'SenderWindowPositionTop', SenderWindowPosition.Top);
707 FIni.WriteInteger('System', 'SenderWindowPositionRight', SenderWindowPosition.Right);
708 FIni.WriteInteger('System', 'SenderWindowPositionBottom', SenderWindowPosition.Bottom);
709 FIni.WriteInteger('System', 'LogWindowPositionLeft', LogWindowPosition.Left);
710 FIni.WriteInteger('System', 'LogWindowPositionTop', LogWindowPosition.Top);
711 FIni.WriteInteger('System', 'LogWindowPositionRight', LogWindowPosition.Right);
712 FIni.WriteInteger('System', 'LogWindowPositionBottom', LogWindowPosition.Bottom);
713 FIni.WriteInteger('System', 'LogWindowDividerPos', LogWindowDividerPos);
714 FIni.WriteString('System', 'LogWindowColumnWidth', LogWindowColumnWidth);
716 FIni.WriteBool('System', 'UseHttpProxy', UseHttpProxy);
717 FIni.WriteString('System', 'ProxyAddress', ProxyAddress);
718 FIni.WriteInteger('System', 'ProxyPort', ProxyPort);
720 FIni.WriteInteger('System', 'LogWindowPreviewStyle', Ord(LogWindowPreviewStyle));
721 FIni.WriteInteger('System', 'LogListPreviewStyle', Ord(LogListPreviewStyle));
722 FIni.WriteString('System', 'FMOName', FFMOName.CommaText);
723 FIni.WriteBool('System', 'HideGhosts', HideGhosts);
724 FIni.WriteString('System', 'VisibleGhostsList', VisibleGhostsList.CommaText);
725 FIni.WriteBool('System', 'NoExtraSSTPHeaders', NoExtraSSTPHeaders);
727 FIni.WriteBool('System', 'SurfacePreviewOnHint', SurfacePreviewOnHint);
728 FIni.WriteBool('System', 'SurfacePreviewOnScriptPoint', SurfacePreviewOnScriptPoint);
729 FIni.WriteInteger('System', 'SurfacePreviewOnScriptPointPosition', Ord(SurfacePreviewOnScriptPointPosition));
732 function TBottlePrefs.GetDefaultScript: String;
734 Result := FDefaultScript.Text;
737 procedure TBottlePrefs.SetHUTagTo01Tag(const Value: boolean);
739 FHUTagTo01Tag := Value;
742 procedure TBottlePrefs.SetWarnScopeChangeInSynchronize(
743 const Value: boolean);
745 FWarnScopeChangeInSynchronize := Value;
748 procedure TBottlePrefs.SetWarnYenTNotExist(const Value: boolean);
750 FWarnYenTNotExist := Value;
753 procedure TBottlePrefs.SetNeedConfirmBeforeSend(const Value: boolean);
755 FNeedConfirmBeforeSend := Value;
758 procedure TBottlePrefs.SetShowRuler(const Value: boolean);
763 procedure TBottlePrefs.SetHideGhosts(const Value: boolean);
765 FHideGhosts := Value;
768 procedure TBottlePrefs.SetVisibleGhostsList(const Value: TStringList);
770 FVisibleGhostsList.Assign(Value);
773 procedure TBottlePrefs.SetSurfacePreviewOnHint(const Value: boolean);
775 FSurfacePreviewOnHint := Value;
778 procedure TBottlePrefs.SetSurfacePreviewOnScriptPoint(
779 const Value: boolean);
781 FSurfacePreviewOnScriptPoint := Value;
784 procedure TBottlePrefs.SetSurfacePreviewOnScriptPointPosition(
785 const Value: TSurfacePreviewOnScriptPointPosition);
787 FSurfacePreviewOnScriptPointPosition := Value;
790 procedure TBottlePrefs.SetNoExtraSSTPHeaders(const Value: boolean);
792 FNoExtraSSTPHeaders := Value;
795 procedure TBottlePrefs.SetLogListPreviewStyle(
796 const Value: TLogListPreviewStyle);
798 FLogListPreviewStyle := Value;
803 procedure TChannelListItem.SetGhost(const Value: String);
808 procedure TChannelListItem.SetInfo(const Value: String);
813 procedure TChannelListItem.SetMembers(const Value: integer);
818 procedure TChannelListItem.SetName(const Value: String);
823 procedure TChannelListItem.SetNoPost(const Value: boolean);
828 procedure TChannelListItem.SetWarnPost(const Value: boolean);
835 procedure TChannelList.Clear;
838 for i := Self.Count-1 downto 0 do begin
839 TChannelListItem(Self[i]).Free;
844 function TChannelList.GetChannel(Name: String): TChannelListItem;
848 for i := 0 to Count-1 do
849 if TChannelListItem(Self[i]).Name = Name then begin
850 Result := TChannelListItem(Self[i]);
855 function TChannelList.GetChannelItem(Index: integer): TChannelListItem;
857 Result := TChannelListItem(Self[Index]);
863 RegExp := TBRegExp.Create;
865 ShowMessage('RegExp
\8aJ
\8en
\83G
\83\89\81[');
866 Application.Terminate;
868 Pref := TBottlePrefs.Create;
869 ChannelList := TChannelList.Create;
870 JoinChannels := TStringList.Create;