diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-04 06:40:24 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-04 06:40:24 +0000 |
commit | b462814760cb7c0830072275acc97291a9fb905b (patch) | |
tree | 56cfe6caee408eb852f728cd8aaa2d18e4365228 /src/protocol/ratbox.c | |
parent | 2708eea5d13c249143b83fbaa8b552992f0ac8b6 (diff) |
Changed 'char *' fields in BotInfo to 'std::string', cleanup of bots.cpp, changed many other functions to use 'const std::string &' arguments as a chain reaction.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2733 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/ratbox.c')
-rw-r--r-- | src/protocol/ratbox.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index a9e2c9027..299b9b658 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -198,9 +198,11 @@ class RatboxProto : public IRCDTS6Proto send_cmd(bi ? bi->uid : Config.s_OperServ, "UNKLINE * %s %s", ak->user, ak->host); } - void SendSQLineDel(const char *user) + void SendSQLineDel(const std::string &user) { - send_cmd(TS6SID, "UNRESV * %s", user); + if (user.empty()) + return; + send_cmd(TS6SID, "UNRESV * %s", user.c_str()); } void SendJoin(BotInfo *user, const char *channel, time_t chantime) @@ -240,10 +242,10 @@ class RatboxProto : public IRCDTS6Proto ratbox_cmd_svinfo(); } - void SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real, const char *modes, const char *uid) + void SendClientIntroduction(const std::string &nick, const std::string &user, const std::string &host, const std::string &real, const char *modes, const std::string &uid) { EnforceQlinedNick(nick, NULL); - send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0 %s :%s", nick, static_cast<long>(time(NULL)), modes, user, host, uid, real); + send_cmd(TS6SID, "UID %s 1 %ld %s %s %s 0 %s :%s", nick.c_str(), static_cast<long>(time(NULL)), modes, user.c_str(), host.c_str(), uid.c_str(), real.c_str()); SendSQLine(nick, "Reserved for services"); } |