home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
gtirc306.zip
/
REXXCMD.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-11-24
|
6KB
|
100 lines
/*********************************************************************/
/* REXXCMD.CMD GammaTech IRC Sample REXX Command Exit Script */
/*********************************************************************/
/* */
/* This is a sample REXX script for use with GammaTech IRC. It will */
/* perform the following functions: */
/* */
/* 1) Provides a /BOOT command a simplified version of /KICK */
/* 2) Creates a /WHOM command which executes a /VERSION and a */
/* /USERINFO on the specified nickname. */
/* */
/* Warning: Do not change this script. Copy it to another name */
/* and modify the copy for backup purposes. */
/* */
/*********************************************************************/
/* */
/* Entry arguments: */
/* */
/* Arg 1 - Window Handle */
/* Arg 2 - Your Nickname */
/* Arg 3 - Window Name */
/* Arg 4 - The command / text */
/* */
/* The Window Name parameter will contain one of the following: */
/* */
/* * Channel name if the command is executed from a channel */
/* window. In this case the first character will be a # or &. */
/* */
/* * Other clients nick name if the command is executed from a */
/* query window. The first character will not be #, & or !. */
/* */
/* * If the command is executed from any other type of window */
/* this parameter will contain a !. */
/* */
/* The command may be suppressed or ignored. To suppress */
/* the command, return a null ("") string. To allow the command to */
/* be processed normally, return a non-null string. */
/* */
/*********************************************************************/
/* */
/* There are external REXX functions you may use in this REXX */
/* procedure which are described in the online help under Script */
/* programming. A summary of those functions is shown below: */
/* */
/* IrcRexxDisplay(text,win) Display text in a window. */
/* IrcRexxCommand(text,win) Send text or /comamnd to IRC */
/* IrcRexxSend(text,win) Send raw text to server. */
/* IrcRexxVariable(win,name[,value]) Query or set an IRC variable. */
/* IrcRexxWildCard(wildcard,string) Check for wildcard match. */
/* */
/*********************************************************************/
Parse Upper Arg WinHandle WinName OurNick Verb Parm1 Parms
Pool = 'OS2ENVIRONMENT'
/*********************************************************************/
/* If this is the "/boot" command we format and execute a /kick and */
/* then suppress the original /boot command. */
/* */
/* To activate this command you must enter /var $Boot,yes */
/* */
/*********************************************************************/
if (Verb = '/BOOT' & Parm1 <> '' & IrcRexxVariable(WinHandle,"$Boot") = "yes") then do
OutStr = "/KICK" Parm1 "Get out you lamer"
IrcRexxCommand(OutStr,WinHandle)
Return ""
end
/*********************************************************************/
/* The /WHOM command simply executes a /VERSION and /USERINFO on the */
/* specified nickname. */
/* */
/* Syntax: /WHOM nickname */
/* */
/*********************************************************************/
if (Verb = '/WHOM') then do
if (Parm1 <> '') then do
OutStr = "/VERSION " Parm1
IrcRexxCommand(OutStr,WinHandle)
OutStr = "/USERINFO " Parm1
IrcRexxCommand(OutStr,WinHandle)
end
else do
IrcRexxDisplay("Syntax error",WinHandle)
end
Return ""
end
/*********************************************************************/
/* This isn't a command we care about so we pass a non-null string */
/* so that it will be processed normally. */
/*********************************************************************/
Return "OK"