Skip to content
Snippets Groups Projects
  1. Jul 28, 2002
    • Unknown User's avatar
    • Chris Fry's avatar
      · be97759b
      Chris Fry authored
      Changed the way scripts work slightly, so that they will quite happily run
      off the talker - although output from SAY etc.. are ignored, and WHEREAMI
      always returns "-1" - that sort of thing.
      
      ---
      
      Changed checkonoff's to use this ability, so you can receive checkonoff
      codes while on the board (ie, if you leave the talker, you will get your
      own checkonoff code). Normal scripts of course, still cant be run from
      the BBS, and IPC/RPC messages are currently ignored if off the talker.
      
      ---
      
      Radically, completely rewrote the entire checkonoff system to give more
      information, and a much more logical code system. Scripts executed using
      this method now recieve certain arguments:
      
      $0 = "CheckOnOff"
      $1 = <code>
      $2 = <method>
      $3 = <is_quiet>
      $4 = <sourceuser>
      $5 = <version>
      
      
      Where <code> can be one of:
         0 - leave the talker
         1 - enter the talker
         2 - leave the board
         3 - enter the board
      
      This keeps backwards compatibility the same - users can still detect each
      of these settings, although the extra features - such as detecting zods -
      will never occur using this code alone
      
      
      For each of the <code> values, <method> has several meanings:
      
      for leaving the board (2):
         0 - normal (by user)
         1 - timeout
         2 - connection dropped
      M  3 - get mrodded
      S  4 - get banned
      S  5 - crash / error
      S  6 - deleted
      
      
      for leaving the talker (0):
         0 - normal (by user)
      Z  1 - zodded
      S  2 - chatmode -c
         3 - straight to shell (!quit etc...)
      
      
      for joining the board (3):
         0 - normal (by user)
         1 - straight to talker (-autochat)
      
      
      for joining the talker (1):
         0 - normal (by user)
      U  1 - summoned
      S  2 - chatmode +c
      
      
      The extra letters in front of the <method> indicate certain privs are
      needed:
      
         M - needs mrod priv to detect
         S - needs SU to detect
         U - needs summon to detect
         Z - needs zod to detect
      
      
      So, for example, if a user were to log on using "-autochat", two messages
      would be created:
      
      <code=3> <method=1>
      <code=1> <method=0>
      
      
      These are the main two values that most people will use - along with
      "USER <variable" to get the user that caused the checkonoff message.
      
      
      Added to these two values, <is_quiet> simply returns:
         0 - user logged on normally
         1 - user logged on with -quiet to supress messages
      
      
      This allows script writers to only display their own messages if a user
      is logged on quietly if they so wish.
      
      
      <sourceuser> is more tricky. This is the person that caused the initiation
      of the checkonoff code in the first place. ie, for most messages, it is
      the same as the user the broadcast came from. However, in cases such as
      zod, mrod, or chatmode +/-c alteration, <sourceuser> will be the person
      that performed that operation.
      
      ie, SUPERUSER bans USER
          <code=0> <method=3>
          <code=2> <method=4> <user=USER> <sourceuser=SUPERUSER>
      
      
      and finally, <version> is mainly for being able to work out which version
      of checkonoff is used. this ranges from "1" to "3" currently, but if you
      wish, you can simply check if any of the arguments is left blank "" and
      work out what needs to be done from there.
      
      ---
      
      Added a "force_status" to incoming.c, and moved the 'ban' and 'delete'
      detection code to there instead of in the main loop - necessary for the
      new checkonoff information.
      
      ---
      
      Fixed a bug with 'ExecEvent2' where it only accepted up to 3 arguments
      
      ---
      
      Removed the now-obsolete "zodded" script
      
      
      Chris
      be97759b
    • Chris Fry's avatar
      · e9655b1d
      Chris Fry authored
      Force and Shutdown functions have to be bound now using:
      
      force <function>
      shutdown <function>
      
      like checkonoff's
      
      Chris
      e9655b1d
  2. Jul 27, 2002
    • Denis Walker's avatar
      · 8b44dee1
      Denis Walker authored
      Corrected error in help for msg and postinfo that said they were the
      same command - they're not.
      8b44dee1
    • Chris Fry's avatar
      · a3cd8229
      Chris Fry authored
      More tasks
      
      Chris
      a3cd8229
    • Finn Wilcox's avatar
      Changed find_folder() tab completion function to use dupstr() instead of · 5d2c4295
      Finn Wilcox authored
      strdup().  This fixes another phantom memory leak.
      5d2c4295
    • Finn Wilcox's avatar
      Added rl_malloc() function. This is equivalent to malloc() but bypasses · c65a0531
      Finn Wilcox authored
      the wrappers.  Changed dupstr() to use this function instead of malloc()
      so that readline() can safely free these blocks.
      c65a0531
    • Chris Fry's avatar
      · 0261393c
      Chris Fry authored
      Okay, all of the snprintf's have been updated again to remove all of the
      extra null characters added. However, each of them have now been checked to
      make sure the lengths are okay, so that no overruns can occur.
      
      Chris
      0261393c
    • Finn Wilcox's avatar
      Added a wrapper for the "readline" function. · befa880d
      Finn Wilcox authored
      The wrapper functions were complaining when script variables set by
      the INPUT command were destroyed.
      befa880d
    • Denis Walker's avatar
      · 76cc8cfc
      Denis Walker authored
      Corrected spelling of "receive" (was spelt "recieve" eight times)
      76cc8cfc
    • Chris Fry's avatar
      · 50c30d7d
      Chris Fry authored
      Updated the who lists (!who, .who, mw -who) to detect screen width and fill
      the correct width with ---------- characters, rather than always 80. This
      means that screens less than 80 characters wide are easier to read.
      
      Modified the protection level stuff to show "?" instead of "9" if a user
      has too low a protection level to see other peoples values, as this is more
      intuitive to show you dont know what level it is.
      
      Chris
      50c30d7d
  3. Jul 26, 2002
    • Chris Fry's avatar
      · 4ad52332
      Chris Fry authored
      Fixed memory leak in zod/mrod messages if the entire reason was spaces:
        ie, ".zod <user>          "
      
      
      Added command ".linewrap <on|off>" to enable/disable the milliways talker
      linewrapping, since several people prefer it without, as it splits up pastes
      such as web addresses. *LINEWRAPPING ENABLED BY DEFAULT TO KEEP MW THE SAME*
      
      
      Chris
      4ad52332
    • Chris Fry's avatar
      · a3c201f3
      Chris Fry authored
      Fixed a mistake I made in expand.c using snprintf
      
      Chris
      a3c201f3
    • Chris Fry's avatar
      · 3e8ef706
      Chris Fry authored
      Realised that 'snprintf' and 'vsnprintf' dont terminate a string with a \0
      if it reaches the end of the buffer. Had to make quite a few corrections to
      fix this, but scripts seem quite a bit more stable now!
      
      Chris
      3e8ef706
    • Chris Fry's avatar
      · 0f2cccab
      Chris Fry authored
      Found a fault with the STRISTR script command, and fixed it
      
      Chris
      0f2cccab
    • Chris Fry's avatar
      · 8200b823
      Chris Fry authored
      Fixed a problem with -c chatmode, where the "Sulking" message wasnt
      displayed, and where I accidently changed the users chatmodes inside a
      chatmode changing function (doh! :/)
      
      Chris
      8200b823
    • Chris Fry's avatar
      · 6321cd7c
      Chris Fry authored
      Removed 'talkmode' variable, since this is an exact duplicate of querying
      the 'CM_ONCHAT' chatmode flag, and it wasnt consistently updated in a few
      places.
      
      Due to the changes above, fixed a problem where a user though they were
      still on the BBS prompt, but couldnt log onto the talker. This was caused
      when a superuser did a "!user chatmode <user>" and added "+c".
      
      Also fixed a similar issue in scripts, where some scripts could be run
      from the BBS when they shouldnt be!
      
      Added new checkonoff broadcasts "-6" and "4" to show chatmode "-c" and "+c"
      being done to a user. Before, a user just got told "log off" and "log on"
      but it was put forward that these should be different. Easy to change back
      if it is deemed completely unuseful.
      
      Neatened up the 'new user' code where it queries if a user is a member of
      sucs, for autoregistration.
      
      Removed some unused 'extern'd variables at the start of a few C files.
      
      Chris
      6321cd7c
  4. Jul 23, 2002
    • Steve Hill's avatar
      · f61251c0
      Steve Hill authored
      Removed the reference to me that Dez keeps fscking adding in again!
      f61251c0
    • Denis Walker's avatar
      · e1fa78c7
      Denis Walker authored
      Corrected a typo in help for "script"
      e1fa78c7
    • Steve Hill's avatar
      · 69dd9579
      Steve Hill authored
      Removed some dumb comments about me.
      69dd9579
  5. Jul 22, 2002
    • Chris Fry's avatar
      · 4b7d4967
      Chris Fry authored
      Updated the SAFE_FREE macro in bb.h with finnw's suggestion of using
      do/while to avoid errors using the macro
      
      Chris
      4b7d4967
    • Chris Fry's avatar
      · b3bd0faa
      Chris Fry authored
      Problems with tab-completion fixed (".unbind <tab>" and ",<tab>" used the
      same function in different ways causing ".unbind" to break).
      
      Added extra tab completion for ".raw", ".e" and ".emote"
      
      Chris
      b3bd0faa
  6. Jul 21, 2002
    • Chris Fry's avatar
      · 28b79070
      Chris Fry authored
      Fixed another memory leak in the room changing code. I cant find any more
      leaks other than the "apparent leak" caused by using 'strdup' to return
      strings to the readline tab completion functions. Since readline frees this
      memory, the wrappers cant detect it and report a leak.
      
      Okay for a release now I think
      
      Chris
      28b79070
    • Chris Fry's avatar
      · 1ec4c8a9
      Chris Fry authored
      Fixed another couple of memory leaks - one in .restart, and a couple
      in alias.c and rooms.c
      
      Chris
      1ec4c8a9
    • Denis Walker's avatar
      · 838f8669
      Denis Walker authored
      Corrected spelling mistake in script command descriptions.
      838f8669
    • Denis Walker's avatar
      · 76a9e866
      Denis Walker authored
      Added help for isedall and sedall.
      76a9e866
    • Chris Fry's avatar
      · 9028ed89
      Chris Fry authored
      Oops, I really oughtn't to check in Makefile with wrappers enabled
      
      Chris
      9028ed89
    • Chris Fry's avatar
      · 1c13ea1f
      Chris Fry authored
      Found two more memory leaks in tab-completion code (memory from 'FindLinks'
      was never freed)
      
      Chris
      1c13ea1f
    • Chris Fry's avatar
      · c44a6775
      Chris Fry authored
      Fixed a small error that allowed checkonoffs to be intercepted while on the
      BBS and not the talker, resulting in initialisation problems
      
      Chris
      c44a6775
    • Chris Fry's avatar
      · 0f78f144
      Chris Fry authored
      Quiet information now given on board logon messages (checkonoff code 3)
      
      Chris
      0f78f144
  7. Jul 20, 2002
    • Chris Fry's avatar
      · d518eacc
      Chris Fry authored
      Written a second "ExecEvent" function (ExecEvent2) that now takes an array
      of arguments instead of just the one bit of text. The preamble still works
      on argument 1 as normal.
      
      Changed 'CheckOnOff' to use this new event function. There is now an
      optional second argument to checkonoff events, that indicates whether the
      user is logged on silently or not.
      
      NOTE: this will cause any current users to experience a slightly different
            checkonoff argument format - namely "code[,quiet]". eg:
            "1,1" if the user logged on to the talker quietly.
      
      Forgot to mention it in the last checkin, but summons now ignore multiple
      similar arguments. eg ".summon 0 test1 test2 test2 test2" will only summon
      the users "test1" and "test2" once each. Before, it used to repeat all of
      the "test2" users...
      
      Chris
      d518eacc
    • Chris Fry's avatar
      · f0ee32d6
      Chris Fry authored
      Fixed the new random function so that it returns a value (min,max) inclusive,
      rather than (min,max-1).
      
      Chris
      f0ee32d6
  8. Jul 19, 2002
    • Chris Fry's avatar
      · fe291b70
      Chris Fry authored
      Reworded the 'split' script help file since it implied the first argument
      was a variable, or could be a variable, instead of being a value input
      (ie, "hello", or $test etc..)
      
      Chris
      fe291b70
  9. Jul 18, 2002
    • Denis Walker's avatar
      · 9a2ff474
      Denis Walker authored
      Corrected error in file split
      9a2ff474
  10. Jul 15, 2002
    • Chris Fry's avatar
      · c6628a97
      Chris Fry authored
      Okay, thats the last of the current bugs out of the way!
      
      Chris
      c6628a97
    • Chris Fry's avatar
      · ebfd4eb4
      Chris Fry authored
      Moved ".alias" and ".unalias" to "!alias" and "!unalias" since all commands
      are affected by aliases, and not just talker commands.
      
      Fixed a problem with displaying "---more---" in the wrong place in aliases
      in the help (!help etc..)
      
      Chris
      ebfd4eb4
  11. Jul 14, 2002
    • Chris Fry's avatar
      · 8bbeaea8
      Chris Fry authored
      Updated command help (!help) to take priveledges into account on commands.
      The 'wizhelp' directory is now used for more help on the same message.
      
      For example, "emote", and "wiz" would go into the "help" directory since
      these rely on priveledges alone. However, "ls" will probably have an extra
      file also present in the "wizhelp" directory to explain about being able
      to read files you dont have permissions for etc... - there are quite a few
      commands like this!
      
      Chris
      8bbeaea8
    • Chris Fry's avatar
      · 95801d10
      Chris Fry authored
      Updated todo list
      
      Chris
      95801d10
    • Chris Fry's avatar
      · 63a07546
      Chris Fry authored
      Updated the 'special' help to include the 'o' flag (for blocking use
      of 'contact').
      
      Added 'emote' command
      
      Chris
      63a07546
    • Chris Fry's avatar
      · 5d8300bf
      Chris Fry authored
      Updated the really old 'user' help
      
      Chris
      5d8300bf
Loading