home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / dos / sbbs230b.exe / EXEC.LZH / STR_CMDS.SRC < prev    next >
Encoding:
Text File  |  1995-09-06  |  5.4 KB  |  368 lines

  1. # STR_CMDS.SRC
  2.  
  3. # Global String Command Module for Synchronet
  4.  
  5. # This is NOT a command shell, DO NOT add to SCFG->Command Shells
  6.  
  7. # This module is loaded from command shells with the EXEC_BIN function
  8.  
  9. # It contains mostly sysop commands (i.e. ;DOS)
  10.  
  11. # The command string must be the current string (obtained with SETSTR, GETSTR
  12. # or similar function) before this module is loaded.
  13.  
  14. !include nodedefs.inc
  15.  
  16. # Remove any trailing spaces
  17.  
  18. truncsp str
  19.  
  20. logstr
  21. compare_ars SYSOP
  22. if_true
  23.  
  24.     ######################## SYSOP Functions ##############################
  25.  
  26.     compare_str "ERR"
  27.     if_true
  28.         error_log
  29.         return
  30.         end_if
  31.  
  32.     compare_str "GURU"
  33.     if_true
  34.         guru_log
  35.         return
  36.         end_if
  37.  
  38.     compare_str "CHUSER"
  39.     if_true
  40.         change_user
  41.         return
  42.         end_if
  43.  
  44.     compare_str "ANSCAP"
  45.     if_true
  46.         ansi_capture
  47.         return
  48.         end_if
  49.  
  50.     compare_str "LIST"
  51.     if_true
  52.         list_text_file
  53.         return
  54.         end_if
  55.  
  56.     compare_str "EDIT"
  57.     if_true
  58.         edit_text_file
  59.         return
  60.         end_if
  61.  
  62.     compare_str "LOG"
  63.     if_true
  64.         system_log
  65.         return
  66.         end_if
  67.  
  68.     compare_str "MEM"
  69.     if_true
  70.         show_mem
  71.         return
  72.         end_if
  73.  
  74.     compare_str "YLOG"
  75.     if_true
  76.         system_ylog
  77.         return
  78.         end_if
  79.  
  80.     compare_str "SS"
  81.     if_true
  82.         system_stats
  83.         return
  84.         end_if
  85.  
  86.     compare_word "NS"
  87.         if_true
  88.         shift_str 2
  89.         compare_word " "
  90.         if_true
  91.             shift_str 1
  92.             end_if
  93.         node_stats
  94.         return
  95.                 end_if
  96.  
  97.     compare_word "EXEC"
  98.     if_true
  99.         shift_str 4
  100.         compare_word " "
  101.         if_true
  102.             shift_str 1
  103.             end_if
  104.         exec_int %s
  105.         return
  106.         end_if
  107.  
  108.     compare_word "CALL "
  109.     if_true
  110.         shift_str 5
  111.         exec command /c rem >> %jQNET\%s.NOW
  112.         end_if
  113.  
  114.     compare_word "NODE"
  115.     if_true
  116.         exec_int %!%s
  117.         return
  118.         end_if
  119.  
  120.     compare_word "DOWN "
  121.     if_true
  122.         shift_str 5
  123.         exec_int %!node down %s
  124.         return
  125.                 end_if
  126.  
  127.     compare_word "RERUN "
  128.     if_true
  129.         shift_str 6
  130.         exec_int %!node rerun %s
  131.         return
  132.                 end_if
  133.  
  134.     compare_str "SLOG"
  135.     if_true
  136.         exec_int %!SLOG /P
  137.         return
  138.         end_if
  139.  
  140.     compare_str "NLOG"
  141.         if_true
  142.         exec_int %!SLOG %n /P
  143.         return
  144.         end_if
  145.  
  146.     compare_word "NLOG "
  147.         if_true
  148.         shift_str 5
  149.         exec_int %!SLOG ..\NODE%s /P
  150.         return
  151.                 end_if
  152.  
  153.     compare_word "UEDIT"
  154.         if_true
  155.         shift_str 5
  156.         compare_word " "
  157.         if_true
  158.             shift_str 1
  159.             end_if
  160.                 user_edit
  161.         return
  162.                 end_if
  163.  
  164.     compare_str "MAIL"
  165.     if_true
  166.         mail_read_all
  167.         return
  168.         end_if
  169.  
  170.         compare_str "BULKMAIL"
  171.         if_true
  172.         print "\r\nEnter ARS matches to send mail to or [CR] to send "
  173.         print "by name/number\r\nARS to match: "
  174.         getstrupr 40
  175.                 mail_send_bulk
  176.         return
  177.                 end_if
  178.  
  179.     compare_str "DOS"
  180.     if_true
  181.         chksyspass
  182.         if_true
  183.             exec_int command.com
  184.             end_if
  185.         return
  186.         end_if
  187.  
  188.     compare_str "DIR"
  189.     if_true
  190.         chksyspass
  191.         if_true
  192.             exec_int command /c dir %f /p
  193.             end_if
  194.         return
  195.                 end_if
  196.  
  197.     compare_word "LOAD "
  198.     if_true
  199.         shift_str 5
  200.         load_text %s
  201.         return
  202.         end_if
  203.  
  204.     compare_word "DIR "
  205.     if_true
  206.         chksyspass
  207.         if_true
  208.             shift_str 4
  209.             exec_int command /c dir %s /p
  210.             end_if
  211.         return
  212.         end_if
  213.  
  214.     compare_word "UPLOAD"
  215.     if_true
  216.         shift_str 7
  217.         file_upload_bulk
  218.         return
  219.         end_if
  220.  
  221.     compare_word "ALTUL"
  222.     if_true
  223.         shift_str 6
  224.         file_set_alt_path
  225.         return
  226.         end_if
  227.  
  228.     compare_word "RESORT"
  229.     if_true
  230.         shift_str 7
  231.         file_resort_directory
  232.         return
  233.         end_if
  234.  
  235.     compare_word "OLDUL"
  236.     if_true
  237.         shift_str 6
  238.         file_find_old_uploads
  239.         return
  240.         end_if
  241.  
  242.     compare_word "OLD"
  243.     if_true
  244.         shift_str 4
  245.         file_find_old
  246.         return
  247.         end_if
  248.  
  249.     compare_word "OFFLINE"
  250.     if_true
  251.         shift_str 8
  252.         file_find_offline
  253.         return
  254.         end_if
  255.  
  256.     compare_word "CLOSE"
  257.     if_true
  258.         shift_str 6
  259.         file_find_open
  260.         return
  261.         end_if
  262.  
  263.     compare_word "GET"
  264.     if_true
  265.         shift_str 3
  266.         compare_word " "
  267.         if_true
  268.             shift_str 1
  269.             end_if
  270.         compare_str ""
  271.         if_true
  272.             print "\r\nPath and filename: "
  273.             getstr 60
  274.             compare_str ""
  275.             if_true
  276.                 return
  277.                 end_if
  278.             end_if
  279.         file_get
  280.         return
  281.         end_if
  282.  
  283.     compare_word "PUT"
  284.     if_true
  285.         shift_str 3
  286.         compare_word " "
  287.         if_true
  288.             shift_str 1
  289.             end_if
  290.         compare_str ""
  291.         if_true
  292.             print "\r\nPath and filename: "
  293.             getstr 60
  294.             compare_str ""
  295.             if_true
  296.                 return
  297.                                 end_if
  298.             end_if
  299.         file_put
  300.         return
  301.         end_if
  302.         end_if
  303.  
  304. ############################# Exemption Functions #############################
  305.  
  306.  
  307. # Quiet Node
  308. compare_ars exempt Q
  309. if_true
  310.     compare_str "QUIET"
  311.     if_true
  312.         compare_ars QUIET
  313.         if_true
  314.             exec_int %!node status=3 %#
  315.         else
  316.             exec_int %!node status=4 %#
  317.             end_if
  318.         return
  319.         end_if
  320.  
  321.     compare_str "ANON"
  322.     if_true
  323.         toggle_node_misc NODE_ANON
  324.         exec_int %!node list %#
  325.         return
  326.         end_if
  327.     end_if
  328.  
  329. # Lock Node
  330. compare_ars exempt N
  331. if_true
  332.         compare_word "LOCK "
  333.         if_true
  334.                 shift_str 5
  335.                 exec_int %!node lock %s
  336.         return
  337.                 end_if
  338.     end_if
  339.  
  340. # Interrupt Node
  341. compare_ars exempt I
  342. if_true
  343.     compare_word "INTR "
  344.         if_true
  345.                 shift_str 5
  346.                 exec_int %!node intr %s
  347.                 return
  348.                 end_if
  349.     end_if
  350.  
  351. # Chat
  352. compare_ars exempt C
  353. if_true
  354.     compare_str "CHAT"
  355.     if_true
  356.         page_sysop
  357.         return
  358.         end_if
  359.     end_if
  360.  
  361. compare_str "POFF"
  362. if_true
  363.     toggle_node_misc NODE_POFF
  364.     end_if
  365.  
  366. # None of the above (unrecognized)
  367. return
  368.