diff options
author | Adam <Adam@anope.org> | 2012-11-26 22:57:51 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-26 23:09:26 -0500 |
commit | 8a6962fc363410928dc8d7c197fd3fbf3e315597 (patch) | |
tree | 7eac6e127be5e4b691e96a1053f114870cc449aa /modules/protocol/unreal.cpp | |
parent | f23bad140b3abf3350c552c27c4e1d995337ce79 (diff) |
Keep track on what ircds we can svsjoin, add an svspart method
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r-- | modules/protocol/unreal.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 8f3f3f810..08fe8d237 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -20,6 +20,7 @@ class UnrealIRCdProto : public IRCDProto { DefaultPseudoclientModes = "+Soiq"; CanSVSNick = true; + CanSVSJoin = true; CanSetVHost = true; CanSetVIdent = true; CanSNLine = true; @@ -202,12 +203,6 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message(source) << "SVSO " << nick << " " << flag; } - /* NICK <newnick> */ - void SendChangeBotNick(const BotInfo *oldnick, const Anope::string &newnick) anope_override - { - UplinkSocket::Message(oldnick) << "NICK " << newnick << " " << Anope::CurTime; - } - /* Functions that use serval cmd functions */ void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override @@ -300,12 +295,20 @@ class UnrealIRCdProto : public IRCDProto /* In older Unreal SVSJOIN and SVSNLINE tokens were mixed so SVSJOIN and SVSNLINE are broken when coming from a none TOKEN'd server */ - void SendSVSJoin(const BotInfo *source, const Anope::string &nick, const Anope::string &chan, const Anope::string ¶m) anope_override + void SendSVSJoin(const BotInfo *source, const User *user, const Anope::string &chan, const Anope::string ¶m) anope_override + { + if (!param.empty()) + UplinkSocket::Message(source) << "SVSJOIN " << user->GetUID() << " " << chan << " :" << param; + else + UplinkSocket::Message(source) << "SVSJOIN " << user->GetUID() << " " << chan; + } + + void SendSVSPart(const BotInfo *source, const User *user, const Anope::string &chan, const Anope::string ¶m) anope_override { if (!param.empty()) - UplinkSocket::Message(source) << "SVSJOIN " << nick << " " << chan << " :" << param; + UplinkSocket::Message(source) << "SVSPART " << user->GetUID() << " " << chan << " :" << param; else - UplinkSocket::Message(source) << "SVSJOIN " << nick << " :" << chan; + UplinkSocket::Message(source) << "SVSPART " << user->GetUID() << " " << chan; } void SendSWhois(const BotInfo *source, const Anope::string &who, const Anope::string &mask) anope_override |