
Cod: Selectaţi tot
void LogManager::WhisperLog(const char * from, const char * to, const char * message)
{
m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), message, strlen(message));
Query("INSERT INTO whisper_log (from_msg, to_msg, msg_text) VALUES ('%s', '%s', '%s')", from, to, __escape_hint);
}if (LC_IsEurope() != true)
{
sys_log(0, "WHISPER: %s -> %s : %s", ch->GetName(), pinfo->szNameTo, buf);
}
4-------------Sub linia numaru 3 adagam acest cod :
Cod: Selectaţi tot
LogManager::instance().WhisperLog(ch->GetName(), pinfo->szNameTo, buf)
;Acum creeam un nou tabel in navicat la log, acesta este codul sursa la tabelul dn navicat :
Cod: Selectaţi tot
DROP TABLE IF EXISTS `whisper_log`;
CREATE TABLE `whisper_log` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`from_msg` varchar(24) NOT NULL DEFAULT 'error',
`to_msg` varchar(24) NOT NULL DEFAULT 'error',
`msg_text` varchar(250) NOT NULL DEFAULT 'empty_msg_error',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

