-/* lang.c - NeonServ v5.3
+/* lang.c - NeonServ v5.6
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
#include "UserNode.h"
#include "DBHelper.h"
#include "mysqlConn.h"
+#include "tools.h"
#define DEFAULT_LANG_TAG "EN"
#define DEFAULT_LANG_NAME "English"
return;
}
lang_entry->ident = strdup(ident);
- }
+ lang_entry->next = lang->entrys[cindex];
+ lang->entrys[cindex] = lang_entry;
+ } else
+ free(lang_entry->text); //free old text (new one will be set below)
//replace all:
//$b to \002
//$k to \003
}
} while(a);
lang_entry->text = strdup(tmp);
- lang_entry->next = lang->entrys[cindex];
- lang->entrys[cindex] = lang_entry;
}
char *get_language_string(struct UserNode *user, const char* msg_ident) {