summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorDylan Frank <b00mx0r@aureus.pw>2018-04-06 10:34:15 -0700
committerPeter Powell <petpow@saberuk.com>2018-04-06 18:34:15 +0100
commit4ec475ba10b65785277ed9dab5f99775289165b3 (patch)
tree63f05ba29fbfd0149b8bab84c64f4ad0ef22f85c /extras
parentd04db003df83ddfdc2b5b9ae0e360335d88ae769 (diff)
Refactor m_sqloper to be a full opers.conf replacement (#983).
m_sqloper now supports dynamic fields, works with m_sslinfo, and works with /stats o.
Diffstat (limited to 'extras')
-rw-r--r--extras/m_sqloper.mysql.sql11
-rw-r--r--extras/m_sqloper.postgresql.sql15
-rw-r--r--extras/m_sqloper.sqlite3.sql11
3 files changed, 23 insertions, 14 deletions
diff --git a/extras/m_sqloper.mysql.sql b/extras/m_sqloper.mysql.sql
index f43495806..a8a2b7e1d 100644
--- a/extras/m_sqloper.mysql.sql
+++ b/extras/m_sqloper.mysql.sql
@@ -1,9 +1,12 @@
CREATE TABLE ircd_opers (
id bigint(20) NOT NULL auto_increment,
- username text,
- password text,
- hostname text,
- type text,
+ name text NOT NULL,
+ password text NOT NULL,
+ hash text,
+ host text NOT NULL,
+ type text NOT NULL,
+ fingerprint text,
+ autologin tinyint(1) NOT NULL DEFAULT 0,
active tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (id)
) ENGINE=MyISAM;
diff --git a/extras/m_sqloper.postgresql.sql b/extras/m_sqloper.postgresql.sql
index 4244abc22..0b3cdb8dc 100644
--- a/extras/m_sqloper.postgresql.sql
+++ b/extras/m_sqloper.postgresql.sql
@@ -1,10 +1,13 @@
CREATE TABLE ircd_opers (
- id serial NOT NULL,
- username text,
- "password" text,
- hostname text,
- "type" text,
- active boolean NOT NULL DEFAULT 1
+ "id" serial NOT NULL,
+ "name" text NOT NULL,
+ "password" text NOT NULL,
+ "hash" text,
+ "host" text NOT NULL,
+ "type" text NOT NULL,
+ "fingerprint" text,
+ "autologin" boolean NOT NULL DEFAULT 0,
+ "active" boolean NOT NULL DEFAULT 1
);
ALTER TABLE ONLY ircd_opers
ADD CONSTRAINT ircd_opers_pkey PRIMARY KEY (id);
diff --git a/extras/m_sqloper.sqlite3.sql b/extras/m_sqloper.sqlite3.sql
index 1c607e664..6aec5a118 100644
--- a/extras/m_sqloper.sqlite3.sql
+++ b/extras/m_sqloper.sqlite3.sql
@@ -1,7 +1,10 @@
CREATE TABLE ircd_opers (
id integer primary key,
-username text,
-password text,
-hostname text,
-type text,
+name text NOT NULL,
+password text NOT NULL,
+hash text,
+host text NOT NULL,
+type text NOT NULL,
+fingerprint text,
+autologin integer NOT NULL DEFAULT 0,
active integer NOT NULL DEFAULT 1);