w00t [Wed, 31 Oct 2007 15:53:03 +0000 (15:53 +0000)]
Reorder creation of objects so:
1) they are all done in the same place
2) calling InspIRCd::Exit() early on (before initialising a few things is done) doesn't crash us ;p
brain [Mon, 29 Oct 2007 00:37:47 +0000 (00:37 +0000)]
A few more timesaving checks.
The more astute amongst you will have noticed all the Add?Line functions now look practically identical. This paves the way for us to have one generic one, but before we do this
i'd rather have us add an XLine* pointer to it, not a hostmask or something non-generic.
brain [Mon, 29 Oct 2007 00:23:11 +0000 (00:23 +0000)]
Ok, now each xline will be in two places. The sorted vector and a map, each line type having its own map stored in a map of maps. (RTFS when its done)
This allows for faster checking for simple existence of a line for removal/adding without O(n) lookups
w00t [Sun, 28 Oct 2007 21:37:22 +0000 (21:37 +0000)]
Make ELines cached, and check for ELined status in all the Matches for all the linetypes. Brain, SVN up before you overwrite my fixes to bits of this again :P
w00t [Sun, 28 Oct 2007 19:20:44 +0000 (19:20 +0000)]
Add a virtual Matches to XLine class, and override it appropriately for all derived classes. Most still need to be converted to use it, however. This will make ApplyLines change much easier than it is currently ..
w00t [Sun, 28 Oct 2007 18:33:06 +0000 (18:33 +0000)]
- Tear out a useless load of XLine clutters that did nothing much except confuse things
- Revert back to early 1.0 design of using a single list for line storage. We'll make this work more efficiently than 1.0 though of course. This simplifies the code for expiry, checking, etc.
- Merge a bunch of sort callbacks into a single sort callback for class XLine.
- Horribly break apply_lines() for the time being.
.. and that's probably it.
w00t [Sun, 28 Oct 2007 13:34:24 +0000 (13:34 +0000)]
Add m_proxyscan -- someone can doubtless do a much better job of this, as it's mostly a proof of concept at the moment. Opens a socket, sends a predefined string, awaits a predefined response. It sucks right now :p
brain [Sat, 27 Oct 2007 14:31:58 +0000 (14:31 +0000)]
Fix for bug in windows with backslash directory seperators in config path when used with <include> tag and a relative include path, reported by daurnimator
brain [Sat, 27 Oct 2007 14:12:24 +0000 (14:12 +0000)]
Now plays nice with m_invisible, and fix a bug which allows users who havent spoken on a +D channel to remain invisible if they dont speak before an op removes the +D mode
brain [Thu, 25 Oct 2007 20:51:58 +0000 (20:51 +0000)]
Make install list list automatically generated from build targets and provide facility for installing extra files.
Using this, cert.pem and key.pem are only copied to the conf dir if you enabled an ssl module.
Also, this provides facility for a 'make deinstall' which should be safe for use in all situations as it always specifies a file by name and never uses wildcards to rm.
brain [Thu, 25 Oct 2007 15:25:32 +0000 (15:25 +0000)]
this should fix any of the crashes w00t outlined where User::MyClass == NULL.
The simplest fix seems to be that if the user has no class, skip all the code that uses the class values.
This makes sense because the only situation where User::MyClass == NULL is when they arent authorised to connect and are being quit so checking flood levels and max sendq etc are irrelevent.
w00t [Wed, 24 Oct 2007 22:52:51 +0000 (22:52 +0000)]
Implement <connect:limit> - limits how many clients can sit inside a <connect> tag. Brain, we have a problem here in that if we User::QuitUser() a user with a NULL MyClass member (connect class), then things break (like sendq et al). What should we do with this, create a generic catchall class or something just in case? (to replicate, set up a single connect class with a low limit, and connect too many clients. Crash is the result)
w00t [Wed, 24 Oct 2007 19:12:45 +0000 (19:12 +0000)]
Disable all connect classes, reenable them as we find them in the config. This stops users using a connect class removed from the conf (or will in a second)
w00t [Wed, 24 Oct 2007 18:56:24 +0000 (18:56 +0000)]
Finish reference counting connect class stuff. Now rehash removes unused classes (refcount == 0), and re-reads any new shit (or ones that just got removed) from the config.
Possibly todo in the future: make /rehash update classes that exist in memory, make /rehash mark classes removed from conf (but still exist as refcount > 0) as inactive.
brain [Wed, 24 Oct 2007 16:54:44 +0000 (16:54 +0000)]
/usr/local/include/openssl/pqueue.h:73: error: ISO C++ does not support `long long'
/usr/local/include/openssl/pqueue.h:80: error: ISO C++ does not support `long long'
/usr/local/include/openssl/pqueue.h:89: error: ISO C++ does not support `long long'
^^ openssl broken too, set $NoPedantic
w00t [Tue, 23 Oct 2007 23:31:40 +0000 (23:31 +0000)]
Fix a bug before I even started this.. don't let User::SetClass() decrease the reference count if we cannot find the new class to plop them into, that will nark things up nicely..
w00t [Tue, 23 Oct 2007 23:25:49 +0000 (23:25 +0000)]
Some more class stuff, blah. Now possible to move a user to a different class via User::SetClass(), which cmd_oper uses. GetClass() is now just a wrapper around User::MyClass. User::CheckClass() does not support any parameters anymore, nor does User::GetClass().. I think I have this all right ;p
w00t [Tue, 23 Oct 2007 23:07:24 +0000 (23:07 +0000)]
Some initial work towards tying <connect> classes to user accounts. This will (in the longer term) allow for things like limits on how many users can fit in a <connect> for 1.2
brain [Tue, 23 Oct 2007 22:30:25 +0000 (22:30 +0000)]
Move socketengines into their own dir. This was all w00t's idea, but i told him no because i didnt think it would work. Now ive done it myself :P ner ner ne ner ner :)
brain [Tue, 23 Oct 2007 21:00:35 +0000 (21:00 +0000)]
All of insp now builds with -pedantic (theres some warnings to squash in modules, and in spanningtree, but its all 'unused parameter').
I suggest we actually go through and satisfy these unused parameter errors for two reasons:
(1) it acts as a strong compiler hint leading to better optimization
(2) it will give us a good clue of what parameters are NEVER used and should therefore be removed from use (like i just did with AddMode)
brain [Tue, 23 Oct 2007 20:45:09 +0000 (20:45 +0000)]
All the core is now pedantic safe!
NOTE: I changed ModeHandler removing a redundant param. Devs, if you find stuff that doesnt compile, change AddMode(handler, 'l') to AddMode(handler); and it will :p