mirror of
https://github.com/anope/anope.git
synced 2026-06-26 21:16:39 +02:00
Fixed a few small things
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@
|
||||
#else
|
||||
# define _(x) x
|
||||
#endif
|
||||
# define gtl(x) x
|
||||
#define gtl(x) x
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h>
|
||||
|
||||
@@ -90,7 +90,6 @@ class CoreExport Timer : public Extensible
|
||||
*/
|
||||
class CoreExport TimerManager : public Extensible
|
||||
{
|
||||
friend class Timer;
|
||||
/** A list of timers
|
||||
*/
|
||||
static std::vector<Timer *> Timers;
|
||||
|
||||
+3
-2
@@ -66,7 +66,7 @@ BotInfo::~BotInfo()
|
||||
// If we're synchronised with the uplink already, send the bot.
|
||||
if (Me && Me->IsSynced())
|
||||
{
|
||||
ircdproto->SendQuit(this, NULL);
|
||||
ircdproto->SendQuit(this, "");
|
||||
XLine x(this->nick);
|
||||
ircdproto->SendSQLineDel(&x);
|
||||
}
|
||||
@@ -79,9 +79,10 @@ BotInfo::~BotInfo()
|
||||
ci->bi = NULL;
|
||||
}
|
||||
|
||||
for (CommandMap::const_iterator it = this->Commands.begin(), it_end = this->Commands.end(); it != it_end; ++it)
|
||||
for (CommandMap::const_iterator it = this->Commands.begin(), it_end = this->Commands.end(); it != it_end;)
|
||||
{
|
||||
Command *c = it->second;
|
||||
++it;
|
||||
|
||||
if (c->module)
|
||||
c->module->DelCommand(this, c);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ void InitLanguages()
|
||||
|
||||
const Anope::string GetString(NickCore *nc, const char *string)
|
||||
{
|
||||
return GetString("anope", nc ? Config->NSDefLanguage : "", string);
|
||||
return GetString("anope", nc ? nc->language : Config->NSDefLanguage, string);
|
||||
}
|
||||
|
||||
const Anope::string GetString(const Anope::string &domain, const Anope::string &lang, const char *string)
|
||||
|
||||
+1
-1
@@ -261,7 +261,7 @@ Anope::string do_strftime(const time_t &t, NickCore *nc, bool short_output)
|
||||
Anope::string expire_left(NickCore *nc, time_t expires)
|
||||
{
|
||||
if (!expires)
|
||||
return GetString(nc, gtl(NO_EXPIRE));
|
||||
return GetString(nc, NO_EXPIRE);
|
||||
else if (expires <= Anope::CurTime)
|
||||
return GetString(nc, gtl("expires at next database update"));
|
||||
else
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ NickServRelease::~NickServRelease()
|
||||
{
|
||||
NickServReleases.erase(this->nick);
|
||||
|
||||
ircdproto->SendQuit(this, NULL);
|
||||
ircdproto->SendQuit(this, "");
|
||||
}
|
||||
|
||||
void NickServRelease::Tick(time_t)
|
||||
|
||||
+3
-1
@@ -73,7 +73,9 @@ void Timer::SetSecs(time_t t)
|
||||
{
|
||||
secs = t;
|
||||
trigger = Anope::CurTime + t;
|
||||
sort(TimerManager::Timers.begin(), TimerManager::Timers.end(), TimerManager::TimerComparison);
|
||||
|
||||
TimerManager::DelTimer(this);
|
||||
TimerManager::AddTimer(this);
|
||||
}
|
||||
|
||||
/** Returns the interval between ticks
|
||||
|
||||
Reference in New Issue
Block a user