Browse Source

Import archive

master
Brielle Bruns 1 year ago
commit
534fb5f54b
8 changed files with 1218 additions and 0 deletions
  1. 0
    0
      README.md
  2. 12
    0
      epic4-noncygwin-configure.sh
  3. 46
    0
      epic4-noncygwin-install.sh
  4. 72
    0
      epic4.nsi
  5. 13
    0
      epic5-noncygwin-configure.sh
  6. 46
    0
      epic5-noncygwin-install.sh
  7. 72
    0
      epic5.nsi
  8. 957
    0
      menu-v2.0.2.bas

+ 0
- 0
README.md View File


+ 12
- 0
epic4-noncygwin-configure.sh View File

@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+export CFLAGS="-O2 -march=pentium -mtune=pentium4 -DFD_SETSIZE=2048 \
3
+	-fno-strict-aliasing -fomit-frame-pointer -pipe"
4
+export LDFLAGS="-Wl,--enable-auto-image-base \
5
+	-Wl,--enable-runtime-pseudo-reloc -s"
6
+
7
+export CC="ccache gcc"
8
+#make distclean
9
+../configure --prefix=/cygdrive/c/epic4 \
10
+	--cache-file=/usr/src/config-cache/epic4-cache \
11
+	--with-ssl --without-perl --without-tcl --with-ipv6 \
12
+	--disable-dependency-tracking

+ 46
- 0
epic4-noncygwin-install.sh View File

