Version 6.0 Build 451.3
SPECIAL NOTES ABOUT THIS UPDATE:
Version 6.0 Build 451.3 is a considered minor hotfiix update with some new additional features.
Changes, Fixes, New Features and Enhancements by Wildcat! Component
WCSERVER (Wildcat! Server)
- Fixed server bug when added a File Record with a blank name.
- Fixed old minor bug of resetting conference zero values to default values
when the wcserver.exe is restarted:
Day to Key External Mail: 7
[ ] delete External user email once delivered by SMTP
WCCONFIG (Wildcat! Configuration)
- Added Help Note about using wcSAP RBL option instead of SMTP RBL
- A new security access flag was added to the Access Profiles:
[ ] Allow Carbon Group Command
Under normal circumstances only the Conference sysop had access
to the GROUP command to create carbon copies. This new access
profile
flag allows specific access profiles access to the GROUP command.
WCSSL (Wildcat! SSL)
- If the server has SSL disabled, it no longer loads wcSSL.DLL (conserves
memory).
WCSTART (Wildcat! Startup)
- Major cleanup, new HTML help
WCCORE (Wildcat! BASIC Core Runtime Engine)
- Fixed a intermittent WCX Core Runtime bug for busy systems
running the same WCX applications.
WCWEB (Wildcat! WEB Server)
- Fixed some template processing bugs.
- Fixed a bug reading HTML mail with long lines via the WebMail client.
- Fixed a Major Bug in the idle timeout manager.
- Fixed a major bug in the HTTP Chucking Logic. This should fix
the many wcOnline crashes experienced by sysops.
- Fixed a context switching issue when WCX applications use the
contextlib.wcx library.
WCTELNET (Wildcat! TELNET Server)
- Fixed starting Error when WCTELNET is started as a NT service
which aborted when a user with WcNavigator was connecting.
WCFTP (Wildcat! FTP Server)
- Fixed a SOCKET error which sometimes stopped the FTP server.
This error is not ignored.
- Added two new quote commands
QUOTE LZDC ON|OFF
QUOTE PFID userid or username
LZDC - Limit file listing/downloads with zero downloads.
PFID - Set the User ID value for private file uploads.
o LZDC "Limit Zero Download Count" syntax:
QUOTE LZDN ON | OFF
Your FTP scripts will need to do something like this:
ftp> quote lzdc on
230 Limit Zero Download Count -
Enabled
at this point, a "get" or "dir" will only download or show
the files that
are zero downloads (have not been downloaded yet).
o PFID "Private File User ID" syntax:
QUOTE PFID userid# | user name | nothing to clear
Examples:
ftp> quote pfid testuser1
530 Unknown Private File User
Name: "testuser1"
ftp> quote pfid 3
230 Private file user id 3 set
for user: BOB
ftp> quote pfid
230 Private File User ID Cleared
Once the private file user id is set, all subsequent uploads (put) will
assigned the TFileRecord.PrivateUserId field with the private file user id.
At this point, only the user with this id (and sysops) will be able to
access the private file (see or download).
The Download Count logic is possible via Dialup or Web with customized
Download WCBASIC code. The statistics were always there. Just
the logic
wasn't. So you needed to code it. But for FTP, this is
required to be
inherent to the FTP server which is now the case with the AUP 451.3 FTP
server only.
Here is an example wcBASIC that be used online to simulate a "personal
download"
// Example of using the Mark List and downloading
// files with Downloads count = zero
#include "util.wch"
#include "marklist.wch"
#include "cmdline.wch"
//--------------------------------------------------------
// Search a specific file area for files not downloaded
//--------------------------------------------------------
Dim AreaNumber as integer = 10 // search area
MarkListClear() // clear the marked files to download
dim frec as TFileRecord
dim tid as integer
dim ok as boolean
if SearchFileRecByAreaName(AreaNumber,"*.*", frec, tid) then
ok = true
do while ok
if (AreaNumber = frec.area) and
(frec.Downloads = 0) then
MarkListAdd(frec) // add file to mark list
end if
ok =
GetNextFileRec(FileAreaNameKey,frec,tid)
loop
end if
//--------------------------------------------------------
// Was any found?
//--------------------------------------------------------
Dim count as integer = MarkListGetCount()
if count = 0 then
print "Sorry, we have no files available for download"
WaitEnter()
end
end if
//--------------------------------------------------------
// Push the "D" command into the command stack and run
// the "Download Files" program. /AUTO skips any further
// prompts by "Download Files"
//--------------------------------------------------------
PushCommand("D")
Run "Download Files", "/AUTO"
WCPOP3 (Wildcat! POP3 Server)
- Fixed a SOCKET error which sometimes stopped the POP3 server.
This error is not ignored.
WCMAIL (Wildcat! Mail Gateway)
- Now uses HKEY_LOCAL to say statistics
WCNNTP (Wildcat! News Server)
- Fixed/Cleanup Mime stored Email/Internet Mail List reply system.
WCLISTSERVER (Wildcat! List Server)
- Added new List Option:
[_] Keep Submitter's Reply-To: address"
Default is OFF. If Checked, the submitted message will
retain the
user's Reply-To: if any.
WCEVENT (Wildcat! Event Manager)
- Added a WcEventDefault.lpd file. If present, it is automatically
loaded.
- See wcBASIC/WCSDK Update Information.
- See wcBASIC/WCSDK Update Information.
WCT (Wildcat Template Processor)
New Template Variable(s)
Session.SSL.Capable TRUE if WEB is SSL capable
Session.SSL.Required TRUE if SSL is required for connection
Session.SSL.Secured TRUE if HTTPS connection made
Example usage:
@if Session.SSL.Capable@
Session is SSL Capable<br>
@if Session.SSL.Required@
SSL Required<br>
@else@
SSL Not Required<br>
@endif@
@if Session.SSL.Secured@
Session SSL Secured<br>
@else@
Session not SSL secured<br>
@endif@
@else@
Session Not SSL Capable<br>
@endif@
New Template Commands:
New WCT template commands were added:
COMMENT/ENDCOMMENT Hides lines, good
for commenting
INC
Increment a value
DEC
Decrement a value
EVAL
Evaluate a string expression
FOR/NEXT
Loop with first and last conditions
COMMENT/ENDCOMMENT Hides
lines, good for commenting
New WCT template variables were added:
ACCESS.CLIENT.client_name Check ascess for clients
ACCESS.CODE.wcx_name Check
access for wcx program
ACCESS.OID.objectid_name Check
access for object id
TICKS
Number of system ticks
GETTIME
Seconds+Milliseconds since 1970
COMMENT/ENDCOMMENT
The COMMENT/ENDCOMMENT allows you to document your HTML template files without sending this information to the browser. All text between the @COMMENT@ and @ENDCOMMENT@ is not processed or sent to the browser.
Example:
<!--
@COMMENT@
Your hidden comments and
documentation
@ENDCOMMENT@
-->
Tip: Use the <!-- and --> HTML tags to hide WCT template macros from the HTML GUI editor.
New INC and DEC commands:
@INC X [amount]@ increment X by amount,
default 1
@DEC X [amount]@ decrement X by amount, default 1
The default increment and decrement amount is 1 if not default. The amount can also be a variable. If the variable is not default, then no action is taken (no adding or subtracting is done).
Examples:
@SET
TOTAL = 100@
@INC
TOTAL@
<!-- add 1 -->
TOTAL = @SUB TOTAL@ <!--
101 expected -->
@INC TOTAL
20@ <!-- add 20
-->
TOTAL = @SUB TOTAL@
<!-- 121 expected -->
@DEC
TOTAL@
<!--
subtract 1 -->
TOTAL = @SUB TOTAL@
<!-- 120 expected -->
@DEC
TOTAL 5@ <!--
subtract 1 -->
TOTAL = @SUB TOTAL@ <!-- 115
expected -->
@SET
XYZ = TOTAL@ <!-- set
current total to XYZ -->
@DEC TOTAL
XYZ@ <!--
subtract XYZ amountl -->
TOTAL = @SUB TOTAL@ <!-- 0
expected -->
New FOR/NEXT Loop commands:
In the past, WCT allowed only one way to perform a LOOP in a template using the LOOP/ENDLOOP commands. One of the limitations of LOOP/ENDLOOP is that it required a WCX program to process the loop in order to make any send of it, but more importantly to END it. If you used a LOOP/ENDLOOP in a template with no WCX to process the loop, an infinite do-loop is created that would never end until the user closes the browser or click the browser STOP button. Note: As of v6.0.451.3, if the defaullt template processor detects an unhandled LOOP command in a WCT template, the loop is aborted.
Many times you might just need to create a LOOP within defined limits. This is where the new FOR/NEXT commands come into play. FOR/NEXT allows you to create a Loop with an initial value and end value condition.
FOR/NEXT syntax:
@FOR I = X to Y@
@NEXT@
The FOR/NEXT loop will step from X to Y. The loop variable I will start at X and stop once I is greater then Y. You can use the FOR variable I within the loop as a counter or index value. It is only available within the loop.
Examples:
Create a table with 20 rows:
<TABLE>
@FOR
I = 1 to 20@
<TR>
<TD>
ROW #@SUB I@</TD>
</TR>
@NEXT@
</TABLE>
Create a table with SET first and last values:
@SET
FIRST= 1@
@FOR
LAST = 20@
<TABLE>
@FOR
I = FIRST to LAST@
<TR>
<TD>
LINE @SUB I@</TD>
</TR>
@NEXT@
</TABLE>
Create a table of 10 rows and 5 columns:
@SET
ROWS = 10@
@FOR
COLS = 5@
<TABLE>
@FOR
R = 1 to ROWS@
<TR>
@FOR C = 1 to COLS@
<TD> ROW: @SUB R@ COL:
@SUB C@</TD>
@NEXT@
</TR>
@NEXT@
</TABLE>
New EVAL() command:
The EVAL command is used to with evaluate a concatention of strings and variables. The best way to show how to use EVAL is by example.
Suppose you had user profile variables called Field1, Field2 to Field50. In a
HTML template, you can use the @USER.XXXX@ user variable to display all the
fields:
<TABLE>
<TR><TD> @USER.FIELD1@</TD></TR>
<TR><TD> @USER.FIELD2@</TD></TR>
<TR><TD> @USER.FIELD3@</TD></TR>
...
<TR><TD> @USER.FIELD50@</TD></TR>
</TABLE>
You can use the EVAL command within a FOR/NEXT loop like so, to simplify this table generation:
<TABLE>
@FOR
I = 1 to 50@
<TR><TD> @EVAL("USER.FIELD"+I)@</TD>
</TR>
@NEXT@
</TABLE>
The EVAL() command can also be used with SUB, SET, ECHO and IF macros.
Note: The following three commands are technically the same:
@EVAL(string)@
@ECHO EVAL(string)@
@SUB EVAL(string)@
All three print the evaluated result. The difference is that SUB allows the calling WCX program processing the current template an opportunity to define an undefined variable or undefined evaluated result.
For example:
Suppose you have a WCX program processing a template with the expectation that the template will request the variables DATA1
@SUB DATA1@
In this case, WCT will look up the value for DATA1. If defined, then the value is printed. If not defined, WCX will pass the variable name "DATA1" to the WCX TemplateExec() command to allow the WCX to print the value for DATA1.
@SUB EVAL(DATA1)@
In this case, EVAL(DATA1) will return the current value in memory at the time it DATA1 is evaluated. If DATA1 is not defined, the entire string "EVAL(DATA1)" is passed to the WCX to allow it to do something with this.
If you want your WCX to provide a value for an undefined variable, then you should not use EVAL with the WCX command unless you have evaluating a string, not a variable, i.e., @SUB EVAL("DATA"+1)@