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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user