diff options
Diffstat (limited to 'plugins/dfnet/cfg.c')
| -rwxr-xr-x[-rw-r--r--] | plugins/dfnet/cfg.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c index 12fc7d6d..921efbe3 100644..100755 --- a/plugins/dfnet/cfg.c +++ b/plugins/dfnet/cfg.c @@ -1,38 +1,38 @@ -//
-// DF Netplay Plugin
-//
-// Based on netSock 0.2 by linuzappz.
-// The Plugin is free source code.
-//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "dfnet.h"
-
-#define CFG_FILENAME "dfnet.cfg"
-
-void SaveConf() {
- FILE *f;
-
- f = fopen(CFG_FILENAME, "w");
- if (f == NULL) return;
- fwrite(&conf, 1, sizeof(conf), f);
- fclose(f);
-}
-
-void LoadConf() {
- FILE *f;
-
- f = fopen(CFG_FILENAME, "r");
- if (f == NULL) {
- conf.PlayerNum = 1;
- conf.PortNum = 33306;
- strcpy(conf.ipAddress, "127.0.0.1");
- return;
- }
-
- fread(&conf, 1, sizeof(conf), f);
- fclose(f);
-}
+// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "dfnet.h" + +#define CFG_FILENAME "dfnet.cfg" + +void SaveConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "w"); + if (f == NULL) return; + fwrite(&conf, 1, sizeof(conf), f); + fclose(f); +} + +void LoadConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "r"); + if (f == NULL) { + conf.PlayerNum = 1; + conf.PortNum = 33306; + strcpy(conf.ipAddress, "127.0.0.1"); + return; + } + + fread(&conf, 1, sizeof(conf), f); + fclose(f); +} |
