Fix oversight which caused problems with Clang on OSX.
[password] varchar(255) NULL,\r
[hostname] varchar(255) NULL,\r
[type] varchar(255) NULL,\r
+ [active] bit NOT NULL DEFAULT 1,\r
PRIMARY KEY CLUSTERED ([id])\r
)\r
--- MySQL dump 9.11
---
--- Host: localhost Database: brain
--- ------------------------------------------------------
--- Server version 4.0.20
-
---
--- Table structure for table `ircd_opers`
---
-
CREATE TABLE ircd_opers (
id bigint(20) NOT NULL auto_increment,
username text,
password text,
hostname text,
type text,
+ active tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (id)
-) TYPE=MyISAM;
-
---
--- Dumping data for table `ircd_opers`
---
-
-
+) ENGINE=MyISAM;
---
--- PostgreSQL database dump
---
-
CREATE TABLE ircd_opers (
id serial NOT NULL,
username text,
"password" text,
hostname text,
- "type" text
+ "type" text,
+ active boolean NOT NULL DEFAULT 1
);
ALTER TABLE ONLY ircd_opers
ADD CONSTRAINT ircd_opers_pkey PRIMARY KEY (id);
-
username text,
password text,
hostname text,
-type text);
-
+type text,
+active integer NOT NULL DEFAULT 1);
SQL.SetProvider("SQL/" + dbid);
hashtype = tag->getString("hash");
- query = tag->getString("query", "SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password'");
+ query = tag->getString("query", "SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password' AND active=1;");
}
ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE