diff options
| author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
| commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
| tree | e145e04fa3d041cf92ce46da4ac790b63231059c /modules/protocol/inspircd11.cpp | |
| parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) | |
Reworked live SQL support yet again
Diffstat (limited to 'modules/protocol/inspircd11.cpp')
| -rw-r--r-- | modules/protocol/inspircd11.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 615a733bd..21fb0cd27 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -13,6 +13,11 @@ #include "module.h" +struct ExtensibleString : Anope::string, ExtensibleItem +{ + ExtensibleString(const Anope::string &s) : Anope::string(s) { } +}; + IRCDVar myIrcd = { "InspIRCd 1.1", /* ircd name */ "+I", /* Modes used by pseudoclients */ @@ -48,7 +53,7 @@ static bool has_hidechansmod = false; /* CHGHOST */ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost) { - BotInfo *bi = findbot(Config->OperServ); + const BotInfo *bi = findbot(Config->OperServ); if (has_chghostmod) { if (nick.empty() || vhost.empty()) @@ -64,7 +69,7 @@ void inspircd_cmd_chghost(const Anope::string &nick, const Anope::string &vhost) bool event_idle(const Anope::string &source, const std::vector<Anope::string> ¶ms) { - BotInfo *bi = findbot(params[0]); + const BotInfo *bi = findbot(params[0]); UplinkSocket::Message(bi) << "IDLE " << source << " " << start_time << " " << (bi ? Anope::CurTime - bi->lastmsg : 0); return true; } @@ -128,7 +133,7 @@ class InspIRCdProto : public IRCDProto return; } - XLine *old = x; + const XLine *old = x; if (old->manager->HasEntry("*@" + u->host)) return; @@ -210,7 +215,7 @@ class InspIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override + void SendJoin(const User *user, Channel *c, const ChannelStatus *status) anope_override { UplinkSocket::Message(user) << "JOIN " << c->name << " " << c->creation_time; if (status) @@ -224,7 +229,7 @@ class InspIRCdProto : public IRCDProto if (uc != NULL) uc->Status->ClearFlags(); - BotInfo *setter = findbot(user->nick); + const BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); @@ -386,7 +391,8 @@ class InspircdIRCdMessage : public IRCdMessage Anope::string *svidbuf = na ? na->nc->GetExt<ExtensibleString *>("authenticationtoken") : NULL; if (na && svidbuf && *svidbuf == params[0]) { - user->Login(na->nc); + NickCore *nc = na->nc; + user->Login(nc); if (!Config->NoNicknameOwnership && na->nc->HasFlag(NI_UNCONFIRMED) == false) user->SetMode(findbot(Config->NickServ), UMODE_REGISTERED); } |
