1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 20:26:38 +02:00

Moved the language strings which are only used once

out of the core and into the modules that use them.
This commit is contained in:
Adam
2011-02-04 15:30:31 -05:00
parent c362a1e077
commit 08583dc107
226 changed files with 42289 additions and 45412 deletions
+1 -29
View File
@@ -247,34 +247,6 @@ void User::SendMessage(BotInfo *source, const Anope::string &msg)
ircdproto->SendNotice(source, this->nick, "%s", msg.c_str());
}
void User::SendMessage(BotInfo *source, LanguageString message, ...)
{
if (!source)
{
Log(LOG_DEBUG) << "Tried to send message " << message << " with nonexistant source!";
return;
}
Anope::string m = GetString(this, message);
m = m.replace_all_cs("%S", source->nick);
if (m.length() >= 4096)
Log() << "Warning, language string " << message << " is longer than 4096 bytes";
va_list args;
char buf[4096];
va_start(args, message);
vsnprintf(buf, sizeof(buf) - 1, m.c_str(), args);
va_end(args);
sepstream sep(buf, '\n');
Anope::string line;
while (sep.GetToken(line))
this->SendMessage(source, line.empty() ? " " : line);
}
/** Collides a nick.
*
* First, it marks the nick (if the user is on a registered nick, we don't use it without but it could be)
@@ -345,7 +317,7 @@ void User::Collide(NickAlias *na)
guestnick = Config->NSGuestNickPrefix + stringify(getrandom16());
} while (finduser(guestnick));
this->SendMessage(NickServ, FORCENICKCHANGE_CHANGING, guestnick.c_str());
this->SendMessage(NickServ, _("Your nickname is now being changed to \002%s\002"), guestnick.c_str());
ircdproto->SendForceNickChange(this, guestnick, Anope::CurTime);
}
else