1. 23 Jun, 2000 2 commits
  2. 20 Jun, 2000 1 commit
    • Justin Mitchell's avatar
      New version numbering system allowing an extra digit for revisions · 1a84d09e
      Justin Mitchell authored
      within a release.
      
      New version string display on startup.
      
      script command 'version' to retrieve the new string into a variable,
      format  'D 2 5 0 arthur 20000620'
      
      D for devel version, R for public release
      2 = major version number
      5 = minor version number
      0 = revision number or 'tweak'
      arthur = user that compiled this build
      20000620 = compile date in standard YYYYMMDD format
      1a84d09e
  3. 16 Jun, 2000 4 commits
    • Chris Fry's avatar
      · 42625111
      Chris Fry authored
      More 'devel' flag conversions
      
      Fry
      42625111
    • Chris Fry's avatar
      · 87949a71
      Chris Fry authored
      Did the other devel function
      
      script function: scr_devel_msg(struct code *pc, char *fmt, ...)
          This allows a script function to print an error text, and it
          automatically adds where the problem occured, and the instruction run.
      
      normal function: devel_msg(char *func, char *fmt, ...)
          Allows a function to print a function name, and an error text, and it
          gets output in the correct format.
      
      Also, both of these functions handle the developer flag, so you just need to
      call the relevant function.
      
      Fry
      87949a71
    • Chris Fry's avatar
      · 14a76f71
      Chris Fry authored
      Added 'devel_message' function for scripts, to allow users to print
      developer messages to screen. This is intended for non-fatal warnings, eg,
      as I've already done, a warning when you use 'jump', and cant find the
      function. These messages only show if you have the Developer chatpriv (D).
      
      The point of this is just for developers to know simple problems, and it
      isnt confined to scripts. For example, the 'invalid incoming message type'
      message in incoming.c is now Devloper only, so normal users dont get
      spammed.
      
      I plan to convert all non-fatal (or non-useful) warnings to developer mode,
      and will be writing a function for that too.
      
      Fry
      14a76f71
    • Chris Fry's avatar
      · c872652d
      Chris Fry authored
      Fixed strmid. if end pos < start pos, now returns '', rather than something
      fairly random.
      
      Fry
      c872652d
  4. 15 Jun, 2000 3 commits
    • Chris Fry's avatar
      · 81c00f57
      Chris Fry authored
      Oops. left in a debug text, sorry
      
      Fry
      81c00f57
    • Chris Fry's avatar
      · 5caa1693
      Chris Fry authored
      Fixed a hell of a lot of memory overflow bugs. Thanks to rohan for pointing
      out stuff :)
      
      Fixed some other bugs in mrod/zod reasons.
      
      'args' in DoCommand (Parse.c) now works all the time, rather than the
      extremely random segfaults that people might have got when typing in a
      command (only happened to me once since I changed the format of 'wiz',
      'whisper', 'tell' etc.. to allow spaces/quotes - might have happened to
      other people more?)
      
      Fry
      5caa1693
    • Chris Fry's avatar
      · c0c4c692
      Chris Fry authored
      Updated the duck/bunny gag _slightly_.
      
      Fixed notsayto to work with different rooms/globals - like normal text
      
      Fry
      c0c4c692
  5. 13 Jun, 2000 2 commits
    • Chris Fry's avatar
      · 4595532a
      Chris Fry authored
      Fixed, and fairly radically updated all the ignorelist stuff. Now quicker,
      with less memory leaks (surprised they didnt show up in -exitinfo - must
      check this), and doesnt need to store user PID anymore.
      
      Username detection also now works (ie, doesnt allow '.ignore fry',
      '.unignore f'), and where possible (ie, user detected online), displays the
      username in correct capitalisations :)
      
      Fry
      4595532a
    • Chris Fry's avatar
      · b313639c
      Chris Fry authored
      Fixed 'zod', and 'mrod' commands. People can now correctly specify reasons.
      
      Fixed 'display_message' somewhat - still got a slightly broken linewrap :(
      
      Talkpriv script command now returns 'B' too to allow users to see whether
      they need to 'beep' or not for alternative text
      
      Fry
      b313639c
  6. 11 Jun, 2000 3 commits
    • Chris Fry's avatar
      · 15ee288f
      Chris Fry authored
      Fixed some segv's in zod/mrod/kick/remove, made 'reasons' work better in
      them too, and now prints messages to board if you zod yourself. I forgot to
      take this check out when I fixed a bug elsewhere :)
      
      Fry
      15ee288f
    • Finn Wilcox's avatar
      Fixed a typo in scr_getvar that could cause a double-free. This is · 35d5f37d
      Finn Wilcox authored
      probably what was causing the segv with strmid.  Also added an extra
      sanity check in the hashtable iterators.
      
      Made 'invalid variable name' errors appear even with debugging turned
      off.  If you get it your script is definitely broken, probably building
      a variable name with strcat which contains reserved characters such as
      "$".
      
      Added code to prevent malloc(0) when building the room link arrays.
      This made efence abort if you entered an undefined room.  The count is
      now set to 1 if there are no exits in a room.
      
      Added the -D__NO_STRING_INLINES flag when debugging, to make it easier
      to track down segv's in string operations.
      35d5f37d
    • Chris Fry's avatar
      · 9d5f9db1
      Chris Fry authored
      Fixed just a _few_ bugs 'n' things that made mw go bump in the night :)
      
      ie, it now works again :)
      
      NOTE: Threads are totally shafted now, as it seems hash tables, and
      variables
      completely break threads. This is good, because the shutdown function
      sometimes still breaks threads, and now any JUMP's in scripts will shaft
      threads too. Oh well. perhaps radically update it later? :)
      
      Fry
      9d5f9db1
  7. 09 Jun, 2000 5 commits
    • Finn Wilcox's avatar
      8a3ea6f5
    • Chris Fry's avatar
      · 29798ab6
      Chris Fry authored
      Make comparison counters 'local' now, so a function jump within a funciton
      doesnt change the comparison counters. eg:
      
      function a
          IFCLEAR
          EQ "a" "b"
          JUMP b
          IFALL c
          PRINT "match"
          RETURN
        d:
          PRINT "fail"
          RETURN
      endfunc
      
      function b
          IFCLEAR
          RETURN
      endfunc
      
      If function 'a' is run, returns the text 'match'. If it didnt work, it would
      return 'fail', of course :)
      
      Fry
      29798ab6
    • Chris Fry's avatar
      · f912f449
      Chris Fry authored
      Commented the 'set_defaults' routine. Was gonna change it, but couldnt be
      bothered :)
      
      Fry
      f912f449
    • Chris Fry's avatar
      · 269bd2dc
      Chris Fry authored
      Fixed print/nprint - no beeps now
      
      Fry
      269bd2dc
    • Chris Fry's avatar
      · 131c2c45
      Chris Fry authored
      Ooops. Should have CVS'd this a while ago. no idea what I changed :)
      
      Fry
      131c2c45
  8. 02 Jun, 2000 1 commit
  9. 31 May, 2000 9 commits
    • Finn Wilcox's avatar
      Added a new script command 'listvars', which gets a list of all global · c115470f
      Finn Wilcox authored
      variables, as a string.  This list is compressed using the same
      algorithm as the unix 'sq' filter, and separated by spaces.  There's
      no built-in decoding yet.  I may add a variant of 'split' that does
      that.  It is quite simple to decode it with a script though.
      c115470f
    • Finn Wilcox's avatar
      Fixed 2 more parse-error checking bugs. Both affected expansions of · 3d209c4a
      Finn Wilcox authored
      non-existent variables.
      
      Removed the 'magic' variable ${?} for return values.  'RETURN' without
      an argument now stores an empty string in the result variable.  The
      result is still passed in a variable called '?' but no script functions
      ever see this.
      3d209c4a
    • Chris Fry's avatar
      · fe758411
      Chris Fry authored
      Modified incoming.c so that the 'invalid mesg: 21' etc.. only appears if you
      have the 'developer' priv (chatpriv D) on.
      
      removed the 'shift' command from scripts, as obsolete, and can break script
      arguments. (or used to)
      
      Fry
      fe758411
    • Chris Fry's avatar
      · fb525f84
      Chris Fry authored
      Fixed a problem with the 'log' function, when lines got too long. Now logs
      will be neater... trust me. :)
      
      Fry
      fb525f84
    • Chris Fry's avatar
      · f45dbf09
      Chris Fry authored
      fixed broadcast RPC logging.
      
      Fry
      f45dbf09
    • Chris Fry's avatar
      · a11ccc26
      Chris Fry authored
      Fixed the autoexec stuff, so you now appear in the wholist.
      
      Simple really, after setting the 'ONCHAT' chatmode, only updated whofile
      *after* the autoexec. Kinda silly :)
      
      Fry
      a11ccc26
    • Chris Fry's avatar
      · 6ee09bd8
      Chris Fry authored
      Fixed Broadcast IPC's and RPC's
      
      Now actually sends the correct string..
      
      Usage:
      
      SENDIPC <user> <message>
      SENDIPB <message>
      
      SENDRPC <user> <type> <message>
      SENDRPB <type> <message>
      
      Fry
      6ee09bd8
    • Chris Fry's avatar
      · f212496e
      Chris Fry authored
      RPC calls now work.
      
      Usage: SENDRPC <user> <type> <message>
      
      Any user may specify a function to call on a certain message type. these
      have to be 'bound'.
      
      In scripts put:
      
      rpc <type> <function>
      
      -------------
      
      Example:
      
      [~/.mwrc]
      rpc INIT rpc_init
      
      [~/ipc.mws]
      SENDRPC Fry INIT "Test"
      
      etc...
      
      Any type not bound will not be called.
      
      Fry
      f212496e
    • Finn Wilcox's avatar
      Allowed 'daemon' users to use the '-quiet' command-line option. · 77979b7a
      Finn Wilcox authored
      (This is not done automatically)
      77979b7a
  10. 30 May, 2000 10 commits
    • Finn Wilcox's avatar
      Added a new special flag 'E' that makes users hidden. You need global · dde2474e
      Finn Wilcox authored
      (or to have 'E' yourself) to see them on the who list.  They also never
      recieve '.notsayto' messages.
      
      This flag is intended for IPC 'daemons', to make them less annoying.
      It should not be given to normal users.
      
      Recommended flags for 'daemon' users:
      status: rnip
      specials: CnTt
      chatmodes: pf
      chatprivs: sA
      dde2474e
    • Finn Wilcox's avatar
      Added new script command "CALL". · 6f1b216b
      Finn Wilcox authored
      Usage: CALL <function> <variable> [arg...]
      
      This command calls the given function and stores the value it returns
      in <variable>.
      
      RETURN now accepts an argument.  If none is given, the content of the
      called function's local variable '$?' is returned.
      
      The variable is always overwritten, possibly with a null string if
      the function is not designed to return a value.
      
      This is an alternative to returning values in a global variable, but
      without the compatibility problems of combining scripts using different
      variable names.
      6f1b216b
    • Chris Fry's avatar
      · b214a822
      Chris Fry authored
      Now allows user to set the 'ipc' function as you can with events, by using
      the 'ipc' command in scripts.
      
      eg:
      
      ipc incoming_ipc
      
      Fry
      b214a822
    • Chris Fry's avatar
      *** empty log message *** · 8003797a
      Chris Fry authored
      8003797a
    • Steve Hill's avatar
      · da7b3ef7
      Steve Hill authored
      New message type FORCE_IPC, which can be sent uding the SENDIPC script
      command.  When a client receives FORCE_IPC it calls the ipc script function
      if it exists.  i.e.
      
      to send "fish" to a user:
      
         SENDIPC user fish
      
      that user will then have a function called 'ipc', whcih will be executed
      the same as any other event - the text (in this case, 'fish') will appear
      as $1 and the USER command will return the name of the sender.
      da7b3ef7
    • Chris Fry's avatar
      · 0d6c6730
      Chris Fry authored
      Changed 'non-existant variable' from {?} to ""
      
      Fry
      0d6c6730
    • Finn Wilcox's avatar
      Rewrote scr_clearvars to use two var_op_t's (avoids breaking iterator · 53cad708
      Finn Wilcox authored
      by deleting variables).  This seems to work ok with both lists and
      hashes but is very inefficient compared to the basic list-freeing
      functions (VAR_FREELIST).  Perhaps this could be replaced by a new
      'selective purge' function in vars.c (with 2 implementations).
      
      Modified the syntax for variable expansions:
      1. Arithmetic expressions should now use "$[..]" instead of "$(..)".
         This is for consistency with shells.
      2. The array expansions are disabled (They are likely to cause name clashes,
         and are not useful at the moment).
      3. The '/' character is allowed in identifiers, for now.  This is to
         avoid breaking certain scripts.  I still suggest avoiding using it.
      53cad708
    • Finn Wilcox's avatar
      Removed '$#<var>' expansion as it conflicted with '$#' for the number · 922a9598
      Finn Wilcox authored
      of args to a function.
      
      Other special chars (including "$(..)") will probably be changed soon.
      
      Added some more checks for parse errors.  Most should be reported at
      runtime now.
      922a9598
    • Finn Wilcox's avatar
      Fixed a bug that causes segfaults instantly when you join the talker. · 4edcd544
      Finn Wilcox authored
      Blame whoever did this:
      
      script_init()
      {
      #ifdef MW_HASHTABLES
              hash_setup();
      #endif
              VAR_NEWLIST(&var_list);
      }
      
      and this:
      
      ### uncomment for hash tables instead of lists
      DEFS+= -DHASHTABLES
      
      Replaced a couple more macros with functions
      4edcd544
    • Steve Hill's avatar
      · b92f156e
      Steve Hill authored
      A new ISED function to do a case insensitive SED.  This has not been tested
      yet because finnw's latest changes have totally broken scripts (as soon as
      it tries to exec any script it SEGV's).
      
      Finnw: please fix this and in future test it before committing.
      
       - Steve
      b92f156e