summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_mysql.cpp
AgeCommit message (Collapse)Author
2007-10-23Pedantic safebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8314 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ↵w00t
ident etc will use. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8206 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15In the grand tradition of huge fucking commits:w00t
- chanrec -> Channel - userrec -> User Enjoy. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-28Move everything module-related out of InspIRCd and into ModuleManager, there ↵om
is a ModuleManager instantiated as InspIRCd::Modules. Several of the function names have changed slightly as well. e.g. Instance->FindModule(m_foobar.so); is now Instance->Modules->Find(m_foobar.so); All modules in the core distribution should also be updated in line with these changes. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7985 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Craquity craq De-craq!brain
This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵peavey
auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-17Morebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7356 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-21Header rearrangement, move inspircd.h to top, remove stdio, stdlib, ↵brain
stdblahblah that we dont even use, remove redeclared <string>, <map>, <vector>. This (1) fixes the irc::string::move warnings on vc8 (2) speeds up compile a lot git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7098 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-06Fix for bug #263 - note, this NEEDS QA TESTINGbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6897 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-17Move QueryQueue class into m_sqlv2 to prevent flat-out duplication of ↵brain
identical code in pgsql and mysql modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6368 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-17Mass comment removal.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6367 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-14Add eval() and exec() macros, that evaluate perl and execute commands at ↵brain
configure time, rather than delaying them with backticks till compile time. This picks up any errors sooner. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6311 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-13Extra stuff to improve buildsystem, calculate lib and include dirs at ↵brain
configure time rather than at build time. This means that we can also throw errors at configure time if we cant find the libraries, rather than erroring at buildtime like we used to. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6306 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-02Remove a TODO comment. Also added support for <database:port> option since ↵peavey
r6213 so we can now connect to other ports than the standard mysql 3306 port. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6216 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-02m_mysql can now do REHASH proper. Detects any changes made to config and ↵peavey
loads/removes as needed. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6215 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-02Also use SQLhost for host config.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6213 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-01Fix to allow for OnRehash to know what user initiated the rehashbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6207 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-30That should make it load/unload, still needs REHASH done proper.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6167 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-29Writing beyond malloc'ed mem of a char pointer will crash with a vengeance. ↵peavey
Fix it by actually doing the +1 mentioned in the comment above, but lacking from the actual code. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6152 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-28Change the SQLutils and SQL providers to also use interfaces for proper ↵peavey
unload order, taking away the need for a static m_sqlutils. Depend order: m_sqlutils -> sql providers (m_mysql m_pgsql) -> sql modules (m_sqlauth m_sqloper). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6149 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-28Fix mem leakage in reading in and connecting to databases and have ↵peavey
destructor call mem cleanup too and end the endless loop too so /RESTART and /DIE works with no segfault. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6144 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-21Fix for bug #180, logging is not threadsafe, mutex it (ew, luckily we dont ↵brain
log much) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6056 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-15Still more massive commit fun. Headers in include/ still to be done, else ↵w00t
that's it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5997 e03df62e-2008-0410-955e-edbf42e46eb7
2006-12-04Update $ModDep lines so that these properly depend on their headers in the ↵brain
makefile git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5853 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-22Oops, memory leaks!brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5512 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-20Const refsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5505 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-06Document more classesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5435 e03df62e-2008-0410-955e-edbf42e46eb7
2006-10-01Now with binary versioning goodnessbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5366 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-28Note: connect() cant time out for inspsockets in this commit. They'll sit in ↵brain
memory forever -- if you want something actually working properly wait for the next commit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5040 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Just to mess with om's head, remove helperfuncs.h from everywherebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4900 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Change to using Instance->Log (InspIRCd::Log) rather than log() macrobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4880 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Now two types of log macro, log() and ilog(). log() assumes an InspIRCd ↵brain
object called ServerInstance, ilog() takes an InspIRCd object as first param. TODO: Run a regexp over these, using perl, to translate them into InspIRCd::Log calls and then eliminate the macro :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4879 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-11Somehow, i'd cp'd all these and was making local changes :/brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4868 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Note: FOR THE MOMENT, this is BROKEN. It wont run right until im done.brain
Changed Parameter for modules from Server* to InspIRCd*. TODO: Move remaining Server* Modules into InspIRCd* and remove class Server. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4859 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10PublishFeature, FindFeature, FindModule, PriorityBefore, PriorityAfter -> ↵brain
InspIRCd:: git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4846 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-10Removal of Server::Log -- not much ever used it anyway with the ability to ↵brain
use log(). log() macro still exists, and calls InspIRCd::Log() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4845 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09Move socket_ref and module_sockets vectors/arrays into InspIRCd*. These are ↵brain
public members, which InspSocket can modify. (eventually, this will be marshalled safely through some accessors). When constructing an InspSocket you must now provide an InspIRCd* instance to 'attach' the socket to. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4812 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-09ServerConfig extern moved into class InspIRCdbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if ↵brain
this works yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01AF_INET -> define to AF_FAMILY, will be either AF_INET or AF_INET6brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4610 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01Move to entirely using insp_sockaddr and insp_inaddr for socket stuff, first ↵brain
step on the road to ipv6 support git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4609 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23Tidyup and bugfix, not copying the correct column namesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4532 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23Change to use GetId() and ID rather than GetData() and dataom
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4531 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23Fixed to dynamically allocate the fieldlistbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4530 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23Move mysql_rpath into extrabrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4527 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23More stuff to return empty lists and maps when there are no more rows in the ↵brain
dataset git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4524 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23Adjust m_mysql to match the assumed behaviour of m_pgsql exactly, e.g. when ↵brain
there are now rows left return an empty row Fix mistake which required a reference to be freed (?!) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4523 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-22Alter for Rows() == X, Cols() == 0 for 'X rows affected' queriesbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4515 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-22I hate the fucking mysql devs. Craq smoking bastards.brain
Upon Insert, number of rows is the number of rows effected but the number of columns is 0????? Add check to MySQLreply::Rows() to ensure the user doesnt see N rows and 0 columns! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4510 e03df62e-2008-0410-955e-edbf42e46eb7