X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sqlv2.h;h=9b6bd36b3dce8e4a2d25b6bbb26981f65314ce1a;hb=f91a61fa22b239384c31526fd11da1e3030aaa96;hp=bcdcb6546fe6e2b3a7e018c32379e84aef158855;hpb=7e843c22e16c81054bad18073d24fe1a07026431;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sqlv2.h b/src/modules/m_sqlv2.h index bcdcb6546..9b6bd36b3 100644 --- a/src/modules/m_sqlv2.h +++ b/src/modules/m_sqlv2.h @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -61,7 +61,7 @@ public: * The error string varies from database software to database software * and should be used to display informational error messages to users. */ -class SQLerror : public classbase +class SQLerror { /** The error id */ @@ -149,7 +149,7 @@ public: * * SQLrequest foo = SQLrequest(this, target, "databaseid", (SQLquery("SELECT.. ?"), parameter, parameter)); */ -class SQLquery : public classbase +class SQLquery { public: /** The query 'format string' @@ -242,6 +242,11 @@ public: { } + // Copy constructor - XXX probably shouldn't be needed + SQLrequest(const SQLrequest& o) + : Request(o.source, o.dest, SQLREQID), query(o.query), dbid(o.dbid), pri(o.pri), cancel(o.cancel), + id(o.id), error(o.error) {} + /** Set the priority of a request. */ void Priority(bool p = true) @@ -452,13 +457,13 @@ class SQLhost /** Overload operator== for two SQLhost objects for easy comparison. */ -bool operator== (const SQLhost& l, const SQLhost& r) +inline bool operator== (const SQLhost& l, const SQLhost& r) { return (l.id == r.id && l.host == r.host && l.port == r.port && l.name == r.name && l.user == r.user && l.pass == r.pass && l.ssl == r.ssl); } /** Overload operator!= for two SQLhost objects for easy comparison. */ -bool operator!= (const SQLhost& l, const SQLhost& r) +inline bool operator!= (const SQLhost& l, const SQLhost& r) { return (l.id != r.id || l.host != r.host || l.port != r.port || l.name != r.name || l.user != r.user || l.pass != r.pass || l.ssl != r.ssl); } @@ -489,7 +494,7 @@ bool operator!= (const SQLhost& l, const SQLhost& r) * until pop() is called. */ -class QueryQueue : public classbase +class QueryQueue { private: typedef std::deque ReqDeque;