- /* full form to add a SVSHold */
-
- /* NOTE: We check nicks up to 512 in length here, as a hax to allow
- * remote nicks that are longer than our configuration to be held
- */
- if (ServerInstance->IsNick(parameters[0].c_str(), 512))
- {
- // parameters[0] = w00t
- // parameters[1] = 1h3m2s
- // parameters[2] = Registered nickname
-
- /* Already exists? */
- if (HoldMap.find(parameters[0].c_str()) != HoldMap.end())
- {
- user->WriteServ( "385 %s %s :SVSHOLD already exists", user->nick.c_str(), parameters[0].c_str());
- return CMD_FAILURE;
- }
-
- unsigned long length = ServerInstance->Duration(parameters[1]);
- std::string reason = (parameters.size() > 2) ? parameters[2] : "No reason supplied";
-
- SVSHold* S = new SVSHold(parameters[0], user->nick, ServerInstance->Time(), length, reason);
- SVSHolds.push_back(S);
- HoldMap[parameters[0].c_str()] = S;