diff options
author | Adam <Adam@anope.org> | 2014-01-28 14:44:07 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-01-28 14:45:21 -0500 |
commit | bacb276181c008069468ebe6b7368b3a8ba7f90b (patch) | |
tree | a5e85bbb3d1d2da9bf919b56ee28bc952e17fe41 /modules | |
parent | 4c1f6b48d8ee55a10ffef794c0ee153351a7936e (diff) |
Use TBURST on hybrid to set topics
Diffstat (limited to 'modules')
-rw-r--r-- | modules/protocol/hybrid.cpp | 16 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 20 |
2 files changed, 20 insertions, 16 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 708e66849..965624264 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -233,21 +233,7 @@ class HybridProto : public IRCDProto 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); + UplinkSocket::Message(source) << "TBURST " << c->creation_time << " " << c->name << " " << c->topic_ts << " " << c->topic_setter << " :" << c->topic; } void SendForceNickChange(User *u, const Anope::string &newnick, time_t when) anope_override diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 0cb8a6df2..3c3079ae2 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -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 |