- /* full form to add a SVSHold */
- if (ServerInstance->IsNick(parameters[0]))
- {
- // parameters[0] = w00t
- // parameters[1] = 1h3m2s
- // parameters[2] = Registered nickname
-
- /* Already exists? */
- if (HoldMap.find(parameters[0]) != HoldMap.end())
- {
- user->WriteServ( "385 %s %s :SVSHOLD already exists", user->nick, parameters[0]);
- return CMD_FAILURE;
- }
-
- long length = ServerInstance->Duration(parameters[1]);
- std::string reason = (pcnt > 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]] = S;
+ // Adding - XXX todo make this respect <insane> tag perhaps..
+ long duration = ServerInstance->Duration(parameters[1]);
+ SVSHold* r = new SVSHold(ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());