<?php
$result = run_query("SELECT COUNT(*) as num FROM " . $config["table_prefix"] . "module_livechat_settings WHERE name = 'post_on_enter'");
if ($row = mysqli_fetch_assoc($result)) {
    if ($row['num'] == 0) {
        run_query("INSERT INTO " . $config["table_prefix"] . "module_livechat_settings (`name`, `value`) VALUES ('post_on_enter', '0')");
    }
}

$result = run_query("SELECT COUNT(*) as num FROM " . $config["table_prefix"] . "module_livechat_settings WHERE name = 'fast_replies'");
if ($row = mysqli_fetch_assoc($result)) {
    if ($row['num'] == 0) {
        run_query("INSERT INTO " . $config["table_prefix"] . "module_livechat_settings (`name`, `value`) VALUES ('fast_replies', 'Здравствуйте;Доброе утро;Добрый день;Добрый вечер;До свиданья')");
    }
}
?>