aboutsummaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-02-22 14:52:31 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-02-22 14:52:31 +0100
commit02c89fceeb915e31b36dd4acb4218ccd913b2ce8 (patch)
tree005c263cbbe49f299d02b5dd8ccdf7d0157ad19e /gst
parentd1dc6ddc035193ab6e2570f58b7e3a79fc335bce (diff)
rename ingame template and army
Diffstat (limited to 'gst')
-rw-r--r--gst/info.c11
-rw-r--r--gst/info.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/gst/info.c b/gst/info.c
index 15c7c0b..2328df3 100644
--- a/gst/info.c
+++ b/gst/info.c
@@ -941,3 +941,14 @@ int info_army_get_list (char l[][32]) {
}
return len;
}
+
+void info_army_rename (char oldn[], char newn[]) {
+ char pathnameold[64]; sprintf(pathnameold, "army/%s.txt", oldn);
+ char pathnamenew[64]; sprintf(pathnamenew, "army/%s.txt", newn);
+ rename(pathnameold, pathnamenew);
+}
+
+void info_army_remove (char name[]) {
+ char pathname[64]; sprintf(pathname, "army/%s.txt", name);
+ remove(pathname);
+}
diff --git a/gst/info.h b/gst/info.h
index 9219f8b..2fe0973 100644
--- a/gst/info.h
+++ b/gst/info.h
@@ -128,6 +128,8 @@ void info_load_army(struct army_ *ar, char *filename);
void info_save_army(struct army_ *ar, char *filename);
int info_army_get_list(char l[][32]);
+void info_army_rename (char oldn[], char newn[]);
+void info_army_remove (char name[]);
void info_load_playername(char n[]);
void info_save_playername(char n[]);