/*
**
** HELLOSCR.CMD - Sample REXX script which is executed from IRC by typing
**                /scr helloscr.cmd <nickname> [text]
*/

Parse Arg WinHandle WinName OurNick Parm1 Parms

if (Parm1 <> '') then do
   if (Parms <> '') then do
      str = "/MSG" Parm1 Parms
   end
   else do
      str = "/MSG" Parm1 "Greetings from" OurNick
   end
   IrcRexxDisplay("Hello message sent to" Parm1, WinHandle);
   IrcRexxCommand(str, WinHandle);
end
else do
   IrcRexxDisplay("*** Missing nickname ***", WinHandle)
end
