1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 09:13:15 +02:00

Epic commit to replace most of the strings in Anope with a single Anope::string class, plus some other little fixes here and there. If you follow 1.9.x development and are testing things, THIS is one of those things that NEEDS testing.

This commit is contained in:
Naram Qashat
2010-07-25 21:58:20 -04:00
parent 15d7f0f6fe
commit ae38212c1c
232 changed files with 7424 additions and 8911 deletions
+4 -4
View File
@@ -172,7 +172,7 @@ void lang_sanitize()
strnrepl(tmp, sizeof(tmp), "%R", "/");
else
strnrepl(tmp, sizeof(tmp), "%R", "/msg ");
newstr = sstrdup(tmp);
newstr = strdup(tmp);
delete [] langtexts[i][j];
langtexts[i][j] = newstr;
}
@@ -303,7 +303,7 @@ int strftime_lang(char *buf, int size, User *u, int format, struct tm *tm)
/* Send a syntax-error message to the user. */
void syntax_error(char *service, User *u, const char *command, int msgnum)
void syntax_error(const Anope::string &service, User *u, const Anope::string &command, int msgnum)
{
const char *str;
@@ -312,7 +312,7 @@ void syntax_error(char *service, User *u, const char *command, int msgnum)
str = getstring(u, msgnum);
notice_lang(service, u, SYNTAX_ERROR, str);
notice_lang(service, u, MORE_INFO, service, command);
notice_lang(service, u, MORE_INFO, service.c_str(), command.c_str());
}
const char *getstring(NickAlias *na, int index)
@@ -327,7 +327,7 @@ const char *getstring(NickAlias *na, int index)
return langtexts[langidx][index];
}
const char *getstring(NickCore *nc, int index)
const char *getstring(const NickCore *nc, int index)
{
// Default to config
int langidx = Config.NSDefLanguage;