Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001484Zandronum[All Projects] Suggestionpublic2013-09-04 16:342015-09-05 02:06
ReporterMonsterovich 
Assigned To 
PriorityhighSeverityminorReproducibilityalways
StatusclosedResolutiondenied 
PlatformOSOS Version
Product Version1.1.1 
Target VersionFixed in Version 
Summary0001484: loadini feature
DescriptionThis feature is most useful on sectorcraft servers, loadini has been created since zandro 1.0. It works successfuly on ZDoom, but zan code is not completed fully, because zan is based on old ZDoom revision, so it works nicely in zan too.

It uses full pathes. If you have to add it, please do not remove them.

To test:
loadini map-something.ini
Steps To Reproduce**configfile.cpp** line 603

//====================================================================
//
// FConfigFile :: LoadNewConfigFile
//
//====================================================================

/* Created special for loadini */
bool FConfigFile::LoadNewConfigFile (void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata), void *userdata)
{
    FILE *file = fopen (PathName, "r");
    bool succ;

    if (file == NULL)
    {
        return false;
    }

    succ = ReadConfig (file);
    fclose (file);

    if (!succ)
    { // First valid line did not define a section
        if (nosechandler != NULL)
        {
            nosechandler (PathName, this, userdata);
        }
        return false;
    } else return true;
}

**configfile.h** line 73

bool LoadNewConfigFile (void (*nosechandler)(const char *pathname, FConfigFile *config, void *userdata), void *userdata);

**gameconfigfile.cpp** line 771

bool FGameConfigFile::LoadConfig(FString pathname)
{
    bool result;

    ChangePathName (pathname);
    bMigrating = false;
    result = LoadNewConfigFile (MigrateStub, NULL);
    return result;
}

CCMD (loadini)
{
    const char *pathname = (argv.argc() == 1) ? NULL : argv[1];

    if(GameConfig->LoadConfig(pathname))
    {
    GameConfig->DoGlobalSetup ();
    GameConfig->DoGameSetup ("Doom"); // WARNING! I didn't find how to get gamename in zan. Change it!
    Printf("Config loaded.\n");
    } else
    {
    Printf("Config loading failed.\n");
    }
}

**gameconfigfile.h** line 56

bool LoadConfig(FString pathname);
Attached Files

- Relationships

-  Notes
User avatar (0007133)
Dusk (developer)
2013-09-07 18:07

And what exactly is the point of this?
User avatar (0007134)
Monsterovich (reporter)
2013-09-07 18:13

'http://submarine.strangled.net/scmaps [^]'

Good example.
User avatar (0007138)
ZzZombo (reporter)
2013-09-08 04:41

Just another way of messing w/ user preferences for malicious mods.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: someoneelse Monsterovich
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2013-09-04 16:34 Monsterovich New Issue
2013-09-07 16:35 Monsterovich Note Added: 0007132
2013-09-07 17:18 Dusk Note Deleted: 0007132
2013-09-07 18:07 Dusk Note Added: 0007133
2013-09-07 18:13 Monsterovich Note Added: 0007134
2013-09-08 04:41 ZzZombo Note Added: 0007138
2015-09-05 02:06 Dusk Status new => closed
2015-09-05 02:06 Dusk Resolution open => denied






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker