summaryrefslogtreecommitdiff
path: root/include/bots.h
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-04 06:40:24 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-04 06:40:24 +0000
commitb462814760cb7c0830072275acc97291a9fb905b (patch)
tree56cfe6caee408eb852f728cd8aaa2d18e4365228 /include/bots.h
parent2708eea5d13c249143b83fbaa8b552992f0ac8b6 (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 'include/bots.h')
-rw-r--r--include/bots.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/bots.h b/include/bots.h
index 80ac08c1f..4645ea3b0 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -41,10 +41,10 @@ class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
BotInfo *next, *prev;
std::string uid; /* required for UID supporting servers, as opposed to the shitty struct Uid. */
- char *nick; /* Nickname of the bot */
- char *user; /* Its user name */
- char *host; /* Its hostname */
- char *real; /* Its real name */
+ std::string nick; /* Nickname of the bot */
+ std::string user; /* Its user name */
+ std::string host; /* Its hostname */
+ std::string real; /* Its real name */
time_t created; /* Birth date ;) */
int16 chancount; /* Number of channels that use the bot. */
/* Dynamic data */
@@ -52,17 +52,12 @@ class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
CommandHash **cmdTable;
/** Create a new bot.
- * XXX: Note - this constructor is considered obsolete. Use the four parameter form.
- * @param nick The nickname to assign to the bot.
- */
- BotInfo(const char *nick);
- /** Create a new bot.
* @param nick The nickname to assign to the bot.
* @param user The ident to give the bot.
* @param host The hostname to give the bot.
* @param real The realname to give the bot.
*/
- BotInfo(const char *nick, const char *user, const char *host, const char *real);
+ BotInfo(const std::string &nick, const std::string &user = "", const std::string &host = "", const std::string &real = "");
/** Destroy a bot, clearing up appropriately.
*/
@@ -90,4 +85,3 @@ class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
*/
void UnAssign(User *u, ChannelInfo *ci);
};
-