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

Made os_news send news notices from NickServ if global is disabled

This commit is contained in:
Adam
2010-10-02 16:43:24 -04:00
parent 3499edc427
commit 0d684191e9
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ static void DisplayNews(User *u, NewsType Type)
if (Type == NEWS_RANDOM && i == current_news)
continue;
u->SendMessage(Global, msg, do_strftime(News[i]->time).c_str(), News[i]->Text.c_str());
u->SendMessage(Global ? Global : NickServ, msg, do_strftime(News[i]->time).c_str(), News[i]->Text.c_str());
++displayed;
+6
View File
@@ -245,6 +245,12 @@ void User::SendMessage(const Anope::string &source, const Anope::string &msg) co
void User::SendMessage(BotInfo *source, LanguageString message, ...) const
{
if (!source)
{
Log(LOG_DEBUG) << "Tried to send message " << message << " with nonexistant source!";
return;
}
Anope::string m = GetString(this, message);
if (Config->UseStrictPrivMsg)