diff options
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r-- | modules/protocol/ratbox.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 247b8777a..2b971b23f 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -37,7 +37,7 @@ class RatboxProto : public IRCDProto void SendAkill(User *u, XLine *x) anope_override { hybrid->SendAkill(u, x); } void SendAkillDel(const XLine *x) anope_override { hybrid->SendAkillDel(x); } void SendSQLineDel(const XLine *x) anope_override { hybrid->SendSQLineDel(x); } - void SendJoin(const User *user, Channel *c, const ChannelStatus *status) anope_override { hybrid->SendJoin(user, c, status); } + void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { hybrid->SendJoin(user, c, status); } void SendServer(const Server *server) anope_override { hybrid->SendServer(server); } void SendModeInternal(const BotInfo *bi, const User *u, const Anope::string &buf) anope_override { hybrid->SendModeInternal(bi, u, buf); } void SendChannel(Channel *c) anope_override { hybrid->SendChannel(c); } @@ -45,7 +45,7 @@ class RatboxProto : 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(); /* QS - Can handle quit storm removal EX - Can do channel +e exemptions @@ -107,7 +107,7 @@ struct IRCDMessageEncap : IRCDMessage u->Login(nc); const NickAlias *user_na = NickAlias::Find(u->nick); - 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"); } } @@ -134,7 +134,7 @@ struct IRCDMessageServer : IRCDMessage if (params[1] != "1") return; new Server(source.GetServer() == NULL ? Me : source.GetServer(), params[0], 1, params[2], UplinkSID); - IRCD->SendPing(Config->ServerName, params[0]); + IRCD->SendPing(Me->GetName(), params[0]); } }; @@ -185,6 +185,7 @@ class ProtoRatbox : 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; @@ -216,6 +217,7 @@ class ProtoRatbox : public Module /* user modes */ ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("HIDEOPER")); ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("REGPRIV")); + ModeManager::AddUserMode(new UserMode("PROTECTED", 'S')); /* v/h/o/a/q */ ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("HALFOP")); @@ -228,12 +230,12 @@ class ProtoRatbox : public Module } public: - ProtoRatbox(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL), + ProtoRatbox(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_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), + 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), message_bmask("IRCDMessage", "ratbox/bmask", "hybrid/bmask"), message_join("IRCDMessage", "ratbox/join", "hybrid/join"), message_nick("IRCDMessage", "ratbox/nick", "hybrid/nick"), message_pong("IRCDMessage", "ratbox/pong", "hybrid/pong"), @@ -242,7 +244,6 @@ class ProtoRatbox : public Module message_encap(this), message_pass(this), message_server(this), message_tburst(this), message_uid(this) { - this->SetAuthor("Anope"); if (ModuleManager::LoadModule("hybrid", User::Find(creator)) != MOD_ERR_OK) throw ModuleException("Unable to load hybrid"); |