QSilver-ICQ.rexx - A simple example of how to use STRICQ as a file server
$VER: QSilver-ICQ.rexx v1.0 12.05.99 Copyright (C) 1999 Douglas F. McLaughlin & Roger Clark
Based on original script written by: Douglas F. McLaughlin
Note: Permission is granted to use this script in any form or make any modifications as necessary.
*/
Config:
UserName = 'Douglas McLaughlin'
MyUIN = '8083608'
Path = 'DH0:STRICQ/Downloads/'
MaxFiles = 5
ReadFile:
In = 'In'
Parse Arg UIN Type File .
Address STRICQ.1
GetContact 'UIN='UIN 'VAR=USER'
If ~Open(In,File,'R') Then Exit(10)
Line = Strip(ReadLn(In),"T","0d"x)
Call Close(In)
Call Delete(File)
If Type ~= 1 Then Exit(0)
CheckOnline:
If Upper(Word(Line,1)) = '!LIST' | Upper(Word(Line,1)) = '!GET' Then Do
If User.IP = '0.0.0.0' Then Do
SendMessage 'UIN='UIN 'MSG="Sorry, you are either not in my Contact List, have your IP address hidden, or are currently offline. Your filerequest has been cancelled."'
Call Delete("Env:QSilver-ICQ")
Exit(0)
End
End
Serve:
If Upper(Word(Line,1)) = '!LIST' Then Do
If Exists("Env:QSilver-ICQ") then Do
SendMessage 'UIN='UIN 'MSG="Sorry, the file server is busy. Please try again in a few minutes."'