@@ -0,0 +1,46 @@
1
+#!/bin/bash
2
+mkdir /cygdrive/c/epic4
3
+mkdir /cygdrive/c/epic4/bin
4
+mkdir /cygdrive/c/epic4/libexec
5
+mkdir -p /cygdrive/c/epic4/terminfo/x
6
+mkdir /cygdrive/c/epic4/docs
7
+mkdir -p /cygdrive/c/epic4/share/epic
8
+mkdir -p /cygdrive/c/epic4/share/epic/script
9
+mkdir -p /cygdrive/c/epic4/sosdg
10
+cp -f source/epic.exe /cygdrive/c/epic4/bin/epic.exe
11
+cp -f source/wserv4.exe /cygdrive/c/epic4/libexec/wserv4.exe
12
+cp -f /bin/cygwin1.dll /cygdrive/c/epic4/bin/cygwin1.dll
13
+cp -f /bin/cygssl-0.9.8.dll /cygdrive/c/epic4/bin/
14
+cp -f /bin/cygcrypto-0.9.8.dll /cygdrive/c/epic4/bin/
15
+cp -f /bin/cygcrypt-0.dll /cygdrive/c/epic4/bin/
16
+cp -f /bin/cygncurses-8.dll /cygdrive/c/epic4/bin/cygncurses-8.dll
17
+cp -f /bin/libW11.dll /cygdrive/c/epic4/bin/libW11.dll
18
+cp -f /bin/rxvt.exe /cygdrive/c/epic4/bin/rxvt.exe
19
+cp -f /usr/share/terminfo/x/xterm /cygdrive/c/epic4/terminfo/x/xterm
20
+cp -f /usr/share/terminfo/c/cygwin /cygdrive/c/epic4/terminfo/c/cygwin
21
+strip /cygdrive/c/epic4/bin/*.exe
22
+strip /cygdrive/c/epic4/libexec/*.exe
23
+
24
+
25
+mount -t C:/epic4 /mnt/epic4
26
+cp -f epic4-noncygwin-install.sh epic4-noncygwin-configure.sh "C:/installer scripts/epic4.nsi" /mnt/epic4/sosdg/
27
+DOCFILES="Readme Bug_form KNOWNBUGS COPYRIGHT Votes"
28
+cd ../
29
+for i in $DOCFILES; do
30
+        echo "Converting $i..."
31
+        rm -f /mnt/epic4/docs/$i
32
+        awk 1 $i > /mnt/epic4/docs/$i
33
+done
34
+cp -fr doc/* /mnt/epic4/docs
35
+mv /cygdrive/c/epic4/docs/Readme /cygdrive/c/epic4/docs/readme-unix.txt
36
+rm -fr /cygdrive/c/epic4/share/epic/help /cygdrive/c/epic4/share/epic/script
37
+mkdir /cygdrive/c/epic4/share/epic/script
38
+cp -fr help /mnt/epic4/share/epic/
39
+cp -fr script/* /mnt/epic4/share/epic/script/
40
+umount /mnt/epic4
41
+cd /cygdrive/c/epic4
42
+find /cygdrive/c/epic4 -name CVS | xargs rm -frv
43
+find /cygdrive/c/epic4 -name cvs | xargs rm -frv
44
+find $CLAMAV -name ".cvsignore" | xargs rm -frv
45
+find $CLAMAV -name ".\#*" | xargs rm -frv
46
+chown -R Administrators:Users /cygdrive/c/epic4

+ 72
- 0
epic4.nsi View File

@@ -0,0 +1,72 @@
1
+;Title Of Your Application
2
+Name "ircII EPIC4 For Windows 2.6 Build 238"
3
+CompletedText "You have successfully installed ircII EPIC4 for Windows.  Enjoy!"
4
+
5
+CRCCheck On
6
+SetCompress Auto
7
+SetCompressor lzma
8
+SetOverwrite IfNewer
9
+SetDatablockOptimize on
10
+
11
+;Output File Name
12
+OutFile "installers\epic4-installer-2.6-build238.exe"
13
+
14
+;License Page Introduction
15
+LicenseText "Please read the following license information before using this program:"
16
+
17
+;License Data
18
+LicenseData "C:\epic4\docs\copyright.txt"
19
+
20
+;The Default Installation Directory
21
+InstallDir "C:\epic4"
22
+
23
+;The text to prompt the user to enter a directory
24
+DirText "Please select the folder below you wish to install to.  Do not change it unless you absolutely need to."
25
+
26
+Section "Install"
27
+  ;Install Files
28
+  SetOutPath $INSTDIR
29
+  SetCompress Auto
30
+  SetOverwrite IfNewer
31
+  File /r "C:\epic4\bin"
32
+  File /r "C:\epic4\libexec"
33
+  File /r "C:\epic4\share"
34
+  File /r "C:\epic4\docs"
35
+  File /r "C:\epic4\terminfo"
36
+  File /r "C:\epic4\identd"
37
+  File "C:\epic4\ircservers.txt"
38
+  File "C:\epic4\menu.exe"
39
+
40
+
41
+  ; Write the uninstall keys for Windows
42
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ircII EPIC4 For Windows" "DisplayName" "ircII EPIC4 For Windows (remove only)"
43
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ircII EPIC4 For Windows" "UninstallString" "$INSTDIR\Uninst.exe"
44
+WriteUninstaller "Uninst.exe"
45
+SectionEnd
46
+
47
+Section "Shortcuts"
48
+  ;Add Shortcuts
49
+  CreateDirectory "$SMPROGRAMS\ircII EPIC4"
50
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\Uninstall.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
51
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\ircII EPIC4.lnk" "$INSTDIR\menu.exe" "" "$INSTDIR\menu.exe" 0
52
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\ircII EPIC4 License.lnk" "$INSTDIR\docs\copyright.txt" "" "$INSTDIR\docs\copyright.txt" 0
53
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\Identd Daemon.lnk" "$INSTDIR\identd\identd_win32.exe" "" $INSTDIR\identd\identd_win32.exe" 0
54
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\Identd Source Code.lnk" "$INSTDIR\identd\src" "" "$INSTDIR\identd\src" 0
55
+  CreateShortCut "$SMPROGRAMS\ircII EPIC4\Identd License.lnk" "$INSTDIR\identd\license.rtf" "" "$INSTDIR\identd\license.rtf" 0
56
+SectionEnd
57
+
58
+UninstallText "This will uninstall ircII EPIC4 from your system"
59
+
60
+Section Uninstall
61
+  ;Delete Files
62
+  RMDir /r "$INSTDIR"
63
+
64
+  ; Additional Files To Remove During Uninstall
65
+  RMDir /r "$SMPROGRAMS\ircII EPIC4"
66
+
67
+  ;Delete Uninstaller And Unistall Registry Entries
68
+  Delete "$INSTDIR\Uninst.exe"
69
+  DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\ircII EPIC4 For Windows"
70
+  DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ircII EPIC4 For Windows"
71
+  RMDir "$INSTDIR"
72
+SectionEnd

+ 13
- 0
epic5-noncygwin-configure.sh View File

@@ -0,0 +1,13 @@
1
+#!/bin/bash
2
+export CFLAGS="-O2 -march=pentium -mtune=pentium4 -DFD_SETSIZE=2048 \
3
+	-fno-strict-aliasing -fomit-frame-pointer -pipe"
4
+export LDFLAGS="-Wl,--enable-auto-image-base \
5
+	-Wl,--enable-runtime-pseudo-reloc -s"
6
+
7
+export CC="ccache gcc"
8
+#make distclean
9
+../configure --prefix=/cygdrive/c/epic5 \
10
+	--cache-file=/usr/src/config-cache/epic5-cache \
11
+	--with-ssl --without-perl --without-tcl --with-ipv6 \
12
+	--disable-dependency-tracking
13
+cp sig.inc source/

+ 46
- 0
epic5-noncygwin-install.sh View File

@@ -0,0 +1,46 @@
1
+#!/bin/bash
2
+mkdir /cygdrive/c/epic5
3
+mkdir /cygdrive/c/epic5/bin
4
+mkdir /cygdrive/c/epic5/libexec
5
+mkdir -p /cygdrive/c/epic5/terminfo/x
6
+mkdir /cygdrive/c/epic5/docs
7
+mkdir -p /cygdrive/c/epic5/share/epic5
8
+mkdir -p /cygdrive/c/epic5/share/epic5/script
9
+mkdir -p /cygdrive/c/epic5/sosdg
10
+cp -f source/epic5.exe /cygdrive/c/epic5/bin/epic.exe
11
+cp -f source/wserv4.exe /cygdrive/c/epic5/libexec/wserv4.exe
12
+cp -f /bin/cygwin1.dll /cygdrive/c/epic5/bin/cygwin1.dll
13
+cp -f /bin/cygssl-0.9.8.dll /cygdrive/c/epic5/bin/
14
+cp -f /bin/cygcrypto-0.9.8.dll /cygdrive/c/epic5/bin/
15
+cp -f /bin/cygcrypt-0.dll /cygdrive/c/epic5/bin/
16
+cp -f /bin/cygncurses-8.dll /cygdrive/c/epic5/bin/cygncurses-8.dll
17
+cp -f /bin/libW11.dll /cygdrive/c/epic5/bin/libW11.dll
18
+cp -f /bin/rxvt.exe /cygdrive/c/epic5/bin/rxvt.exe
19
+cp -f /usr/share/terminfo/x/xterm /cygdrive/c/epic5/terminfo/x/xterm
20
+cp -f /usr/share/terminfo/c/cygwin /cygdrive/c/epic5/terminfo/c/cygwin
21
+strip /cygdrive/c/epic5/bin/*.exe
22
+strip /cygdrive/c/epic5/libexec/*.exe
23
+
24
+
25
+mount -t C:/epic5 /mnt/epic5
26
+cp -f epic5-noncygwin-install.sh epic5-noncygwin-configure.sh "C:/installer scripts/epic5.nsi" /mnt/epic5/sosdg/
27
+DOCFILES="Readme Bug_form KNOWNBUGS COPYRIGHT Votes"
28
+cd ../
29
+for i in $DOCFILES; do
30
+        echo "Converting $i..."
31
+        rm -f /mnt/epic5/docs/$i
32
+        awk 1 $i > /mnt/epic5/docs/$i
33
+done
34
+cp -fr doc/* /mnt/epic5/docs
35
+mv /cygdrive/c/epic5/docs/Readme /cygdrive/c/epic5/docs/readme-unix.txt
36
+rm -fr /cygdrive/c/epic5/share/epic5/help /cygdrive/c/epic5/share5/epic/script
37
+mkdir /cygdrive/c/epic5/share/epic5/script
38
+cp -fr /usr/src/epic4-noncygwin/help /mnt/epic5/share/epic5/
39
+cp -fr script/* /mnt/epic5/share/epic5/script/
40
+umount /mnt/epic5
41
+cd /cygdrive/c/epic5
42
+find /cygdrive/c/epic5 -name CVS | xargs rm -frv
43
+find /cygdrive/c/epic5 -name cvs | xargs rm -frv
44
+find $CLAMAV -name ".cvsignore" | xargs rm -frv
45
+find $CLAMAV -name ".\#*" | xargs rm -frv
46
+chown -R Administrators:Users /cygdrive/c/epic5

+ 72
- 0
epic5.nsi View File

@@ -0,0 +1,72 @@
1
+;Title Of Your Application
2
+Name "ircII EPIC5 For Windows 0.3.2 Build 4"
3
+CompletedText "You have successfully installed ircII EPIC5 for Windows.  Enjoy!"
4
+
5
+CRCCheck On
6
+SetCompress Auto
7
+SetCompressor lzma
8
+SetOverwrite IfNewer
9
+SetDatablockOptimize on
10
+
11
+;Output File Name
12
+OutFile "installers\epic5-installer-0.3.2-build4.exe"
13
+
14
+;License Page Introduction
15
+LicenseText "Please read the following license information before using this program:"
16
+
17
+;License Data
18
+LicenseData "C:\epic5\docs\copyright.txt"
19
+
20
+;The Default Installation Directory
21
+InstallDir "C:\epic5"
22
+
23
+;The text to prompt the user to enter a directory
24
+DirText "Please select the folder below you wish to install to.  Do not change it unless you absolutely need to."
25
+
26
+Section "Install"
27
+  ;Install Files
28
+  SetOutPath $INSTDIR
29
+  SetCompress Auto
30
+  SetOverwrite IfNewer
31
+  File /r "C:\epic5\bin"
32
+  File /r "C:\epic5\libexec"
33
+  File /r "C:\epic5\share"
34
+  File /r "C:\epic5\docs"
35
+  File /r "C:\epic5\terminfo"
36
+  File /r "C:\epic5\identd"
37
+  File "C:\epic5\ircservers.txt"
38
+  File "C:\epic5\menu.exe"
39
+
40
+
41
+  ; Write the uninstall keys for Windows
42
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ircII epic5 For Windows" "DisplayName" "ircII epic5 For Windows (remove only)"
43
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ircII epic5 For Windows" "UninstallString" "$INSTDIR\Uninst.exe"
44
+WriteUninstaller "Uninst.exe"
45
+SectionEnd
46
+
47
+Section "Shortcuts"
48
+  ;Add Shortcuts
49
+  CreateDirectory "$SMPROGRAMS\ircII epic5"
50
+  CreateShortCut "$SMPROGRAMS\ircII epic5\Uninstall.lnk" "$INSTDIR\uninst.exe" "" "$INSTDIR\uninst.exe" 0
51
+  CreateShortCut "$SMPROGRAMS\ircII epic5\ircII epic5.lnk" "$INSTDIR\menu.exe" "" "$INSTDIR\menu.exe" 0
52
+  CreateShortCut "$SMPROGRAMS\ircII epic5\ircII epic5 License.lnk" "$INSTDIR\docs\copyright.txt" "" "$INSTDIR\docs\copyright.txt" 0
53
+  CreateShortCut "$SMPROGRAMS\ircII epic5\Identd Daemon.lnk" "$INSTDIR\identd\identd_win32.exe" "" $INSTDIR\identd\identd_win32.exe" 0
54
+  CreateShortCut "$SMPROGRAMS\ircII epic5\Identd Source Code.lnk" "$INSTDIR\identd\src" "" "$INSTDIR\identd\src" 0
55
+  CreateShortCut "$SMPROGRAMS\ircII epic5\Identd License.lnk" "$INSTDIR\identd\license.rtf" "" "$INSTDIR\identd\license.rtf" 0
56
+SectionEnd
57
+
58
+UninstallText "This will uninstall ircII epic5 from your system"
59
+
60
+Section Uninstall
61
+  ;Delete Files
62
+  RMDir /r "$INSTDIR"
63
+
64
+  ; Additional Files To Remove During Uninstall
65
+  RMDir /r "$SMPROGRAMS\ircII epic5"
66
+
67
+  ;Delete Uninstaller And Unistall Registry Entries
68
+  Delete "$INSTDIR\Uninst.exe"
69
+  DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\ircII epic5 For Windows"
70
+  DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ircII epic5 For Windows"
71
+  RMDir "$INSTDIR"
72
+SectionEnd

+ 957
- 0
menu-v2.0.2.bas View File

@@ -0,0 +1,957 @@
1
+' SOSDG Menu Application
2
+' Copyright (c) 2002-2004 Brian Bruns <bruns@2mbit.com>
3
+' Copyright (c) 2002-2004 The Summit Open Source Development Group / Administrative Team - http://www.2mbit.com
4
+' All Rights Reserved
5
+'
6
+' URL: http://www.2mbit.com/software.html
7
+' Build: 2.0.2
8
+' License: See Below
9
+' Source: YES (e-mail bruns@2mbit.com for more info and latest version)
10
+' Notes: 
11
+'
12
+'* Redistribution and use in source and binary forms, with or without
13
+'* modification, are permitted provided that the following conditions
14
+'* are met:
15
+'* 1. Redistributions of source code must retain the above copyright
16
+'*    notice, this list of conditions and the following disclaimer.
17
+'* 2. Redistributions in binary form must reproduce the above copyright
18
+'*    notices, the above paragraph (the one permitting redistribution),
19
+'*    this list of conditions and the following disclaimer in the 
20
+'*    documentation and/or other materials provided with the distribution.
21
+'* 3. The names of the author(s) may not be used to endorse or promote 
22
+'*    products derived from this software without specific prior written
23
+'*    permission.
24
+'* 
25
+'* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 
26
+'* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
27
+'* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28
+'* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
29
+'* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
30
+'* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31
+'* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
32
+'* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
33
+'* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
34
+'* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
35
+'* SUCH DAMAGE.
36
+
37
+' VERSION HISTORY
38
+' 1.0 - Development, initial test version
39
+' 1.2 - Limited testing
40
+' 1.3 - Bug fixing stage 1
41
+' 1.4 - Bug fixing stage 2
42
+' 1.5 - Bug fixing state 3
43
+' 1.6 - Solid stable public version used in builds prior to Dec 16th 2002
44
+' 1.7 - Testing INI config file
45
+' 1.8 - Solid stable public version using INI file, changed server listing slightly, bug fixes,
46
+'       disabled the Real Name field (still not implemented properly, why get users hopes up?),
47
+'       and removed cruft from old builds that I left in for my own reference.
48
+' 1.9 - See version.txt from the ircii epic4 installer, or check the website
49
+
50
+$OPTIMIZE ON
51
+
52
+$INCLUDE "RAPIDQ.INC"
53
+' RQ INI File Support - Contact: StarBase12@OneBox.com 
54
+$INCLUDE "QLibrary.inc"
55
+
56
+
57
+
58
+
59
+$TYPECHECK OFF
60
+$ESCAPECHARS OFF
61
+
62
+
63
+APPLICATION.TITLE = "ircII EPIC4"
64
+
65
+DECLARE SUB NickClick
66
+DECLARE SUB FullNameClick
67
+DECLARE SUB UserNameClick
68
+DECLARE SUB ServerNameClick
69
+DECLARE SUB SaveOptToDisk
70
+DECLARE SUB AboutMenuShow
71
+DECLARE SUB AboutMenuClose
72
+DECLARE SUB QuitProgram
73
+DECLARE SUB DelOptFile
74
+DECLARE SUB RunWithCurrOpt
75
+DECLARE SUB LoadOptionsFile
76
+DECLARE SUB DispServerList
77
+DECLARE SUB DispServerListClose
78
+DECLARE SUB ChangeServerName2 (Sender AS QLISTBOX)
79
+DECLARE SUB ReadOptFromDisk
80
+DECLARE SUB ShowVerHistory
81
+DECLARE SUB CloseVerHistory
82
+DECLARE SUB ShowMenuOpt
83
+DECLARE SUB CloseMenuOpt
84
+DECLARE SUB CancelMenuOpt
85
+DECLARE SUB ReadMenuOpt
86
+DECLARE SUB LoadWin32Readme
87
+DECLARE SUB LoadUNIXReadme
88
+DECLARE SUB LoadLicense
89
+DECLARE SUB LoadVersHistory
90
+DECLARE SUB SaveTempOpt
91
+DECLARE SUB OptWinResetDefaults
92
+DECLARE SUB Editircrc
93
+Declare Sub SaveEPICini
94
+DECLARE Sub AddNoConFlag
95
+DECLARE Sub AddNoircrcFlag
96
+DECLARE Sub AddXDebugFlag
97
+DECLARE Sub JoinChanOnCon
98
+DECLARE Sub AddJoinChannel
99
+DECLARE Sub PasswdConnectOpt
100
+DECLARE Sub LoadServerList
101
+DECLARE Sub ChkServerListExist
102
+
103
+DIM CmdLineOpts AS STRING
104
+DIM JoinChanStr AS STRING
105
+DIM PasswordStr AS STRING
106
+DIM ServerConnectStr AS STRING
107
+DIM NoConStr AS STRING
108
+DIM NoircrcStr AS STRING
109
+DIM XDebugStr AS STRING
110
+DIM EPIC4PathCurr AS STRING
111
+DIM EPIC4BinCurr AS STRING
112
+DIM EPIC4TermInfoCurr AS STRING
113
+DIM EPIC4DocsCurr AS STRING
114
+DIM EPIC4ExtraOptCurr AS STRING
115
+DIM RXVTBinCurr AS STRING
116
+DIM DOCREADMEWIN AS STRING
117
+DIM DOCREADMEUNIX AS STRING
118
+DIM DOCREADMELICENSE AS STRING
119
+DIM DOCREADMEVERSION AS STRING
120
+
121
+
122
+DIM ServerFile AS QFILESTREAM
123
+DIM ServerListFile AS QFILESTREAM
124
+
125
+'DIM ConfigFile AS QFILESTREAM
126
+DIM HeaderFont AS QFONT
127
+DIM HeaderFont2 AS QFONT
128
+DIM HeaderFont3 AS QFONT
129
+DIM HeaderFont4 AS QFONT
130
+HeaderFont.Name = "Tahoma"
131
+HeaderFont.AddStyles(fsBold)
132
+HeaderFont.Size = 24
133
+HeaderFont2.Name = "Tahoma"
134
+HeaderFont2.Size = 12
135
+HeaderFont3.Name = "Tahoma"
136
+HeaderFont3.Size = 8
137
+HeaderFont4.Name = "Tahoma"
138
+HeaderFont4.Size = 10
139
+
140
+
141
+Create EPICIniFile As QIniFile
142
+   Name = "epic4.ini"
143
+End Create
144
+
145
+Create MenuIniFile AS QIniFile
146
+   Name = "menu.ini"
147
+End Create   
148
+
149
+Dim EPICContent As QStringList
150
+Dim I As Integer
151
+
152
+Dim MenuContent AS QStringList    
153
+   
154
+CREATE MainForm AS QFORM
155
+    Center
156
+    Caption = "ircII EPIC Config App"
157
+    Height = 350
158
+    Width = 500
159
+    BorderStyle = bsToolWindow
160
+    
161
+    CREATE MainMenu AS QMainMenu
162
+      CREATE FileMenu AS QMenuItem
163
+        Caption = "&File"
164
+        CREATE LoadConfig AS QMenuItem
165
+          Caption = "Load &Options"
166
+          OnClick = ReadOptFromDisk
167
+          ShortCut = "CTRL+O"
168
+         END CREATE
169
+        CREATE SaveConfig AS QMenuItem
170
+          Caption = "&Save Options"
171
+          OnClick = SaveOptToDisk
172
+          ShortCut = "CTRL+S"
173
+        END CREATE
174
+        CREATE Break1 AS QMenuItem
175
+          Caption = "-"
176
+        END CREATE
177
+        CREATE StartEpic AS QMenuItem
178
+          Caption = "Run Epic"
179
+          OnClick = RunWithCurrOpt
180
+          ShortCut = "CTRL+R"
181
+        END CREATE
182
+        CREATE Break2 AS QMenuItem
183
+          Caption = "-"
184
+        END CREATE        
185
+	CREATE MenuOptMenu AS QMenuItem
186
+           Caption = "Configure Menu Settings"
187
+           OnClick = ShowMenuOpt
188
+         END CREATE
189
+	CREATE Break3 AS QMenuItem
190
+	   Caption = "-"
191
+	END CREATE
192
+        CREATE ExitApp AS QMenuItem
193
+          Caption = "&Exit"
194
+          OnClick = QuitProgram
195
+          ShortCut = "ALT+F4"
196
+        END CREATE
197
+      END CREATE
198
+      CREATE Tools AS QMenuItem
199
+        Caption = "&Tools"
200
+        CREATE DelOptions AS QMenuItem
201
+           Caption = "Delete User Options"
202
+           OnClick = DelOptFile
203
+           ShortCut = "CTRL+D"
204
+        END CREATE
205
+	  CREATE EditircrcOpt AS QMenuItem
206
+	    Caption = "Edit ircrc in Notepad"
207
+           OnClick = Editircrc
208
+           ShortCut = "CTRL+E"
209
+         END CREATE
210
+      END CREATE
211
+      CREATE Help AS QMenuItem
212
+        Caption = "&Help"
213
+        CREATE EPICTxtInfo AS QMenuItem
214
+           Caption = "EPIC Information..."
215
+           OnClick = ShowVerHistory
216
+        END CREATE
217
+        CREATE AboutOpt AS QMenuItem
218
+           Caption = "About..."
219
+           OnClick = AboutMenuShow
220
+        END CREATE
221
+      END CREATE
222
+    END CREATE
223
+
224
+    CREATE NickLabel AS QLABEL
225
+        Caption = "Nickname:"
226
+        Top = 2
227
+        Left = 10
228
+    END CREATE
229
+    CREATE NickEdit AS QEDIT
230
+        Top = NickLabel.Top + 17
231
+        Left = NickLabel.Left
232
+        Width = 230
233
+        Text = "EpicUser"
234
+        MaxLength = 30
235
+    END CREATE
236
+    'CREATE NickHelp AS QBUTTON
237
+    '    Top = NickEdit.Top - 2
238
+    '    Left = 250
239
+    '    Width = 20
240
+    '    Caption = "?"
241
+    '    OnClick = NickClick
242
+    'END CREATE    
243
+    CREATE FullNameLabel AS QLABEL
244
+        Caption = "Full Name:"
245
+        Top = NickEdit.Top + 27
246
+        Left = NickLabel.Left
247
+    END CREATE
248
+    CREATE FullNameEdit AS QEDIT
249
+        Top = FullNameLabel.Top + 17
250
+        Left = NickLabel.Left
251
+        Width = 230
252
+        MaxLength = 100
253
+        Text = "Some Random EPIC User"
254
+    END CREATE
255
+    'CREATE FullNameHelp AS QBUTTON
256
+    '    Top = FullNameEdit.Top - 2
257
+    '    Left = NickHelp.Left
258
+    '    Width = 20
259
+    '    Caption = "?"
260
+    '    OnClick = FullNameClick
261
+    'END CREATE    
262
+    CREATE UserNameLabel AS QLABEL
263
+        Caption = "User Name:"
264
+        Top = FullNameEdit.Top + 27
265
+        Left = NickLabel.Left
266
+    END CREATE
267
+    CREATE UserNameEdit AS QEDIT
268
+        Top = UserNameLabel.Top + 17
269
+        Left = NickLabel.Left
270
+        Width = 230
271
+        Text = "epicuser"
272
+    END CREATE
273
+    'CREATE UserNameHelp AS QBUTTON
274
+    '    Top = UserNameEdit.Top - 2
275
+    '    Left = NickHelp.Left
276
+    '    Width = 20
277
+    '    Caption = "?"
278
+    '    OnClick = UserNameClick
279
+    'END CREATE 
280
+    CREATE ServerNameLabel AS QLABEL
281
+        Caption = "Server:"
282
+        Top = UserNameEdit.Top + 27
283
+        Left = NickLabel.Left
284
+    END CREATE
285
+    CREATE ServerNameEdit AS QEDIT
286
+        Top = ServerNameLabel.Top + 17
287
+        Left = NickLabel.Left
288
+        Width = 230
289
+        Text = "irc.oftc.net"
290
+    END CREATE
291
+    'CREATE ServerNameHelp AS QBUTTON
292
+    '    Top = ServerNameEdit.Top - 2
293
+    '    Left = NickHelp.Left
294
+    '   Width = 20
295
+    '    Caption = "?"
296
+    '    OnClick = ServerNameClick
297
+    'END CREATE
298
+'    CREATE ServerNameMult AS QBUTTON
299
+'        Top = ServerNameHelp.Top
300
+'        Left = ServerNameEdit.Left + 205
301
+'        Width = 18
302
+'        Caption = "..."
303
+'        Enabled = True
304
+'        OnClick = DispServerList
305
+'    END CREATE
306
+    CREATE PortNumLabel AS QLABEL
307
+        Caption = "Port:"
308
+        Top = ServerNameEdit.Top + 27
309
+        Left = NickLabel.Left
310
+    END CREATE
311
+    CREATE PortNumEdit AS QEDIT
312
+        Top = PortNumLabel.Top + 17
313
+        Left = NickLabel.Left
314
+        Width = 60
315
+        Text = "6667"
316
+        MaxLength = 6
317
+    END CREATE
318
+    CREATE ServerListLabel2 AS QLABEL
319
+        Left = 280
320
+        Top = NickLabel.Top
321
+        Width = 300
322
+        Caption = "Please Select A Server Below:"
323
+    END CREATE
324
+    CREATE ServerListBox1 AS QLISTBOX
325
+        Left = ServerListLabel2.Left
326
+        Top = ServerLabelList2.Top + 20
327
+        Height = 120
328
+        Width = 200
329
+        MultiSelect = False
330
+        'AddItems "OFTC (http://www.oftc.net)", "EFNet (http://www.efnet.net)", "DALNet (http://www.dalnet.net)"
331
+        'AddItems "FreeNode (http://www.freenode.net)", "IRCNet (http://www.ircnet.org)
332
+        OnClick = ChangeServerName2
333
+    END CREATE
334
+    'CREATE ServerListOK AS QBUTTON
335
+    '    'Kind = bkOK
336
+    '    Width = 80
337
+    'Caption = "Set Server"
338
+    '    Top = ServerNameHelp.Top
339
+    '    Left = ServerListLabel2.Left + 57
340
+    '    'ModalResult = mrOK
341
+    '    OnClick = ChangeServerName2
342
+    'END CREATE
343
+    CREATE NoConCheckBox AS QCHECKBOX
344
+	 Left = ServerListLabel2.Left
345
+        Top = ServerListBox1.Top + 130
346
+        Caption = "Don't connect automatically"
347
+	 Width = 170
348
+        OnClick = AddNoConFlag
349
+    END CREATE
350
+    CREATE NoircrcCheckBox AS QCHECKBOX
351
+	 Left = NoConCheckBox.Left
352
+        Top = NoConCheckBox.Top + 20
353
+        Caption = "Don't load ircrc"
354
+	 Width = 170
355
+	 OnClick = AddNoircrcFlag
356
+    END CREATE
357
+    CREATE XDebugCheckBox AS QCHECKBOX
358
+	 Left = NoConCheckBox.Left
359
+        Top = NoircrcCheckBox.Top + 20
360
+        Caption = "X_Debug Mode"
361
+        OnClick = AddXDebugFlag
362
+	 Width = 170
363
+    END CREATE
364
+    CREATE ChanConnectCheckBox AS QCHECKBOX
365
+	 Left = PortNumLabel.Left + 70
366
+        Top = PortNumLabel.Top
367
+        Caption = "Join channel:"
368
+        OnClick = AddJoinChannel
369
+	 Width = 170
370
+    END CREATE
371
+    CREATE ChannelNameEdit AS QEDIT
372
+        Top = ChanConnectCheckBox.Top + 17
373
+        Left = ChanConnectCheckBox.Left
374
+        Width = 160
375
+        Text = "#irchelp"
376
+	 Enabled = False
377
+        MaxLength = 100
378
+    END CREATE
379
+    CREATE PassConnectCheckBox AS QCHECKBOX
380
+	 Left = ChanConnectCheckBox.Left
381
+        Top = ChannelNameEdit.Top + 30
382
+        Caption = "Server password:"
383
+        OnClick = PasswdConnectOpt
384
+	 Width = 170
385
+    END CREATE
386
+    CREATE PassConnectEdit AS QEDIT
387
+        Top = PassConnectCheckBox.Top + 17
388
+        Left = PassConnectCheckBox.Left
389
+        Width = 160
390
+        Enabled = False
391
+        MaxLength = 32
392
+    END CREATE
393
+
394
+    CREATE RunEpic AS QBUTTON
395
+        Top = 260
396
+        Left = 350
397
+        Width = 100
398
+        Caption = "Run EPIC"
399
+        OnClick = RunWithCurrOpt 
400
+    END CREATE
401
+    'CREATE URLLabel1 AS QLABEL
402
+    '    Left = 10
403
+    '    Top = 270
404
+    '    Width = 100
405
+    '    Caption = "http://www.2mbit.com/software.html - v2.0.2"
406
+    '    Font = HeaderFont3
407
+    'END CREATE
408
+   CREATE StatusBar AS QStatusBar
409
+    AddPanels "",""
410
+    Panel(0).Width = 380
411
+    'Panel(0).Caption = str$(StatusBar.Panel(0).Width)
412
+    Panel(1).Caption = "Version 2.0.2"
413
+    SizeGrip = False
414
+   END CREATE
415
+END CREATE
416
+
417
+SUB SaveOptToDisk
418
+    SaveEPICini
419
+    ShowMessage("The config has been saved.")
420
+    LoadConfig.Enabled = True
421
+    DelOptions.Enabled = True 
422
+END SUB
423
+
424
+SUB ReadOptFromDisk
425
+    IF FILEEXISTS("epic4.ini") THEN
426
+    NickEdit.Text = EPICIniFile.ReadEntry("Config","IRCNICK")
427
+    UserNameEdit.Text = EPICIniFile.ReadEntry("Config","IRCUSER")
428
+    PortNumEdit.Text = EPICIniFile.ReadEntry("Config","IRCPORT")
429
+    ServerNameEdit.Text = EPICIniFile.ReadEntry("Config","IRCSERVER")
430
+    FullNameEdit.Text = EPICIniFile.ReadEntry("Config","REALNAME")
431
+    ChannelNameEdit.Text = EPICIniFile.ReadEntry("Config","CHANNEL")
432
+    PassConnectEdit.Text = EPICIniFile.ReadEntry("Config","PASSWORD")
433
+    'ShowMessage("The config file has been loaded")
434
+    ELSE
435
+    ShowMessage("The config file does not exist.  You should change the options above and click Save Options first.")
436
+    END IF
437
+END SUB
438
+'--------- NickName Help Display
439
+SUB NickClick
440
+    ShowMessage("You can enter a nickname here.  Nicknames must consist of letters and numbers and _
441
+               can be up to 30 characters on most IRC networks.  The only exception is EFNet, _
442
+               which has a max of 9 characters.")
443
+END SUB
444
+
445
+'-------- Full Name Help Display
446
+SUB FullNameClick
447
+    ShowMessage("You can enter your full name here.  If you don't want to put your full name here, _
448
+                that is ok too - anything is acceptable.  It is part of your WHOIS response.")
449
+END SUB
450
+
451
+'-------- User Name Help Display
452
+SUB UserNameClick
453
+    ShowMessage("You can enter your user name here.  If you don't have Identd installed, this is the _
454
+                username passed to the server.  This can be only letters and numbers, and is a _
455
+                max of 9 characters.  If you have an Ident (AKA Auth) server installed on your machine_
456
+                , this has no affect.")
457
+END SUB
458
+
459
+
460
+'---------- Server Name Help
461
+SUB ServerNameClick
462
+    ShowMessage("You can enter a server name here, or click one of the servers to the right to use a preset.")
463
+END SUB
464
+
465
+'-------- About Dialog Display
466
+
467
+CREATE AboutMenuDlg AS QFORM
468
+    BorderStyle = bsDialog
469
+    Center
470
+    Caption = "About This Program..."
471
+    Height = 200
472
+    Width = 500
473
+    CREATE AboutMenuLabel1 AS QLABEL
474
+        Left = 47
475
+        Top = 2
476
+        Width = 300
477
+        Caption = "ircII EPIC4 Config Menu"
478
+        Font = HeaderFont
479
+    END CREATE
480
+    CREATE AboutMenuLabel2 AS QLABEL
481
+        Left = 20
482
+        Top = AboutMenuLabel1.Top + 40
483
+        Width = 300
484
+        Caption = "Copyright The Summit Open Source Development Group 2002"
485
+        Font = HeaderFont2
486
+    END CREATE
487
+    CREATE AboutMenuLabel3 AS QLABEL
488
+        Left = 5
489
+        Top = 160
490
+        Width = 100
491
+        Caption = "http://www.2mbit.com"
492
+        Font = HeaderFont3
493
+    END CREATE
494
+    CREATE AboutMenuLabel4 AS QLABEL
495
+        Left = 25
496
+        Top = AboutMenuLabel2.Top + 30
497
+        WordWrap = True
498
+        Width = 524
499
+        Caption = "Developed by Brian Bruns (bruns@2mbit.com) for use with the ircII EPIC4 client on Windows 9x/ME/NT/2k/XP.  Developed under Rapid-Q from basicguru.com."
500
+        Font = HeaderFont4
501
+    END CREATE
502
+    CREATE AboutMenuOK AS QBUTTON
503
+        Kind = bkOK
504
+        Width = 50
505
+        Top = 145
506
+        Left = 225
507
+        ModalResult = mrOK
508
+        OnClick = AboutMenuClose
509
+    END CREATE
510
+END CREATE    
511
+    
512
+SUB AboutMenuShow
513
+    AboutMenuDlg.Show
514
+END SUB
515
+
516
+SUB AboutMenuClose
517
+    AboutMenuDlg.Close
518
+END SUB
519
+
520
+'-- Quit Program
521
+SUB QuitProgram
522
+    'MainForm.Close
523
+    Application.Terminate 
524
+END SUB
525
+
526
+SUB ChangeServerName2 (Sender AS QLISTBOX)
527
+    ServerNameEdit.Text = REPLACESUBSTR$(FIELD$(Sender.item(Sender.ItemIndex),":",2),CHR$(09),"")
528
+END SUB 
529
+
530
+SUB DispServerList
531
+    'ServerListDlg.Show
532
+END SUB
533
+SUB DispServerListClose
534
+    'ServerListDlg.Close
535
+END SUB
536
+
537
+CREATE MenuOptWin AS QFORM
538
+    BorderStyle = bsDialog
539
+    Center
540
+    Caption = "Menu Configuration"
541
+    Height = 400
542
+    Width = 420
543
+    CREATE EPIC4PathLabel AS QLABEL
544
+        Caption = "Path to the epic4 directory:"
545
+        Top = 10
546
+        Left = 5
547
+    END CREATE
548
+    CREATE EPIC4Path AS QEDIT
549
+        Top = EPIC4PathLabel.Top + 20
550
+        Left = 5
551
+        Width = 400
552
+        Text = "C:\epic4"
553
+        MaxLength = 255
554
+    END CREATE
555
+    CREATE EPIC4BinaryLabel AS QLABEL
556
+        Caption = "Path to the epic4 binary:"
557
+        Top = EPIC4Path.Top + 30
558
+        Left = 5
559
+    END CREATE
560
+    CREATE EPIC4Binary AS QEDIT
561
+        Top = EPIC4BinaryLabel.Top + 20
562
+        Left = 5
563
+        Width = 400
564
+        Text = "C:\epic4\bin\epic.exe"
565
+        MaxLength = 255
566
+    END CREATE  
567
+    CREATE EPIC4TermInfoLabel AS QLABEL
568
+        Caption = "Path to the Terminfo files:"
569
+        Top = EPIC4Binary.Top + 30
570
+        Left = 5
571
+    END CREATE
572
+    CREATE EPIC4TermInfo AS QEDIT
573
+        Top = EPIC4TermInfoLabel.Top + 20
574
+        Left = 5
575
+        Width = 400
576
+        Text = "C:\epic4\terminfo"
577
+        MaxLength = 255
578
+    END CREATE
579
+    CREATE EPIC4DocsLabel AS QLABEL
580
+        Caption = "Path to the EPIC4 documentation:"
581
+        Top = EPIC4TermInfo.Top + 30
582
+        Left = 5
583
+    END CREATE
584
+    CREATE EPIC4Docs AS QEDIT
585
+        Top = EPIC4DocsLabel.Top + 20
586
+        Left = 5
587
+        Width = 400
588
+        Text = "C:\epic4\docs"
589
+        MaxLength = 255
590
+    END CREATE
591
+    CREATE EPIC4ExtraOptLabel AS QLABEL
592
+        Caption = "Extra Options For EPIC:"
593
+        Top = EPIC4Docs.Top + 30
594
+        Left = 5
595
+    END CREATE
596
+    CREATE EPIC4ExtraOpt AS QEDIT
597
+        Top = EPIC4ExtraOptLabel.Top + 20
598
+        Left = 5
599
+        Width = 400
600
+        Text = ""
601
+        MaxLength = 255
602
+    END CREATE
603
+    CREATE RXVTBinLabel AS QLABEL
604
+        Caption = "Path to the RXVT binary:"
605
+        Top = EPIC4ExtraOpt.Top + 30
606
+        Left = 5
607
+    END CREATE
608
+    CREATE RXVTBinary AS QEDIT
609
+        Top = RXVTBinLabel.Top + 20
610
+        Left = 5
611
+        Width = 400
612
+        Text = "C:\epic4\bin\rxvt.exe"
613
+        MaxLength = 255
614
+    END CREATE 
615
+   CREATE OptWinOK AS QBUTTON
616
+        Kind = bkOK
617
+        Width = 80
618
+        Top = 340
619
+        Left = 5
620
+        'ModalResult = mrOk
621
+        OnClick = CloseMenuOpt
622
+    END CREATE
623
+   CREATE OptWinCancel AS QBUTTON
624
+        Kind = bkCancel
625
+        Width = 80
626
+        Top = 340
627
+        Left = OptWinOk.Left + 90
628
+        'ModalResult = mrCanel
629
+        OnClick = CancelMenuOpt
630
+    END CREATE
631
+   CREATE OptWinReset AS QBUTTON
632
+        Width = 120
633
+        Caption = "Reset To Defaults"
634
+        Top = 340
635
+        Left = OptWinCancel.Left + 90
636
+        OnClick = OptWinResetDefaults
637
+    END CREATE
638
+END CREATE
639
+
640
+Sub ShowMenuOpt
641
+    SaveTempOpt
642
+    MenuOptWin.Show
643
+END SUB
644
+
645
+Sub CloseMenuOpt
646
+   MenuContent.Clear
647
+   MenuContent.AddItems "EPICPath="+EPIC4Path.Text
648
+   MenuContent.AddItems "EPICBin="+EPIC4Binary.Text
649
+   MenuContent.AddItems "Terminfo="+EPIC4TermInfo.Text
650
+   MenuContent.AddItems "EPICDocs="+EPIC4Docs.Text
651
+   MenuContent.AddItems "EPICExtra="+EPIC4ExtraOpt.Text
652
+   MenuContent.AddItems "RXVTBin="+RXVTBinary.Text
653
+   KILL "menu.ini"
654
+   MenuIniFile.WriteSection "Config",MenuContent
655
+   MenuOptWin.Close
656
+   StatusBar.Panel(0).Caption = "Menu configuration saved."
657
+END SUB
658
+
659
+Sub ReadMenuOpt
660
+    IF FILEEXISTS("menu.ini") THEN
661
+    EPIC4Path.Text = MenuIniFile.ReadEntry("Config","EPICPath")
662
+    EPIC4Binary.Text = MenuIniFile.ReadEntry("Config","EPICBin")
663
+    EPIC4TermInfo.Text = MenuIniFile.ReadEntry("Config","Terminfo")
664
+    EPIC4Docs.Text = MenuIniFile.ReadEntry("Config","EPICDocs")
665
+    EPIC4ExtraOpt.Text = MenuIniFile.ReadEntry("Config","EPICExtra")
666
+    RXVTBinary.Text = MenuIniFile.ReadEntry("Config","RXVTBin")
667
+    END IF
668
+End Sub
669
+
670
+Sub SaveTempOpt
671
+    EPIC4PathCurr = EPIC4Path.Text
672
+    EPIC4BinCurr = EPIC4Binary.Text
673
+    EPIC4TermInfoCurr = EPIC4TermInfo.Text
674
+    EPIC4DocsCurr = EPIC4Docs.Text
675
+    EPIC4ExtraOptCurr = EPIC4ExtraOpt.Text
676
+    RXVTBinCurr = RXVTBinary.Text
677
+END SUB
678
+
679
+Sub OptWinResetDefaults
680
+    EPIC4Path.Text = "C:\epic4"
681
+    EPIC4Binary.Text = "C:\epic4\bin\epic.exe"
682
+    EPIC4TermInfo.Text = "C:\epic4\terminfo"
683
+    EPIC4Docs.Text = "C:\epic4\docs"
684
+    EPIC4ExtraOpt.Text = ""
685
+    RXVTBinary.Text = "C:\epic4\bin\rxvt.exe"
686
+END SUB
687
+
688
+Sub CancelMenuOpt
689
+    EPIC4Path.Text = EPIC4PathCurr
690
+    EPIC4Binary.Text = EPIC4BinCurr
691
+    EPIC4TermInfo.Text = EPIC4TermInfoCurr 
692
+    EPIC4Docs.Text = EPIC4DocsCurr
693
+    EPIC4ExtraOpt.Text = EPIC4ExtraOptCurr
694
+    RXVTBinary.Text = RXVTBinCurr
695
+    MenuOptWin.Close
696
+    StatusBar.Panel(0).Caption = "Menu configuration changes canceled."
697
+END SUB
698
+
699
+SUB AddNoConFlag
700
+    IF NoConCheckBox.Checked THEN
701
+	NoConStr = " -s "
702
+       ChanConnectCheckBox.Enabled = False
703
+       ChannelNameEdit.Enabled = False
704
+       'PassConnectCheckBox.Enabled = False
705
+       'PassConnectEdit.Enabled = False
706
+    ELSE
707
+       NoConStr = ""
708
+       ChanConnectCheckBox.Enabled = True
709
+       AddJoinChannel
710
+       'ChannelNameEdit.Enabled = True
711
+       'PassConnectCheckBox.Enabled = True
712
+       'PassConnectEdit.Enabled = True
713
+    END IF
714
+END SUB
715
+
716
+SUB AddNoircrcFlag
717
+    IF NoircrcCheckBox.Checked THEN
718
+	NoircrcStr = " -q "
719
+    ELSE
720
+       NoircrcStr = ""
721
+    END IF
722
+END SUB
723
+
724
+SUB AddXDebugFlag
725
+    IF XDebugCheckBox.Checked THEN
726
+	XDebugStr = " -x "
727
+    ELSE
728
+       XDebugStr = ""
729
+    END IF
730
+END SUB
731
+
732
+SUB AddJoinChannel
733
+    IF ChanConnectCheckBox.Checked THEN
734
+	ChannelNameEdit.Enabled = True
735
+       JoinChanStr = " -c "+ChannelNameEdit.Text+" "
736
+    ELSE
737
+	ChannelNameEdit.Enabled = False
738
+       JoinChanStr = ""
739
+    END IF
740
+END SUB
741
+
742
+SUB PasswdConnectOpt
743
+    IF PassConnectCheckBox.Checked THEN
744
+	PassConnectEdit.Enabled = True
745
+       PasswordStr = PassConnectEdit.Text
746
+    ELSE
747
+	PassConnectEdit.Enabled = False
748
+       PasswordStr = ""
749
+    END IF
750
+END SUB
751
+
752
+
753
+SUB RunWithCurrOpt
754
+    DIM EPIC4Bin AS STRING
755
+    DIM RXVTBin AS STRING
756
+    EPIC4Bin = EPIC4Binary.Text
757
+    RXVTBin = RXVTBinary.Text
758
+    AddJoinChannel
759
+    IF PassConnectCheckBox.Checked THEN
760
+    ServerConnectStr = ServerNameEdit.Text+":"+PortNumEdit.Text+":"+PasswordStr
761
+    ELSE
762
+    ServerConnectStr = ServerNameEdit.Text+":"+PortNumEdit.Text
763
+    END IF
764
+    IF FILEEXISTS(EPIC4Bin) THEN
765
+    ENVIRON "TERMINFO="+EPIC4TermInfo.Text
766
+    ENVIRON "HOME="+EPIC4Path.Text
767
+    ENVIRON "IRCNAME="+FullNameEdit.Text
768
+    'ENVIRON "HELP_PATH="+EPIC4Path.Text+"\share\epic\help"
769
+    'CmdLineOpts = NickEdit.Text+" -z "+UserNameEdit.Text+" -p "+PortNumEdit.Text+" "+NoConStr+NoircrcStr+XDebugStr+JoinChanStr+" "+EPIC4ExtraOpt.Text+" "+ServerNameEdit.Text
770
+    CmdLineOpts = NickEdit.Text+" -z "+UserNameEdit.Text+" "+NoConStr+NoircrcStr+XDebugStr+JoinChanStr+" "+EPIC4ExtraOpt.Text+" "+ServerConnectStr
771
+    RUN RXVTBin+" +ut -sr -sl 5000 -tn xterm -e "+EPIC4Bin+" -n "+CmdLineOpts
772
+    'ShowMessage(CmdLineOpts)
773
+    StatusBar.Panel(0).Caption = CmdLineOpts
774
+    QuitProgram
775
+    ELSE
776
+    ShowMessage("Error:  The EPIC4 application was not found.  Please check the paths under Tools -> Configure Menu Settings.")
777
+    StatusBar.Panel(0).Caption = "The EPIC4 application was not found!"
778
+    END IF
779
+END SUB
780
+
781
+SUB DelOptFile
782
+    KILL "epic4.ini"
783
+    'ShowMessage("Config file deleted.")
784
+    StatusBar.Panel(0).Caption = "EPIC4 config file deleted."
785
+    LoadConfig.Enabled = False
786
+    DelOptions.Enabled = False
787
+END SUB
788
+
789
+SUB ChkCfgExist
790
+    IF FILEEXISTS("epic4.ini") THEN
791
+        LoadConfig.Enabled = True
792
+        DelOptions.Enabled = True
793
+        StatusBar.Panel(0).Caption = "EPIC4 config file found and loaded."
794
+       ReadOptFromDisk    
795
+    ELSE
796
+        StatusBar.Panel(0).Caption = "EPIC4 config file not found.  Loaded default settings."
797
+        LoadConfig.Enabled = False
798
+        DelOptions.Enabled = False
799
+    END IF
800
+END SUB
801
+
802
+Sub SaveEPICini
803
+   EPICContent.Clear
804
+   EPICContent.AddItems "IRCNICK="+NickEdit.Text
805
+   EPICContent.AddItems "IRCUSER="+UserNameEdit.Text
806
+   EPICContent.AddItems "IRCPORT="+PortNumEdit.Text
807
+   EPICContent.AddItems "IRCSERVER="+ServerNameEdit.Text
808
+   EPICContent.AddItems "REALNAME="+FullNameEdit.Text
809
+   EPICContent.AddItems "CHANNEL="+ChannelNameEdit.Text
810
+   EPICContent.AddItems "PASSWORD="+PassConnectEdit.Text
811
+   KILL "epic4.ini"
812
+   EPICIniFile.WriteSection "Config",EPICContent
813
+End Sub
814
+
815
+CREATE EPICTxtWin AS QFORM
816
+    BorderStyle = bsDialog
817
+    Center
818
+    Caption = "EPIC Information"
819
+    Height = 400
820
+    Width = 500
821
+    CREATE REVersion AS QRICHEDIT
822
+        ScrollBars = ssBoth
823
+        ReadOnly = True
824
+        Left = 5
825
+        Top = 2
826
+        Height = 330
827
+        Width = 483
828
+    END CREATE
829
+    CREATE ReadMe AS QBUTTON
830
+       Top = 340
831
+       Left = 5
832
+       Width = 80
833
+       Caption = "EPIC (Win32)"
834
+       OnClick = LoadWin32Readme
835
+    END CREATE
836
+    CREATE ReadMe2 AS QBUTTON
837
+       Top = ReadMe.Top
838
+       Left = ReadMe.Left + 90
839
+       Width = 80
840
+       Caption = "EPIC (UNIX)"
841
+       OnClick = LoadUNIXReadme
842
+    END CREATE
843
+    CREATE License AS QBUTTON
844
+       Top = ReadMe.Top
845
+       Left = ReadMe2.Left + 90
846
+       Width = 80
847
+       Caption = "License"
848
+       OnClick = LoadLicense
849
+    END CREATE
850
+    CREATE VersionHistory AS QBUTTON
851
+       Top = ReadMe.Top
852
+       Left = License.Left + 90
853
+       Width = 80
854
+       Caption = "Versions"
855
+       OnClick = LoadVersHistory
856
+    END CREATE
857
+    CREATE TXTWinOK AS QBUTTON
858
+        Kind = bkOK
859
+        Width = 50
860
+        Top = ReadMe.Top
861
+        Left = VersionHistory.Left + 150
862
+        ModalResult = mrOK
863
+        OnClick = CloseVerHistory
864
+    END CREATE       
865
+END CREATE
866
+
867
+Sub LoadWin32Readme
868
+    IF FILEEXISTS(EPIC4Docs.Text+"\readme.txt") THEN
869
+    REVersion.LoadFromFile EPIC4Docs.Text+"\readme.txt"
870
+    ELSE
871
+    ShowMessage("Warning: readme.txt was not found.  Unable to display!")
872
+    END IF
873
+End Sub
874
+
875
+Sub LoadUNIXReadme
876
+    IF FILEEXISTS(EPIC4Docs.Text+"\readme-unix.txt") THEN
877
+    REVersion.LoadFromFile EPIC4Docs.Text+"\readme-unix.txt"
878
+    ELSE
879
+    ShowMessage("Warning: readme-unix.txt was not found.  Unable to display!")
880
+    END IF
881
+End Sub    
882
+
883
+Sub LoadLicense
884
+    IF FILEEXISTS(EPIC4Docs.Text+"\copyright.txt") THEN
885
+    REVersion.LoadFromFile EPIC4Docs.Text+"\copyright.txt"
886
+    ELSE
887
+    ShowMessage("Warning: copyright.txt was not found.  Unable to display!")
888
+    END IF
889
+End Sub    
890
+
891
+Sub LoadVersHistory
892
+    IF FILEEXISTS(EPIC4Docs.Text+"\version.txt") THEN
893
+    REVersion.LoadFromFile EPIC4Docs.Text+"\version.txt"
894
+    ELSE
895
+    ShowMessage("Warning: version.txt was not found.  Unable to display!")
896
+    END IF  
897
+End Sub    
898
+
899
+Sub ShowVerHistory
900
+    EPICTxtWin.Show
901
+END SUB
902
+
903
+Sub CloseVerHistory
904
+    EPICTxtWin.Close
905
+END SUB
906
+
907
+Sub Editircrc
908
+    IF FILEEXISTS(EPIC4Path.Text+"\ircrc") THEN
909
+       RUN "notepad.exe "+EPIC4Path.Text+"\ircrc"
910
+    ELSE
911
+       DIM IRCRCFile AS QFileStream
912
+       IRCRCFile.Open(EPIC4Path.Text+"\ircrc", fmCreate)
913
+	IRCRCFile.WriteLine("# This is a blank ircrc file.")
914
+	IRCRCFile.WriteLine("# You can load up your EPIC4 scripts here or put")
915
+	IRCRCFile.WriteLine("# commands you want run when the client connects.")
916
+       IRCRCFile.Close
917
+       RUN "notepad.exe "+EPIC4Path.Text+"\ircrc"
918
+    END IF
919
+End Sub
920
+
921
+Sub LoadServerList
922
+	ServerFile.Open("ircservers.txt", fmOpenRead)
923
+       ServerListBox1.Clear
924
+	Y# = 0
925
+       Do
926
+            ServerListBox1.AddItems ServerFile.ReadLine
927
+	Y++
928
+        Loop until ServerFile.eof
929
+       'ShowMessage(FIELD$(ServerListBox1.Item(0), CHR$(09), 2))
930
+END SUB
931
+
932
+Sub ChkServerListExist
933
+	IF FILEEXISTS("ircservers.txt") THEN
934
+	' Nothing to do
935
+	ELSE
936
+	ServerListFile.Open("ircservers.txt", fmCreate)
937
+	ServerListFile.WriteLine("EFNet:"+CHR$(09)+CHR$(09)+"us.rr.efnet.net")
938
+	ServerListFile.WriteLine("DALNet:"+CHR$(09)+CHR$(09)+"irc.dal.net")
939
+	ServerListFile.WriteLine("OFTC:"+CHR$(09)+CHR$(09)+"irc.oftc.net")
940
+	ServerListFile.WriteLine("XIPH:"+CHR$(09)+CHR$(09)+"irc.xiph.org")
941
+	ServerListFile.WriteLine("FreeNode:"+CHR$(09)+"irc.openprojects.net")
942
+	ServerListFile.WriteLine("IRCNet:"+CHR$(09)+CHR$(09)+"irc.ircnet.org")
943
+	ServerListFile.WriteLine("UnderNet:"+CHR$(09)+"us.undernet.org")
944
+	ServerListFile.Close
945
+	END IF
946
+END Sub
947
+
948
+'FullNameEdit.Enabled = False
949
+
950
+' Its not working correctly with the addition of the password and channel boxes
951
+'NoConCheckBox.Enabled = False
952
+ChkServerListExist
953
+LoadServerList
954
+ReadMenuOpt
955
+ChkCfgExist
956
+
957
+MainForm.ShowModal

Loading…
Cancel
Save