1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 02:23:12 +02:00

Use TBURST on hybrid to set topics

This commit is contained in:
Adam
2014-01-28 14:44:07 -05:00
parent 4c1f6b48d8
commit bacb276181
2 changed files with 20 additions and 16 deletions
+19 -1
View File
@@ -41,7 +41,6 @@ class RatboxProto : public IRCDProto
void SendServer(const Server *server) anope_override { hybrid->SendServer(server); }
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) anope_override { hybrid->SendModeInternal(source, u, buf); }
void SendChannel(Channel *c) anope_override { hybrid->SendChannel(c); }
void SendTopic(const MessageSource &source, Channel *c) anope_override { hybrid->SendTopic(source, c); }
bool IsIdentValid(const Anope::string &ident) anope_override { return hybrid->IsIdentValid(ident); }
void SendGlobopsInternal(const MessageSource &source, const Anope::string &buf) anope_override
@@ -94,6 +93,25 @@ class RatboxProto : public IRCDProto
{
UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID();
}
void SendTopic(const MessageSource &source, Channel *c) anope_override
{
BotInfo *bi = source.GetBot();
bool needjoin = c->FindUser(bi) == NULL;
if (needjoin)
{
ChannelStatus status;
status.AddMode('o');
bi->Join(c, &status);
}
IRCDProto::SendTopic(source, c);
if (needjoin)
bi->Part(c);
}
};
struct IRCDMessageEncap : IRCDMessage