aquanight
58385dd458
Commit -Wformat=2 -Wmissing-format-attributes, printf-like functions in inspircd now get treated like printf (meaning compile-time check goodness) in GCC
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9217 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-30 02:48:54 +00:00
brain
343f12b9b2
Add stuff so that modules can hook users by altering a pointer in the User class. Note that ssl modules still bind by port, but the idea of doing this change is so we can remove that logic next
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9187 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-24 15:13:17 +00:00
brain
20680f9c49
This should save 128 bytes per user for non-opers. Well worth it imho for a reasonably large amount of unused ram.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9179 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23 21:12:36 +00:00
aquanight
743c10e4ca
Add ability to control what opertypes can set what operonly user/chan modes. This works the same way as commands, in that modes allowed by classes are added together, and * allows all.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9176 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-23 20:43:35 +00:00
brain
9ee525bec5
Add WriteNumeric() to User and OnNumeric module event. Note that modules do not change the numeric text on the fly, as this involves needless allocations for numerics that arent being changed, so instead they block the original numeric and send out their own when needed.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9174 e03df62e-2008-0410-955e-edbf42e46eb7
2008-03-22 11:45:57 +00:00
brain
bfaf7e3b27
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy trigger-happy gcc4 (thanks)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-13 18:22:19 +00:00
w00t
5db1d322be
Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a note to webirc that needs looking at.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-11 09:41:58 +00:00
aquanight
18154f4d22
Support for /invite <user> <channel> <timeout> - if the user doesn't partake in <timeout> time, the invite expires
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8854 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-08 23:35:39 +00:00
w00t
f127161467
Clear up header insanity
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-03 23:20:20 +00:00
w00t
8509727e16
Cache User::GetIPString()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8795 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-02 22:57:28 +00:00
aquanight
20bea3078d
Change API OnOperCompare to OnPassCompare, password hashing is now available for <connect:allow>, <power die= restart=>, <title> (m_customtitle.so), <vhost> (m_vhost.so), this works the same was as for <oper>: load m_password_hash.so (after all hasher modules, of course), and add hash="md5/sha256/whatever" to the relevant tag. Also fix m_callerid.cpp crashing on unload.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8755 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-27 00:12:11 +00:00
w00t
af9d361737
Remove an O(log n) in favour of an O(1) operation, and tidy up culllist some more
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8717 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16 16:19:57 +00:00
w00t
72fe978b29
Two stage commit: don't set user->muted except in QuitUser (duplicate setting), also, change muted to drop all socket operations instead of just not reading the user's buffer if muted is set (no point wasting time - they're going away). Also revert culllist back to once per mainloop iteration now it is much cheaper than previously.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8716 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16 09:14:23 +00:00
w00t
32026e5b6f
Re-add support for silent quits (note: we also remove an O(n) doing it this way)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8715 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16 08:55:18 +00:00
w00t
1963fba97f
Hacked-up culllist: stores user pointers rather than CullItem, as creating them seems to be very expensive and wasteful. Doesn't support silent quits (yet), and User::QuitUser seems to trigger *many* times per user before they are removed (socketengine getting write events to closed socket perhaps). It's still much quicker than the old way (NO perceptible lag AT ALL :))
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8714 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-16 07:59:09 +00:00
w00t
de6bba7882
Move User::AddClient to UserManager::AddClient. WARNING: I assure you this is currently WRONG as I was playing with moving a few bits to the constructor.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8706 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-13 03:51:04 +00:00
w00t
2192a9f58a
First UserManager overhaul: Move clone counts out of InspIRCd & User.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8705 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-13 03:37:25 +00:00
w00t
e4acbc95b8
Header update: 2007 -> 2008
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10 13:27:07 +00:00
w00t
f5c3e3782b
Add param 'opername' to event OnPostOper. This will help make a (slightly nicer) version of dz's patch to allow modes in <oper>
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8615 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-02 22:58:47 +00:00
brain
7eebbe7da1
Implement roadmap item: "userrec::HasPermission -> map of maps, for (even faster) access"
...
This is not a map of maps, but a single level map per oper, in non-opers this member is NULL.
Please note that this is not yet tested.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8564 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11 15:44:43 +00:00
w00t
7dbd30b89c
Update User::exempt all the time we change an E:Line. Brain, can you check I've done this okay, and fix my XXX if you know how? ta.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8416 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-28 21:23:07 +00:00
w00t
7b3105e5d4
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)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8357 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24 22:52:51 +00:00
w00t
d5ee2584e1
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)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8355 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24 19:12:45 +00:00
brain
58e4aa3a8c
Pedantic safety
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8350 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24 18:05:44 +00:00
brain
3c4730c34f
Some constructors dont initialize the refcount, namely, the one thats usually called :P
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8346 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24 16:08:29 +00:00
brain
fa04fb00cf
Try this w00t, compiles, test running now
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8343 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-24 15:48:00 +00:00
w00t
5b80dc83fd
Move some stuff from using userrec cached stuff to using stuff in the connect classes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8339 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23 23:54:24 +00:00
w00t
0b98824cc5
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
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8337 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23 23:25:49 +00:00
w00t
bbb7c9eec5
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
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8336 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23 23:07:24 +00:00
brain
18b1ec5080
-pedantic tidyups, lets see if it finds anything worthy of a fix
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8313 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23 19:28:41 +00:00
w00t
cef3b99425
Add User::IncreasePenalty() and User::DecreasePenalty()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8264 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 18:01:24 +00:00
brain
6856c87ae5
*untested* command buffering/penalty
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8250 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:08:13 +00:00
brain
d345d7c9aa
In class User:
...
/** If this bool is set then penalty rules do not apply to this user
*/
bool ExemptFromPenalty;
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8247 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:54:02 +00:00
brain
3c9686f9f7
Add User::UnderPenalty
...
/** If this bool is set for a user, then the user is under penalty, in short they
* are waiting for some held commands to be executed. If this is the case, then
* any commands they have in their sendq are executed on a timer tick rather than in
* their event handler.
*/
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8244 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:44:37 +00:00
w00t
fec45ead63
Remove second overridden (fully duplicated :/) copy of GetIPString which copies into a user specified buffer. It's not used anywhere, and is duplication ;(
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8218 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-16 10:29:01 +00:00
w00t
b57c7f4e46
In the grand tradition of huge fucking commits:
...
- chanrec -> Channel
- userrec -> User
Enjoy.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8204 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15 20:59:05 +00:00
burlex
e51c8a5cf6
* Fixed some incorrect declarations in IOCPEngine
...
* Fixed the virtual socket wrapper functions in IOCPEngine {these should really be inlined on unix}
* Fixed several compilation issues under Win32
* Fixed calls to close() which should've been changed to SE->Close()
+ Added a crashdump saving system to Win32 builds. Dumps are saved in the format of dump-<exename>-<year>-<month>-<day>-<hour>-<minute>-<second>.dmp in the working directory. Enabled by default, undefine ENABLE_CRASHDUMPS to disable.
+ Added m_operflood, this is a module I've had lying around for some time but some users may like it as it allows unreal-like behaviour without increasing flood limits for non-opers.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8015 e03df62e-2008-0410-955e-edbf42e46eb7
2007-09-04 12:36:05 +00:00
brain
5e95c0e559
Update documentation to indicate that userrec::userrec() may throw on duplicate uuid
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7915 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27 19:32:07 +00:00
brain
0ba4b96bba
Allocate uid in userrec constructor. Optional param added, if its empty, the server allocates one, if its not empty the user gets the one given
...
(this is used for remote users)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7873 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27 11:24:43 +00:00
w00t
1075956100
Add skeleton functions for UID stuff.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7845 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-26 23:07:06 +00:00
brain
cf4439ac5c
Add <connect:maxchans> as per feature bug #338 - combined with the last feature, this allows per-oper specific maxchans values, and even the same for non-opers!
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7761 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-19 20:14:05 +00:00
brain
c61fac32bc
Allow changing of an oper's host on oper up using <type:class> (give it a connect allow or deny line name) - implements bug #367
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7760 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-19 19:23:53 +00:00
brain
1c18eb24fa
Add <connect:inherit> and <connect:name>
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7758 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-19 19:06:35 +00:00
brain
49006f6330
Add some connect class stuff that is required for bug #367 plus some roadmap stuff (inherit one connect class from another, etc)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7756 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-19 17:04:45 +00:00
brain
df4f0dc888
Allow support for multiple dns results per request. This is a significant change and should probably not be backported to stable.
...
This will allow for a fix to feature request bug #384
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7753 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-19 16:00:57 +00:00
peavey
f2acdbc382
OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16 17:30:04 +00:00
peavey
bab14f0dd2
'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are auto skipped by svn.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16 17:14:45 +00:00
brain
42105f07dd
Fix for bug #349 : NOTE there is important caveat about this in the example config, MAKE SURE TO READ IT.
...
When you connect a cgi:irc client two different connect classes are checked at two different times (first the one
that the website they are cgi'ing from, then later one for the user's real ip). READ THIS AND UNDERSTAND IT!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7440 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-15 13:18:28 +00:00
brain
a2259e92ba
More comments
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7384 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-17 19:54:37 +00:00
pippijn
67e055124d
Some general syntax cleanups.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7304 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-14 17:22:37 +00:00