// @unloadnpc changelog
// @loadnpc npc/classic/changelog.txt

-	script	changelog	-1,{
    OnInit:
    	bindatcmd "changelog","changelog::OnAdd", 1, 99;
    	end;


OnAdd:
	set .@gmname$,strcharinfo(0);
    	mes " Hello GM ^00CC00"+strcharinfo(0)+"^000000!";
	mes "Enter current changes:";
	input .@logtext$;
	mes .@logtext$;
	mes "Is this correct";
	next;
	if (select("No", "Yes, save it!") == 2) {
		query_sql "INSERT INTO changelog (`ldate`,`gmname`, `logtext`) VALUES ('"+gettimestr("%Y-%m-%d %H:%M:%S",21)+"','"+escape_sql(.@gmname$)+"','"+escape_sql(.@logtext$)+"')";
		mes "Log Saved";
		close;
	}
	close;

}