]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #998 from SaberUK/master+fix-clang-builds
authorAttila Molnar <attilamolnar@hush.com>
Sun, 22 Feb 2015 16:14:53 +0000 (17:14 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 22 Feb 2015 16:14:53 +0000 (17:14 +0100)
Fix oversight which caused problems with Clang on OSX.

extras/m_sqloper.mssql.sql
extras/m_sqloper.mysql.sql
extras/m_sqloper.postgresql.sql
extras/m_sqloper.sqlite3.sql
src/modules/m_sqloper.cpp

index 5056e12e9806ec9d52f209c88f77c60d59550550..7580a439126ecc21faa5c92bb729ae1c486111b8 100644 (file)
@@ -4,5 +4,6 @@ CREATE TABLE [dbo].[ircd_opers] (
   [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
index 293a2aa7041c8faf4ccf669ff3652ffd9dc1d29e..f4349580682b2903d2f21156cb3214fb53c39b86 100644 (file)
@@ -1,24 +1,9 @@
--- 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;
index fd640949fc182cfec7421c1ffd603f5fbecc04a5..4244abc22ca668dc4cc54f82fcc6ff06a6e6ff0a 100644 (file)
@@ -1,14 +1,10 @@
---
--- 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);
-
index 1bb2937b8d146ea208016f652f9ef45d87b6bf9a..1c607e664e8afa84ca8d80a60fc6d65af8068e6c 100644 (file)
@@ -3,5 +3,5 @@ id integer primary key,
 username text,
 password text,
 hostname text,
-type text);
-
+type text,
+active integer NOT NULL DEFAULT 1);
index bc46bd7e714904c8be9dcebd0fa30becee0a1216..b5f0d6c470968f4f09c7f7d57f03d1077043adfd 100644 (file)
@@ -122,7 +122,7 @@ public:
                        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> &parameters, LocalUser *user, bool validated, const std::string &original_line) CXX11_OVERRIDE