summaryrefslogtreecommitdiff
path: root/src/language.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-07-25 21:58:20 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-07-25 21:58:20 -0400
commitae38212c1ce829c783edf971081c90137abb49a0 (patch)
tree5c652d9cdc38103dec6fa112d57fca882b4e3e44 /src/language.cpp
parent15d7f0f6fe8bb903275f603f734c13f65f3aa906 (diff)
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.
Diffstat (limited to 'src/language.cpp')
-rw-r--r--src/language.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/language.cpp b/src/language.cpp
index 473df39e8..558363f17 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -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;