summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-06-14 18:23:53 -0400
committerAdam <Adam@anope.org>2011-06-14 18:23:53 -0400
commitdf971befb2ec95d69b7bb5bce49f4105ee916c2a (patch)
tree35b2a04ca610af184f01f0d1e250d3ff4bdf9a43
parent1cd65878dbdae1d64f70522c3586897a9a7adc36 (diff)
Fixed a few small things
-rw-r--r--include/services.h2
-rw-r--r--include/timers.h1
-rw-r--r--src/bots.cpp5
-rw-r--r--src/language.cpp2
-rw-r--r--src/misc.cpp2
-rw-r--r--src/nickserv.cpp2
-rw-r--r--src/timers.cpp4
7 files changed, 10 insertions, 8 deletions
diff --git a/include/services.h b/include/services.h
index f16c87791..8aea5b019 100644
--- a/include/services.h
+++ b/include/services.h
@@ -49,7 +49,7 @@
#else
# define _(x) x
#endif
-# define gtl(x) x
+#define gtl(x) x
#ifndef _WIN32
# include <unistd.h>
diff --git a/include/timers.h b/include/timers.h
index 28d5a9a10..4a7defebe 100644
--- a/include/timers.h
+++ b/include/timers.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;
diff --git a/src/bots.cpp b/src/bots.cpp
index 51be95db9..f48a90228 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -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);
diff --git a/src/language.cpp b/src/language.cpp
index 4f235ac9a..59df4c7dc 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -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)
diff --git a/src/misc.cpp b/src/misc.cpp
index 897335b00..6b88a5846 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -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
diff --git a/src/nickserv.cpp b/src/nickserv.cpp
index 943b0715b..9825c3ecc 100644
--- a/src/nickserv.cpp
+++ b/src/nickserv.cpp
@@ -67,7 +67,7 @@ NickServRelease::~NickServRelease()
{
NickServReleases.erase(this->nick);
- ircdproto->SendQuit(this, NULL);
+ ircdproto->SendQuit(this, "");
}
void NickServRelease::Tick(time_t)
diff --git a/src/timers.cpp b/src/timers.cpp
index a8cef007b..3441d1721 100644
--- a/src/timers.cpp
+++ b/src/timers.cpp
@@ -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