+ if(userisowner || isGodMode(user)) {
+ printf_mysql_query("SELECT `owner_history_time`, a.`user_user`, b.`user_user` FROM `owner_history` LEFT JOIN `users` a ON `owner_history_from_uid` = a.`user_id` LEFT JOIN `users` b ON `owner_history_to_uid` = b.`user_id` WHERE `owner_history_cid` = '%d'", chan->channel_id);
+ res = mysql_use();
+ if(mysql_num_rows(res)) {
+ reply(getTextBot(), user, "NS_INFO_OWNERLOG", chan->name);
+ time_t rawtime;
+ struct tm *timeinfo;
+ char timeBuf[80];
+ while((row = mysql_fetch_row(res))) {
+ rawtime = (time_t) atol(row[0]);
+ timeinfo = localtime(&rawtime);
+ strftime(timeBuf, 80, "%c", timeinfo);
+ reply(getTextBot(), user, "NS_INFO_OWNERCHANGE", row[1], row[2], timeBuf);
+ }
+ }
+ }