diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-04 05:45:58 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-04 05:45:58 +0000 |
| commit | 2708eea5d13c249143b83fbaa8b552992f0ac8b6 (patch) | |
| tree | 5afffad5f83ca6daa89784c27f4d4e9c5f4eb8fc /src/modules | |
| parent | f58026749b0c0770a322893b27c013168be5cdbc (diff) | |
Removed NICKMAX and CHANMAX, replaced user->nick, c->name, and ci->name with std::string
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2732 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/cs_appendtopic.c | 10 | ||||
| -rw-r--r-- | src/modules/cs_enforce.c | 14 | ||||
| -rw-r--r-- | src/modules/cs_tban.c | 4 | ||||
| -rw-r--r-- | src/modules/hs_request.c | 10 |
4 files changed, 19 insertions, 19 deletions
diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 5a0194a42..2b21a3096 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -83,29 +83,29 @@ class CommandCSAppendTopic : public Command strscpy(topic, newtopic, sizeof(topic)); ci->last_topic = *topic ? sstrdup(topic) : NULL; - strscpy(ci->last_topic_setter, u->nick, NICKMAX); + ci->last_topic_setter = u->nick; ci->last_topic_time = time(NULL); if (c->topic) delete [] c->topic; c->topic = *topic ? sstrdup(topic) : NULL; - strscpy(c->topic_setter, u->nick, NICKMAX); + c->topic_setter = u->nick; if (ircd->topictsbackward) c->topic_time = c->topic_time - 1; else c->topic_time = ci->last_topic_time; if (!check_access(u, ci, CA_TOPIC)) - alog("%s: %s!%s@%s changed topic of %s as services admin.", Config.s_ChanServ, u->nick, u->GetIdent().c_str(), u->host, c->name); + alog("%s: %s!%s@%s changed topic of %s as services admin.", Config.s_ChanServ, u->nick.c_str(), u->GetIdent().c_str(), u->host, c->name.c_str()); if (ircd->join2set) { if (whosends(ci) == findbot(Config.s_ChanServ)) { - ircdproto->SendJoin(findbot(Config.s_ChanServ), c->name, c->creation_time); + ircdproto->SendJoin(findbot(Config.s_ChanServ), c->name.c_str(), c->creation_time); ircdproto->SendMode(NULL, c, "+o %s", Config.s_ChanServ); } } - ircdproto->SendTopic(whosends(ci), c, u->nick, topic); + ircdproto->SendTopic(whosends(ci), c, u->nick.c_str(), topic); if (ircd->join2set) { if (whosends(ci) == findbot(Config.s_ChanServ)) diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index 55cc6f5a3..32f2c85c2 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -62,7 +62,7 @@ class CommandCSEnforce : public Command return; if (debug) - alog("debug: cs_enforce: Enforcing SECUREOPS on %s", c->name); + alog("debug: cs_enforce: Enforcing SECUREOPS on %s", c->name.c_str()); /* Dirty hack to allow chan_set_correct_modes to work ok. * We pretend like SECUREOPS is on so it doesn't ignore that @@ -105,7 +105,7 @@ class CommandCSEnforce : public Command return; if (debug) - alog("debug: cs_enforce: Enforcing RESTRICTED on %s", c->name); + alog("debug: cs_enforce: Enforcing RESTRICTED on %s", c->name.c_str()); old_nojoin_level = ci->levels[CA_NOJOIN]; if (ci->levels[CA_NOJOIN] < 0) @@ -122,8 +122,8 @@ class CommandCSEnforce : public Command reason = getstring(u, CHAN_NOT_ALLOWED_TO_JOIN); c->SetMode(NULL, CMODE_BAN, mask); ircdproto->SendKick(whosends(ci), ci->c, u, "%s", reason); - av[0] = ci->name; - av[1] = u->nick; + av[0] = ci->name.c_str(); + av[1] = u->nick.c_str(); av[2] = reason; do_kick(Config.s_ChanServ, 3, av); } @@ -147,7 +147,7 @@ class CommandCSEnforce : public Command return; if (debug) - alog("debug: cs_enforce: Enforcing mode +R on %s", c->name); + alog("debug: cs_enforce: Enforcing mode +R on %s", c->name.c_str()); user = c->users; do @@ -163,8 +163,8 @@ class CommandCSEnforce : public Command c->SetMode(NULL, CMODE_BAN, mask); } ircdproto->SendKick(whosends(ci), ci->c, u, "%s", reason); - av[0] = ci->name; - av[1] = u->nick; + av[0] = ci->name.c_str(); + av[1] = u->nick.c_str(); av[2] = reason; do_kick(Config.s_ChanServ, 3, av); } diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index 7f84f3e85..65aa88374 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -73,7 +73,7 @@ class CommandCSTBan : public Command bool OnHelp(User *u, const ci::string &subcommand) { this->OnSyntaxError(u, ""); - ircdproto->SendMessage(findbot(Config.s_ChanServ), u->nick, " "); + u->SendMessage(Config.s_ChanServ, " "); me->NoticeLang(Config.s_ChanServ, u, TBAN_HELP_DETAIL); return true; @@ -202,7 +202,7 @@ int canBanUser(Channel * c, User * u, User * u2) if (!check_access(u, ci, CA_BAN)) notice_lang(Config.s_ChanServ, u, ACCESS_DENIED); else if (is_excepted(ci, u2)) - notice_lang(Config.s_ChanServ, u, CHAN_EXCEPTED, u2->nick, ci->name); + notice_lang(Config.s_ChanServ, u, CHAN_EXCEPTED, u2->nick.c_str(), ci->name.c_str()); else if (is_protected(u2)) notice_lang(Config.s_ChanServ, u, ACCESS_DENIED); else diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index ba317bb20..70be073ec 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -78,7 +78,7 @@ class CommandHSRequest : public Command CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms) { - char *nick; + const char *nick; const char *rawhostmask = params[0].c_str(); char hostmask[HOSTMAX]; NickAlias *na; @@ -86,7 +86,7 @@ class CommandHSRequest : public Command char *vIdent = NULL; time_t now = time(NULL); - nick = u->nick; + nick = u->nick.c_str(); vIdent = myStrGetOnlyToken(rawhostmask, '@', 0); /* Get the first substring, @ as delimiter */ if (vIdent) @@ -166,7 +166,7 @@ class CommandHSRequest : public Command return MOD_CONT; } } - my_add_host_request(nick, vIdent, hostmask, u->nick, now); + my_add_host_request(const_cast<char *>(nick), vIdent, hostmask, const_cast<char *>(u->nick.c_str()), now); me->NoticeLang(Config.s_HostServ, u, LNG_REQUESTED); req_send_memos(u, vIdent, hostmask); @@ -223,7 +223,7 @@ class CommandHSActivate : public Command my_memo_lang(u, na->nick, 2, LNG_ACTIVATE_MEMO); me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATED, nick); - alog("Host Request for %s activated by %s", nick, u->nick); + alog("Host Request for %s activated by %s", nick, u->nick.c_str()); } else me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick); @@ -275,7 +275,7 @@ class CommandHSReject : public Command } me->NoticeLang(Config.s_HostServ, u, LNG_REJECTED, nick); - alog("Host Request for %s rejected by %s (%s)", nick, u->nick, reason ? reason : ""); + alog("Host Request for %s rejected by %s (%s)", nick, u->nick.c_str(), reason ? reason : ""); } else me->NoticeLang(Config.s_HostServ, u, LNG_NO_REQUEST, nick); |
