CREATE TABLE blacklist (
  seq int(20) NOT NULL auto_increment,
  bl_time timestamp(14) NOT NULL,
  sysop int(20) NOT NULL default '0',
  nick varchar(16) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE connections (
  seq int(20) NOT NULL auto_increment,
  uid int(20) NOT NULL default '0',
  cip varchar(15) NOT NULL default '',
  host varchar(255) default NULL,
  intime varchar(14) default NULL,
  outtime varchar(14) default NULL,
  bytes_in int(10) default NULL,
  bytes_out int(10) default NULL,
  port int(6) default NULL,
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE kick (
  seq int(20) NOT NULL auto_increment,
  kick_time timestamp(14) NOT NULL,
  sysop int(20) NOT NULL default '0',
  uid int(20) NOT NULL default '0',
  mesg varchar(128) NOT NULL default '',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE lockout (
  seq int(20) NOT NULL auto_increment,
  lo_time varchar(14) NOT NULL default '',
  sysop int(20) NOT NULL default '0',
  uid int(20) NOT NULL default '0',
  mesg varchar(128) default NULL,
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE mask (
  seq int(20) NOT NULL auto_increment,
  mask_time varchar(14) NOT NULL default '',
  sysop int(20) NOT NULL default '0',
  uid int(20) NOT NULL default '0',
  host varchar(128) NOT NULL default '',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE mesg (
  seq int(20) NOT NULL auto_increment,
  intime varchar(14) NOT NULL default '',
  f_uid int(20) NOT NULL default '0',
  t_uid int(20) NOT NULL default '0',
  mesg varchar(255) NOT NULL default '',
  recvd varchar(14) default NULL,
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE mute (
  seq int(20) NOT NULL auto_increment,
  mu_time varchar(14) NOT NULL default '',
  sysop int(20) NOT NULL default '0',
  uid int(20) NOT NULL default '0',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE note (
  seq int(20) NOT NULL auto_increment,
  t_uid int(20) NOT NULL default '0',
  intime varchar(14) NOT NULL default '',
  mesg varchar(255) NOT NULL default '',
  recvd varchar(14) default NULL,
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE notify (
  seq int(20) NOT NULL auto_increment,
  uid int(20) NOT NULL default '0',
  target int(20) NOT NULL default '0',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE process (
  seq int(20) NOT NULL auto_increment,
  up int(20) NOT NULL default '0',
  down int(20) default NULL,
  pid int(6) NOT NULL default '0',
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE session (
  seq int(20) NOT NULL auto_increment,
  uid int(20) NOT NULL default '0',
  ip varchar(15) NOT NULL default '',
  intime varchar(14) NOT NULL default '',
  outtime varchar(14) default NULL,
  PRIMARY KEY  (seq)
) TYPE=MyISAM;

CREATE TABLE user (
  seq int(20) NOT NULL auto_increment,
  signup varchar(14) NOT NULL default '',
  uname varchar(16) NOT NULL default '',
  sec varchar(32) NOT NULL default '',
  priv int(2) NOT NULL default '0',
  prompt int(1) default NULL,
  fname varchar(12) default NULL,
  lname varchar(20) default NULL,
  city varchar(32) default NULL,
  cc char(2) NOT NULL default '',
  aim varchar(24) default NULL,
  yim varchar(24) default NULL,
  icq int(12) default NULL,
  email varchar(255) NOT NULL default '',
  url varchar(255) default NULL,
  PRIMARY KEY  (seq),
  UNIQUE KEY uname (uname),
  UNIQUE KEY email (email)
) TYPE=MyISAM;

INSERT INTO user VALUES (1,'00000000000000','sysop',MD5('ngbbssysop'),99,'','System','Operator','','US','','','','','');
