diff options
author | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-20 22:27:11 +0000 |
---|---|---|
committer | DukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-03-20 22:27:11 +0000 |
commit | 3e77eaa21813f5b668f819722e68e2d7c6c800eb (patch) | |
tree | dbd0a44111e0149022fced9741a54a45aa9dbd72 /src | |
parent | 28ccf79adf3ea27d6f37abb2abadf65224794889 (diff) |
fixed sending CHGIDENT without parameter
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2825 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/hostserv.c | 2 | ||||
-rw-r--r-- | src/protocol/inspircd11.c | 8 | ||||
-rw-r--r-- | src/protocol/inspircd12.cpp | 9 | ||||
-rw-r--r-- | src/protocol/unreal32.c | 8 |
4 files changed, 16 insertions, 11 deletions
diff --git a/src/hostserv.c b/src/hostserv.c index 9d0d89125..cf8a6b146 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -198,7 +198,7 @@ void do_on_id(User *u) if (!na || !na->hostinfo.HasVhost()) return; - ircdproto->SendVhost(u, na->hostinfo.GetIdent().c_str(), na->hostinfo.GetHost().c_str()); + ircdproto->SendVhost(u, na->hostinfo.GetIdent(), na->hostinfo.GetHost()); if (ircd->vhost) { if (u->vhost) diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index cd20c4179..1357f1e46 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -240,10 +240,12 @@ class InspIRCdProto : public IRCDProto /* Functions that use serval cmd functions */ - void SendVhost(User *u, const char *vIdent, const char *vhost) + void SendVhost(User *u, const std::string &vIdent, const std::string &vhost) { - if (vIdent) inspircd_cmd_chgident(u->nick.c_str(), vIdent); - inspircd_cmd_chghost(u->nick.c_str(), vhost); + if (!vIdent.empty()) + inspircd_cmd_chgident(u->nick.c_str(), vIdent.c_str()); + if (!vhost.empty()) + inspircd_cmd_chghost(u->nick.c_str(), vhost.c_str()); } void SendConnect() diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index e3db3a1c2..9252c17e7 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -244,11 +244,12 @@ class InspIRCdProto : public IRCDProto /* Functions that use serval cmd functions */ - void SendVhost(User *u, const char *vIdent, const char *vhost) + void SendVhost(User *u, const std::string &vIdent, const std::string &vhost) { - if (vIdent) - inspircd_cmd_chgident(u->nick.c_str(), vIdent); - inspircd_cmd_chghost(u->nick.c_str(), vhost); + if (!vIdent.empty()) + inspircd_cmd_chgident(u->nick.c_str(), vIdent.c_str()); + if (!vhost.empty()) + inspircd_cmd_chghost(u->nick.c_str(), vhost.c_str()); } void SendConnect() diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 1e22c109f..1ecd12860 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -279,10 +279,12 @@ class UnrealIRCdProto : public IRCDProto /* Functions that use serval cmd functions */ - void SendVhost(User *u, const char *vIdent, const char *vhost) + void SendVhost(User *u, const std::string &vIdent, const std::string &vhost) { - if (vIdent) unreal_cmd_chgident(u->nick.c_str(), vIdent); - unreal_cmd_chghost(u->nick.c_str(), vhost); + if (!vIdent.empty()) + unreal_cmd_chgident(u->nick.c_str(), vIdent.c_str()); + if (!vhost.empty()) + unreal_cmd_chghost(u->nick.c_str(), vhost.c_str()); } void SendConnect() |