home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / GTOCBN10.ZIP / GTOCBN2.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1993-12-08  |  8KB  |  452 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     String   STRING001
  24.     String   STRING002
  25.     String   STRING003
  26.     String   STRING004
  27.     String   STRING005
  28.     String   STRING006
  29.     String   STRING007
  30.     String   STRING008
  31.     String   STRING009
  32.     String   STRING010
  33.     String   STRING011
  34.     String   STRING012
  35.     String   STRING013
  36.     Time     TIME001
  37.     Time     TIME002
  38.     Time     TIME003
  39.     Time     TIME004
  40.  
  41. ;------------------------------------------------------------------------------
  42.  
  43.     STRING008 = ""
  44.     :LABEL001
  45.     Newline
  46.     Print "@X0ENode CHAT: (G)roup, (U)navailable, (H)elp, (Enter)=none? "
  47.     InputStr "_", STRING008, 7, 50, Mask_Ascii(), 4096 + 64
  48.     Tokenize STRING008
  49.     Select Case (Upper(STRING008))
  50.         Case "G"
  51.             :LABEL002
  52.             Newline
  53.             PrintLn "@X0BEnter channel number (1-255), (L)ist channels or (Q)uit chat? (@X071  @X0B)"
  54.             Newline
  55.             PrintLn "@X0FJoining Channel #1."
  56.             Newline
  57.             Goto LABEL004
  58.         Case "A"
  59.             Newline
  60.             PrintLn "@X0AAvailable for CHAT"
  61.             End
  62.         Case "U"
  63.             Newline
  64.             PrintLn "@X0AUnavailable for CHAT"
  65.             End
  66.         Case "H"
  67.             If (Exist(PPEPath() + "HELP1.ANS")) DispFile PPEPath() + "HELP1.ANS", 4 + 2 + 1
  68.             Goto LABEL001
  69.         Case "?"
  70.             If (Exist(PPEPath() + "HELP1.ANS")) DispFile PPEPath() + "HELP1.ANS", 4 + 2 + 1
  71.             Goto LABEL001
  72.     End Select
  73.     Newline
  74.     PrintLn "@X08C@X07B@X0FN@X07.@X08P@X07P@X0FE @X08v@X071.@X0Fo @X08Wr@X07it@X0Ften @X08b@X07y @X08V@X07o@X0Fc @X08[@X07G@X0FT@X07o@X08]"
  75.     End
  76.     :LABEL003
  77.     PrintLn ""
  78.     PrintLn "@X0F     @X08(@X07#@X08)   St@X07at@X0Fus                  @X08U@X07se@X0Fr"
  79.     PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  80.     PrintLn "@X04       @X0F1   Available for CHAT      @USER@ (@CITY@)"
  81.     PrintLn "@X0F       2   Available for CHAT      SYSOP (@BOARDNAME@)"
  82.     PrintLn "@X0F       3   Transferring a File     @LASTCALLERSYSTEM@"
  83.     PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  84.     STRING009 = ""
  85.     Newline
  86.     Newline
  87.     :LABEL004
  88.     Print "@X0A(@X0C@TIMELEFT@ @X0Amin. left) (H)elp, Chat Command? "
  89.     InputStr "_", STRING009, 7, 50, Mask_Ascii(), 4096 + 64
  90.     Tokenize STRING009
  91.     Select Case (Upper(STRING009))
  92.         Case "WHO"
  93.             Goto LABEL003
  94.         Case "SHOW"
  95.             Goto LABEL003
  96.         Case "CALL"
  97.             Goto LABEL008
  98.         Case "X"
  99.             PrintLn "@X0FExpert Mode now on @FIRST@ . . ."
  100.             Newline
  101.             Goto LABEL004
  102.         Case "CHANNEL"
  103.             Goto LABEL002
  104.         Case "TOPIC"
  105.             PrintLn "@X0BTopic is unchangeable!"
  106.             Newline
  107.             Goto LABEL004
  108.         Case "PRIVATE"
  109.             PrintLn "@X0BChannel 1 cannot be made private."
  110.             Newline
  111.             Goto LABEL004
  112.         Case "MENU"
  113.             If (Exist(PPEPath() + "MENU.PCB")) DispFile PPEPath() + "MENU.PCB", 4 + 2 + 1
  114.             Goto LABEL004
  115.         Case "Q"
  116.             Newline
  117.             PrintLn "@X0FNode CHAT ended at @SYSTIME@"
  118.             Newline
  119.             PrintLn "@X08C@X07B@X0FN@X07.@X08P@X07P@X0FE @X08v@X071.@X0Fo @X08Wr@X07it@X0Ften @X08b@X07y @X08V@X07o@X0Fc @X08[@X07G@X0FT@X07o@X08]"
  120.             End
  121.         Case "SILENT"
  122.             PrintLn "@X0BSilent Mode is now on."
  123.             Newline
  124.             Goto LABEL004
  125.         Case "QUIT"
  126.             Newline
  127.             PrintLn "@X0FNode CHAT ended at @SYSTIME@"
  128.             Newline
  129.             PrintLn "@X08C@X07B@X0FN@X07.@X08P@X07P@X0FE @X08v@X071.@X0Fo @X08Wr@X07it@X0Ften @X08b@X07y @X08V@X07o@X0Fc @X08[@X07G@X0FT@X07o@X08]"
  130.             End
  131.         Case "BYE"
  132.             Hangup
  133.         Case "G"
  134.             STRING013 = ""
  135.             Newline
  136.             Print "@X07Proceed with Logoff? "
  137.             TIME004 = Time() + 10
  138.             While ((STRING013 == "") && (Time() < TIME004)) Do
  139.                 STRING013 = Inkey()
  140.             EndWhile
  141.             If (Upper(STRING013) == "Y") Then
  142.                 Hangup
  143.                 Goto LABEL005
  144.             Endif
  145.             :LABEL005
  146.             Newline
  147.             Newline
  148.             Goto LABEL004
  149.         Case "ECHO"
  150.             PrintLn "@X0BChat Echo enabled."
  151.             Newline
  152.             Goto LABEL004
  153.         Case "NOECHO"
  154.             PrintLn "@X0BChat Echo disabled.  Use the ECHO command to re-enable it."
  155.             Newline
  156.             Goto LABEL004
  157.         Case "MONITOR"
  158.             PrintLn "@X0BMonitor of public channels enabled."
  159.             Newline
  160.             Goto LABEL004
  161.         Case "PUBLIC"
  162.             PrintLn "@X0BThis channel is now public."
  163.             Newline
  164.             Goto LABEL004
  165.         Case "IGNORE"
  166.             Goto LABEL006
  167.         Case "H"
  168.             If (Exist(PPEPath() + "HELP2.ANS")) DispFile PPEPath() + "HELP2.ANS", 4 + 2 + 1
  169.             Goto LABEL004
  170.         Case "?"
  171.             If (Exist(PPEPath() + "HELP2.ANS")) DispFile PPEPath() + "HELP2.ANS", 4 + 2 + 1
  172.             Goto LABEL004
  173.         Case "SEND"
  174.             Goto LABEL007
  175.     End Select
  176.     Goto LABEL004
  177.     End
  178.     :LABEL006
  179.     STRING011 = ""
  180.     Newline
  181.     Print "@X0AEnter node (#) to ignore, (C)ancel or (W)ho? "
  182.     InputStr "_", STRING011, 7, 50, Mask_Ascii(), 4096 + 64
  183.     Tokenize STRING011
  184.     Select Case (Upper(STRING011))
  185.         Case "C"
  186.             Goto LABEL004
  187.         Case "W"
  188.             PrintLn ""
  189.             PrintLn "@X0F     @X08(@X07#@X08)   St@X07at@X0Fus                  @X08U@X07se@X0Fr"
  190.             PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  191.             PrintLn "@X04       @X0F1   Available for CHAT      @USER@ (@CITY@)"
  192.             PrintLn "@X0F       2   No Caller this Node"
  193.             PrintLn "@X0F       3   Transferring a File     @LASTCALLERSYSTEM@"
  194.             PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  195.             Goto LABEL006
  196.         Case "1"
  197.             PrintLn "@X0BSorry, @FIRST@, Node requested is not available for CHAT."
  198.             Goto LABEL006
  199.         Case "2"
  200.             PrintLn "@X0BMessages received from Node 2 will now be ignored."
  201.             Goto LABEL006
  202.         Case "3"
  203.             PrintLn "@X0BSorry, @FIRST@, Node requested is not available for CHAT."
  204.             Goto LABEL006
  205.     End Select
  206.     Goto LABEL004
  207.     End
  208.     :LABEL007
  209.     STRING012 = ""
  210.     Newline
  211.     Print "@X0ASend send message to Node (#), (C)ancel or (S)how users? "
  212.     InputStr "_", STRING012, 7, 50, Mask_Ascii(), 4096 + 64
  213.     Tokenize STRING012
  214.     Select Case (Upper(STRING012))
  215.         Case "C"
  216.             Goto LABEL004
  217.         Case "S"
  218.             Newline
  219.             PrintLn "Channel 1: Open Discussion"
  220.             PrintLn "=========================="
  221.             PrintLn "(1) @FIRST@ * "
  222.             Goto LABEL007
  223.         Case "1"
  224.             PrintLn "@X0BSorry, @FIRST@, Node requested is not available for CHAT."
  225.             Goto LABEL007
  226.         Case "2"
  227.             PrintLn "@X0BSorry, @FIRST@, SYSOP cannot receive a message."
  228.             Goto LABEL007
  229.         Case "3"
  230.             PrintLn "@X0BSorry, @FIRST@, Node requested is not available for CHAT."
  231.             Goto LABEL007
  232.     End Select
  233.     Goto LABEL004
  234.     End
  235.     :LABEL008
  236.     PrintLn ""
  237.     PrintLn "@X0F     @X08(@X07#@X08)   St@X07at@X0Fus                  @X08U@X07se@X0Fr"
  238.     PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  239.     PrintLn "@X04       @X0F1   Available for CHAT      @USER@ (@CITY@)"
  240.     PrintLn "@X0F       2   Available for CHAT      SYSOP (@BOARDNAME@)"
  241.     PrintLn "@X0F       3   Transferring a File     @LASTCALLERSYSTEM@"
  242.     PrintLn "@X0F     @X04─@X0C─@X04─   ────@X0C────@X07──@X0F─@X07──@X0C────@X04────   ─────@X0C─────@X07───@X0F───@X07───@X0C─────@X04─────"
  243.     :LABEL009
  244.     STRING010 = ""
  245.     Newline
  246.     Print "@X0AEnter the number of the node to CALL into chat? "
  247.     InputStr "_", STRING010, 7, 50, Mask_Ascii(), 4096 + 64
  248.     Tokenize STRING010
  249.     Select Case (Upper(STRING010))
  250.         Case "1"
  251.             PrintLn "@X0FSorry, @FIRST@, Node requested is not available for CHAT."
  252.             Goto LABEL009
  253.         Case "2"
  254.             PrintLn "@X03Requesting Node 2 for chat. . . . "
  255.             Goto LABEL010
  256.         Case "3"
  257.             PrintLn "@X0FSorry, @FIRST@, Node requested is not available for CHAT."
  258.             Goto LABEL009
  259.         Case "Q"
  260.             Newline
  261.             PrintLn "@X0FNode CHAT ended at @SYSTIME@"
  262.             End
  263.     End Select
  264.     Goto LABEL004
  265.     End
  266.     :LABEL010
  267.     TIME001 = Time()
  268.     TIME002 = ReadLine(PCBDat(), 189)
  269.     TIME003 = ReadLine(PCBDat(), 190)
  270.     INTEGER004 = 12
  271.     STRING003 = Chr(7)
  272.     STRING004 = Chr(13)
  273.     STRING005 = Chr(27) + "["
  274.     STRING006 = STRING005 + "0;0H"
  275.     STRING007 = STRING005 + "K"
  276.     If (((TIME001 >= TIME002) && (TIME001 <= TIME003)) || (CurSec() >= SysopSec())) Then
  277.         If ((CurSec() >= SysopSec()) || !PageStat()) Then
  278.             DispText 579, 128
  279.             DispText 97, 128
  280.             STRING001 = Space(15) + "Press (Space) to answer chat request, "
  281.             STRING001 = STRING001 + "(Esc) when done."
  282.             Gosub LABEL012
  283.             For INTEGER003 = 1 To INTEGER004
  284.                 Print "@X0F■@X05∙@X0D·"
  285.                 MPrint STRING003
  286.                 Gosub LABEL013
  287.                 If (KInkey() == " ") Then
  288.                     STRING001 = ""
  289.                     Gosub LABEL012
  290.                     Chat
  291.                     PageOff
  292.                     End
  293.                 Endif
  294.                 If (Abort()) INTEGER003 = INTEGER004 + 1
  295.             Next
  296.             STRING001 = ""
  297.             Gosub LABEL012
  298.             If (Abort()) Then
  299.                 ResetDisp
  300.                 Newline
  301.                 End
  302.                 Goto LABEL011
  303.             Endif
  304.             Newline
  305.         Endif
  306.     Endif
  307.     :LABEL011
  308.     PageOn
  309.     DispText 128, 128 + 64
  310.     STRING002 = NoChar()
  311.     PromptStr 571, STRING002, 1, "", 16384 + 64 + 256 + 2 + 8
  312.     If (STRING002 == YesChar()) KbdStuff "C" + STRING004 + "Y" + STRING004
  313.     End
  314.     :LABEL012
  315.     INTEGER001 = GetX()
  316.     INTEGER002 = GetY()
  317.     SPrint STRING006, STRING007
  318.     SPrint STRING001
  319.     SPrint STRING005 + String(INTEGER002) + ";" + String(INTEGER001) + "H"
  320.     Return
  321.     :LABEL013
  322.     Sound 15
  323.     Delay 2
  324.     Sound 30
  325.     Delay 2
  326.     Sound 45
  327.     Delay 2
  328.     Sound 60
  329.     Delay 2
  330.     Sound 75
  331.     Delay 2
  332.     Sound 90
  333.     Delay 2
  334.     Sound 115
  335.     Delay 2
  336.     Sound 130
  337.     Delay 2
  338.     Sound 145
  339.     Delay 2
  340.     Sound 160
  341.     Delay 2
  342.     Sound 175
  343.     Delay 2
  344.     Sound 190
  345.     Delay 2
  346.     Sound 0
  347.     Delay 10
  348.     Return
  349.  
  350. ;------------------------------------------------------------------------------
  351. ;
  352. ; Usage report (before postprocessing)
  353. ;
  354. ; ■ Statements used :
  355. ;
  356. ;    13      End
  357. ;    124     Goto 
  358. ;    27      Let 
  359. ;    7       Print 
  360. ;    51      PrintLn 
  361. ;    54      If 
  362. ;    5       DispFile 
  363. ;    1       ResetDisp
  364. ;    2       Hangup
  365. ;    5       InputStr 
  366. ;    4       Gosub 
  367. ;    2       Return
  368. ;    1       PromptStr 
  369. ;    13      Delay 
  370. ;    31      Newline
  371. ;    5       Tokenize 
  372. ;    3       DispText 
  373. ;    1       KbdStuff 
  374. ;    13      Sound 
  375. ;    1       Chat
  376. ;    3       SPrint 
  377. ;    1       MPrint 
  378. ;    1       PageOn
  379. ;    1       PageOff
  380. ;
  381. ;
  382. ; ■ Functions used :
  383. ;
  384. ;    45      +
  385. ;    44      ==
  386. ;    2       <
  387. ;    2       <=
  388. ;    5       >=
  389. ;    48      !
  390. ;    4       &&
  391. ;    3       ||
  392. ;    41      Upper()
  393. ;    1       Space()
  394. ;    3       Chr()
  395. ;    2       Abort()
  396. ;    3       Time()
  397. ;    1       NoChar()
  398. ;    1       YesChar()
  399. ;    1       Inkey()
  400. ;    2       String()
  401. ;    5       Mask_Ascii()
  402. ;    2       PCBDat()
  403. ;    10      PPEPath()
  404. ;    2       ReadLine()
  405. ;    2       SysopSec()
  406. ;    2       CurSec()
  407. ;    5       Exist()
  408. ;    1       GetX()
  409. ;    1       GetY()
  410. ;    1       KInkey()
  411. ;    1       PageStat()
  412. ;
  413. ;------------------------------------------------------------------------------
  414. ;
  415. ; Analysis flags : BMds
  416. ;
  417. ; B - Brute hangup ■ 1
  418. ;     Program hangup without notification. This may be a good way to
  419. ;     disconnect a user, but if used randomly, may be very nasty
  420. ;     ■ Search for : HANGUP, DTROFF
  421. ;
  422. ; M - Send text to modem only ■ 4
  423. ;     Some informations are sent only to the modem, not to the local
  424. ;     screen, this is a well known way to make stealth backdoors, Check!
  425. ;     ■ Search for : SENDMODEM, MPRINT, MPRINTLN
  426. ;
  427. ; d - Access PCBOARD.DAT ■ 2
  428. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  429. ;     for many PPE so they can find various informations on the system
  430. ;     (system paths, max number of lines in messages, ...) but it may also
  431. ;     be a way to gather vital informations.
  432. ;     ■ Search for : PCBDAT()
  433. ;
  434. ; s - Sysop level access ■ 5
  435. ;     Program is reading the sysop access level, this may be normal
  436. ;     but still it is very suspect. It is the best way to give a user
  437. ;     all priviledges. Check!
  438. ;     ■ Search for : SYSOPSEC()
  439. ;
  440. ;------------------------------------------------------------------------------
  441. ;
  442. ; Postprocessing report
  443. ;
  444. ;    1       For/Next
  445. ;    1       While/EndWhile
  446. ;    5       If/Then or If/Then/Else
  447. ;    5       Select Case
  448. ;
  449. ;------------------------------------------------------------------------------
  450. ;                 AEGiS Corp - Break the routines, code against the machines!
  451. ;------------------------------------------------------------------------------
  452.