home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-07-19 | 2.3 KB | 87 lines | [TEXT/PJMM] |
- { ircle - Internet Relay Chat client }
- { File: IRCInit }
- { Copyright © 1992 Olaf Titz (s_titz@ira.uka.de) }
-
- { This program is free software; you can redistribute it and/or modify }
- { it under the terms of the GNU General Public License as published by }
- { the Free Software Foundation; either version 2 of the License, or }
- { (at your option) any later version. }
-
- { This program is distributed in the hope that it will be useful, }
- { but WITHOUT ANY WARRANTY; without even the implied warranty of }
- { MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the }
- { GNU General Public License for more details. }
-
- { You should have received a copy of the GNU General Public License }
- { along with this program; if not, write to the Free Software }
- { Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. }
-
- unit IRCInit;
- { Startup code. }
-
- interface
- uses
- TCPTypes, TCPStuff, TCPConnections, Coroutines, ApplBase, MsgWindows, InputLine, {}
- IRCGlobals, IRCaux, IRCPreferences, IRCInput, {}
- IRCNotify, IRCIgnore, DCC, IRCCommands, IRCChannels, IRCSComm, IRCHelp;
-
- function IRCInitAll: boolean;
- { This will call ALL module startups and init ALL global variables. }
- { Returns false if program cannot be run. }
-
- implementation
-
- { Putting this module of 200+ bytes of code into an extra segment }
- { is a typical instance of memory management paranoia :-) }
-
- function IRCInitAll: boolean;
- var
- i: integer;
- s: str255;
- begin
- i := InitConnections;
- if i <> noErr then begin
- NumToString(i, s);
- ParamText(s, '', '', '');
- i := Alert(A_TCPERR, nil);
- IRCInitAll := false
- end
- else begin
- InitCoroutines;
- ApplInit;
- WNETime := 1;
- InitMsgWindows;
- InitInputLine;
- InitIRCPreferences;
- InitDCC;
- InitIRCChannels;
- InitIRCInput;
- InitIRCHelp;
- InitIRCNotify;
- InitIRCIgnore;
- ISOEncode := TableHndl(GetResource('Tabl', 256));
- ISODecode := TableHndl(GetResource('Tabl', 257));
- CmdChar := '/';
- CurrentServer := '';
- CurrentTarget := '';
- lastInvite := '';
- lastMSG := '';
- currentNick := '';
- flushing := false;
- logging := false;
- readTimeout := 10;
- GetDateTime(idleTime);
- InitCursor;
- QuitRequest := false;
- IsAway := false;
- inBackground := false;
- notified := false;
- lastWindow := nil;
- NFT := 0;
- Watch := GetCursor(WatchCursor);
- validPrefs := GetPrefs(false);
- IRCInitAll := true
- end;
- end;
-
- end.