home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Online
/
StrICQ
/
Src
/
rexx
/
ICQFileServer.rexx
next >
Wrap
OS/2 REXX Batch file
|
1999-04-25
|
1KB
|
59 lines
/*
ICQFileServer.rexx - A simple example of how to use STRICQ as a file server
$VER: ICQFileServer.rexx v1.2 09.04.99 Copyright (C) 1999 Douglas F. McLaughlin
Written By: Douglas F. McLaughlin
Note: Permission is granted to use this script in any form or make any modifications
as necessary.
*/
in = 'in'
path = 'DH0:STRICQ/Downloads/'
parse arg uin type file .
address STRICQ.1
getcontact 'UIN='uin 'VAR=USER'
if ~open(in,file,'r') then exit(10)
line = readln(in)
call close(in)
call delete(file)
if type ~= 1 then exit(0)
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 or are currently offline. Your filerequest has been cancelled."'
exit(0)
end
end
if upper(word(line,1)) = 'LIST' then do
address command 'list >T:FileList 'path' FILES LFORMAT="%-24N %7L %C"'
addfile 'FILE=T:FileList'
filedirect 'UIN='uin 'SPEED=100' 'DESC="Current Files Available"'
exit(0)
end
if upper(word(line,1)) = 'GET' then do
file = path || subword(line,2)
addfile CLEAR
addfile 'FILE='file
desc = 'Here is the file you requested: 'subword(line,2)
filedirect 'UIN='uin 'SPEED=95' 'DESC="'desc'"'
exit(0)
end
exit(0)