| 395 | } |
| 396 | |
| 397 | void cmdHandler_SmileX(const QStringList ¶ms, MapClientSession &sess) |
| 398 | { |
| 399 | QString fileName("scripts/" + params.join(" ")); |
| 400 | if(!fileName.endsWith(".smlx")) |
| 401 | fileName.append(".smlx"); |
| 402 | QFile file(fileName); |
| 403 | if(file.exists() && file.open(QIODevice::ReadOnly | QIODevice::Text)) |
| 404 | { |
| 405 | QString contents(file.readAll()); |
| 406 | sess.addCommandToSendNextUpdate(std::make_unique<StandardDialogCmd>(contents)); |
| 407 | } |
| 408 | else { |
| 409 | QString errormsg = "Failed to load smilex file. \'" + file.fileName() + "\' not found."; |
| 410 | qCDebug(logSlashCommand) << errormsg; |
| 411 | sendInfoMessage(MessageChannel::ADMIN, errormsg, sess); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | void cmdHandler_Falling(const QStringList &/*params*/, MapClientSession &sess) |
| 416 | { |
nothing calls this directly
no test coverage detected