diff options
Diffstat (limited to 'modules/protocol/plexus.cpp')
-rw-r--r-- | modules/protocol/plexus.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index d117389e7..484f6a4bc 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -45,10 +45,10 @@ class PlexusProto : public IRCDProto void SendAkill(User *u, XLine *x) anope_override { hybrid->SendAkill(u, x); } void SendServer(const Server *server) anope_override { hybrid->SendServer(server); } void SendChannel(Channel *c) anope_override { hybrid->SendChannel(c); } - void SendSVSHold(const Anope::string &nick) anope_override { hybrid->SendSVSHold(nick); } + void SendSVSHold(const Anope::string &nick, time_t t) anope_override { hybrid->SendSVSHold(nick, t); } void SendSVSHoldDel(const Anope::string &nick) anope_override { hybrid->SendSVSHoldDel(nick); } - void SendJoin(const User *user, Channel *c, const ChannelStatus *status) anope_override + void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { UplinkSocket::Message(Me) << "SJOIN " << c->creation_time << " " << c->name << " +" << c->GetModes(true, true) << " :" << user->GetUID(); if (status) @@ -60,12 +60,11 @@ class PlexusProto : public IRCDProto */ ChanUserContainer *uc = c->FindUser(user); if (uc != NULL) - uc->status.modes.clear(); + uc->status.Clear(); BotInfo *setter = BotInfo::Find(user->nick); - for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (cs.modes.count(ModeManager::ChannelModes[i]->name)) - c->SetMode(setter, ModeManager::ChannelModes[i], user->GetUID(), false); + for (size_t i = 0; i < cs.Modes().length(); ++i) + c->SetMode(setter, ModeManager::FindChannelModeByChar(cs.Modes()[i]), user->GetUID(), false); } } @@ -91,7 +90,7 @@ class PlexusProto : public IRCDProto void SendConnect() anope_override { - UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink]->password << " TS 6 :" << Me->GetSID(); + UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " TS 6 :" << Me->GetSID(); /* CAPAB * QS - Can handle quit storm removal * EX - Can do channel +e exemptions @@ -187,7 +186,7 @@ struct IRCDMessageEncap : IRCDMessage if (u && nc) { u->Login(nc); - if (!Config->NoNicknameOwnership && user_na && user_na->nc == nc && user_na->nc->HasExt("UNCONFIRMED") == false) + if (!Config->GetBlock("options")->Get<bool>("nonicknameownership") && user_na && user_na->nc == nc && user_na->nc->HasExt("UNCONFIRMED") == false) u->SetMode(NickServ, "REGISTERED"); } } @@ -299,6 +298,7 @@ class ProtoPlexus : public Module Message::Away message_away; Message::Capab message_capab; Message::Error message_error; + Message::Invite message_invite; Message::Kick message_kick; Message::Kill message_kill; Message::Mode message_mode; @@ -354,9 +354,9 @@ class ProtoPlexus : public Module } public: - ProtoPlexus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoPlexus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR), ircd_proto(this), - message_away(this), message_capab(this), message_error(this), message_kick(this), message_kill(this), + message_away(this), message_capab(this), message_error(this), message_invite(this), message_kick(this), message_kill(this), message_mode(this), message_motd(this), message_part(this), message_ping(this), message_privmsg(this), message_quit(this), message_squit(this), message_stats(this), message_time(this), message_topic(this), message_version(this), message_whois(this), @@ -368,7 +368,6 @@ class ProtoPlexus : public Module message_encap(this), message_pass(this), message_server(this), message_uid(this) { - this->SetAuthor("Anope"); if (ModuleManager::LoadModule("hybrid", User::Find(creator)) != MOD_ERR_OK) throw ModuleException("Unable to load hybrid"); |