CREATE TABLE c_messages (
   type tinyint(1) DEFAULT '0' NOT NULL,
   room varchar(30) NOT NULL,
   username varchar(30) NOT NULL,
   latin1 tinyint(1) DEFAULT '0' NOT NULL,
   m_time int(11) DEFAULT '0' NOT NULL,
   address varchar(30) NOT NULL,
   message text NOT NULL
);


CREATE TABLE c_users (
   room varchar(30) NOT NULL,
   username varchar(30) NOT NULL,
   latin1 tinyint(1) DEFAULT '0' NOT NULL,
   u_time int(11) DEFAULT '0' NOT NULL,
   status varchar(1) NOT NULL,
   ip varchar(16) NOT NULL,
   UNIQUE room (room, username)
);

CREATE TABLE c_ban_users (
   username varchar(30) NOT NULL,
   latin1 tinyint(1) DEFAULT '0' NOT NULL,
   ip varchar(16) NOT NULL,
   rooms varchar(100) NOT NULL,
   ban_until int(11) DEFAULT '0' NOT NULL
);