/***************************************************************************/
/* PollWho.spot    ©1993 Stu Churchill   2:250/107.97@fidonet              */
/*                                                                         */
/* $VER: PollWho.spot 1.53 (7.9.93)                                        */
/*                                                                         */
/* This script allows you to instantly poll a node (other than your Boss)  */
/* and will supress your password in the handshake. Useful for sending a   */
/* f'req or crash mail instantly.                                          */
/***************************************************************************/

options results

/***************************************************************************/
/* Set up any variables we may need for later use                          */
/***************************************************************************/

NL          = '0d'x
mailer_path = 'D:TrapDoor'

/***************************************************************************/
/* Now we can get on with the rest of the script                           */
/***************************************************************************/

address 'SPOT'

'requeststring TITLE "PollWho 1.53" PROMPT "Enter a node to dial'NL'using dot seperation"'
if rc > 0 then do
  exit
end
newnode = RESULT
if newnode == '' | newnode = 'RESULT' then do
  exit
end

parse var newnode zone'.'net'.'node

call testdata('zone',zone)         /* Here we make sure that each part of */
call testdata('net',net)           /* the address is actually a number */
call testdata('node',node)

node = zone':'net'/'node

address command mailer_path' Call 'node' Password ""'

exit


/***************************************************************************/
/* TestData procedure - ensure the user has entered numerical address      */
/***************************************************************************/

testdata: procedure
  parse arg type,val
  test = datatype(val,'n')
  if test ~= 1 then do
    'requestnotify PROMPT "You must use a numeric'NL'character for the 'type'"'
    exit
  end
  return
