Loading ...
Sorry, an error occurred while loading the content.

Re: Bug (?) in MM 1.13.0

Expand Messages
  • Will Day
    ... Indeed, sometimes LOAD_FILE_FOR_ME is a bit _too_ helpful at trying to load a file. That particular routine is used for this kind of thing partially
    Message 1 of 4 , Sep 2, 2002
    View Source
    • 0 Attachment
      A short time ago, at a computer terminal far, far away, Florian Zschocke wrote:
      >What happens now is the following. Metamod tries to locate its
      >.ini file, starting with addons/metamod/plugins.ini. The
      >LOAD_FILE_FOR_ME() function will search in the game directory
      >(cstrike) first, but cannot find it there. Instead of returning
      >with a failure and MM switching to cstrike/metamod.ini,
      >LOAD_FILE_FOR_ME() will continue its search in the valve
      >directory. There it will find the file addons/metamod/plugins.ini
      >which will then get loaded by MM.

      Indeed, sometimes LOAD_FILE_FOR_ME is a bit _too_ helpful at trying to load
      a file.

      That particular routine is used for this kind of thing partially because it
      was what AdminMod was using, and also because it's platform independent.
      Windows doesn't provide the usual stat() call, as far as I can remember.

      How does Adminmod handle the same problem? If it's still using
      LOAD_FILE_FOR_ME as well, it could also end up loading the wrong file in
      some circumstances. For that matter, any addon that looks for files could
      be in a similar boat.

      >To prevent confusion, Metamod should either not use the
      >LOAD_FILE_FOR_ME() function or should use it with a full path so
      >that it doesn't go looking in the valve directory when it cannot
      >locate a file in the $MOD directory.

      I don't believe LOAD_FILE_FOR_ME accepts full pathnames; I'm pretty sure it
      just appends them to the GET_GAME_DIR() path.

      --
      Will Day Those who would give up essential Liberty, to
      willday@... purchase a little temporary Safety, deserve neither
      UNIX System Programmer Liberty nor Safety.
      Atlanta, GA - Benjamin Franklin, Penn. Assembly, Nov. 11, 1755
    • Florian Zschocke
      ... Correct. I would guess a simple attempt to open() the file would come close. ... Yup, Admin Mod suffers from the same problem. For Admin Mod it is a
      Message 2 of 4 , Sep 2, 2002
      View Source
      • 0 Attachment
        Will Day wrote:
        >
        > That particular routine is used for this kind of thing partially because it
        > was what AdminMod was using, and also because it's platform independent.
        > Windows doesn't provide the usual stat() call, as far as I can remember.

        Correct. I would guess a simple attempt to open() the file would
        come close.

        > How does Adminmod handle the same problem? If it's still using
        > LOAD_FILE_FOR_ME as well, it could also end up loading the wrong file in
        > some circumstances.

        Yup, Admin Mod suffers from the same problem. For Admin Mod it is
        a problem of misconfiguration, i.e. the users has to make sure
        that the path to the correct file is set correctly in the
        adminmod.cfg file. It does not assume default files pathes. But if
        the adminmod.cfg file entry is not configured correctly, Admin Mod
        could end up loading files from the valve folder, too.

        > I don't believe LOAD_FILE_FOR_ME accepts full pathnames; I'm pretty sure it
        > just appends them to the GET_GAME_DIR() path.

        Let me check.... You're right. A full pathname seems not to work.

        Florian.
      • Network
        Thx Will for ur fast help .. im running a pretty fast Metamod ... greetz Commander
        Message 3 of 4 , Sep 2, 2002
        View Source
        • 0 Attachment
          Thx Will for ur fast help ..
          im running a pretty fast Metamod ...

          greetz

          Commander
        Your message has been successfully submitted and would be delivered to recipients shortly.