summaryrefslogtreecommitdiff
path: root/src/protocol/unreal32.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-02 04:55:43 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-02 04:55:43 +0000
commit3617d7978899f830d952d9bac70ed14bb0cc0fd6 (patch)
treefa5fe5d8f8f3bd87f649e2467f60e1d87ba2a71c /src/protocol/unreal32.c
parent657e1deb590eaba38ea3e9a9fb353dc0e23c1a41 (diff)
Convert 'const char *' and 'char *' function arguments to 'const std::string &' instead, done in actions.c along with chain reactions in other files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2723 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/unreal32.c')
-rw-r--r--src/protocol/unreal32.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 085107e5c..7e8d0985b 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -290,10 +290,11 @@ class UnrealIRCdProto : public IRCDProto
** - Unreal will translate this to TKL for us
**
*/
- void SendSQLine(const char *mask, const char *reason)
+ void SendSQLine(const std::string &mask, const std::string &reason)
{
- if (!mask || !reason) return;
- send_cmd(NULL, "c %s :%s", mask, reason);
+ if (mask.empty() || reason.empty())
+ return;
+ send_cmd(NULL, "c %s :%s", mask.c_str(), reason.c_str());
}
/*
@@ -381,9 +382,9 @@ class UnrealIRCdProto : public IRCDProto
}
/* SVSMODE -b */
- void SendBanDel(Channel *c, const char *nick)
+ void SendBanDel(Channel *c, const std::string &nick)
{
- SendSVSModeChan(c, "-b", nick);
+ SendSVSModeChan(c, "-b", nick.empty() ? NULL : nick.c_str());
}
@@ -958,7 +959,7 @@ int anope_event_userhost(const char *source, int ac, const char **av)
std::string host = std::string(std::find(reply.begin(), reply.end(), '@'), reply.end());
host.erase(host.begin());
- User *u = finduser(user.c_str());
+ User *u = finduser(user);
if (u)
{
u->SetCloakedHost(host);