1751 Commits

Author SHA1 Message Date
brain
9bca438482 Add security:genericoper as requested by Strawberry and TwinShadow.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11098 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-13 09:21:30 +00:00
brain
2841f55d4b Fix some stuff for nationalchars
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11058 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-08 16:56:07 +00:00
brain
89249e32fc Patch for bug #704 by Darom, allows for 64 bit file offsets, so that signal 25 isnt raised if there is a 2gb logfile (really, WATCH YOUR LOGS)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11035 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-06 23:48:25 +00:00
psychon
5de0f22264 Fix the poll socketengine to actually work.
The old implementation tried to use holes for unused entries in the array for
poll() and the OS replied with POLLNVAL to which we replied with 100% CPU.
Improvements:
- It does compile!
- It works


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11008 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-27 18:37:23 +00:00
peavey
ca571fc1bf fix typo
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10995 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-24 13:31:09 +00:00
brain
0b44d28a31 Templateise this
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10991 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-23 13:40:24 +00:00
brain
a3fb932831 Fix m_nationalchars using a copy and paste of my unsafe copy and paste algorithm, that will lock up if the string to replace contains the string to search for.
Finally make this function a core utility function and remove the copies from 3 modules m_alias m_nationalchars and m_sqlauth


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10990 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-23 13:20:57 +00:00
w00t
4e1ae0981e Remove an unused event.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10989 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-23 12:58:28 +00:00
w00t
5f5ed857af Fix bug 688, reported by Ankit: extended invexes don't work correctly at all. Thanks very much for your help tracking this down :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10988 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-23 10:16:51 +00:00
peavey
84af5345c1 Remove channel::created as its unused and only serves to confuse (see last commit to m_check). As a bonus saves memory usage :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10955 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-09 20:51:38 +00:00
w00t
43847ec9c7 Update copyrights for 2009.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02 18:16:05 +00:00
w00t
376a2833d9 Change a few bits to use std::list instead of std::vector.
Vector is better than list, unless:
 - you require random access (these don't)
 - you require that the memory they are stored in are contiguous (these don't)
This will save a couple of bytes here and there perhaps (along with
much less problems with memory fragmentation and allocation).

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10923 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-28 03:27:28 +00:00
dz
7f28ef9777 Minor documentation fix, spotted by Johannes13
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10902 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-21 13:44:01 +00:00
w00t
534870ed22 Remove numbers from these. They shouldn't be used anyway, enums are designed to prevent magic numbers abuse :).
Thanks Johannes13!

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10895 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-15 13:58:43 +00:00
w00t
187544bfd0 Fix naming convention to be consistant. (cmd_ -> Command)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10891 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-15 12:14:04 +00:00
w00t
275f58a955 national_case_sensitive_map -> national_case_insensitive_map.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10861 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 19:01:43 +00:00
w00t
805d47c98e Move stuff to use ASCII map where required.
Also move this out of being a member totally, as it breaks (gah) and is already untidy.. to be revisited.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10858 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 18:31:57 +00:00
w00t
6c38936243 national_case_sensitive_map must be static, thanks to the match stuff being static (this is a bit ugly, but necessary for now).
Default to national charset map instead of rfc map, as modules may change the pointer.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10857 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 18:31:54 +00:00
w00t
3c2c0b7733 Add InspIRCd::national_case_sensitive_map pointer, defaults to rfc_case_insensitive_map.
Modules may override this pointer to customise casemapping of nick/channel names.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10856 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 18:31:48 +00:00
w00t
a1ce19d1f4 Add ascii_case_insensitive_map, thanks MacGyver.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10854 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 18:31:42 +00:00
w00t
dadfb1ecc1 Rename case_sensitive_map to rfc_case_sensitive_map
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10851 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-07 01:11:48 +00:00
w00t
a23a840749 Rip flood/threshold out of config classes also.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10839 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-01 20:14:50 +00:00
w00t
be2a677ddd Remove lines_in and reset_due flood protection mechanism, recvq/sendq on their own now fill this role, as we have proper penalties.
This tidies up *a lot* of code, and also saves a further sizeof(time_t) + sizeof(unsigned int) per user.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10838 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-01 20:14:49 +00:00
w00t
9994478a85 Remove m_operflood, add privs: users/flood/no-throttle & users/flood/increased-buffers.
This also saves another sizeof(bool) per user.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10837 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-01 18:10:24 +00:00
w00t
fc7eba500a Remove OverPenalty, saves sizeof(bool) per user.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10836 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-01 18:10:22 +00:00
brain
9bddcf91ac Thread safety fixes to avoid crashes on rehash, dont reopen logs within the rehash thread. Put this in the safe part of the rehash operation, after the thread exits. Put a mutex around the part where the thread exits, just in case somehow there are two rehash threads exiting at the same time due to user
muppetry.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10811 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-22 16:54:32 +00:00
w00t
0d2b6637ca This was never supposed to be invoked on /rehash, only startup.. so move it to startup only. Also remove (redundant) user arg.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10792 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-02 14:29:40 +00:00
w00t
b15038c4c3 Obsolete m_restrictbanned, add <security:restrictbannedusers>, default on.. this is insane to leave off, really, but allow it anyway.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10785 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01 23:58:33 +00:00
w00t
78f26492a6 Second attempt at time() -> SI->Time(), now problems with the original were fixed. (SI::TIME was not initialised).
Thanks Namegduf!
(Please test, all, valdebug etc, report odd behaviour/warnings!)

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10783 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01 23:02:23 +00:00
w00t
ab65273f9f Simulate AF_INET addresses for 4in6 connections [danieldg]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10779 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01 20:20:11 +00:00
w00t
e79930ac02 Remove one (now unneeded) 4in6 hack.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10744 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-28 23:20:28 +00:00
w00t
1a738eb97e Add user/channel mode synchronisation detection to CAPAB - link will now drop if modes differ in some way (one side requires param, other doesn't, etc). Same for user modes.
This will not affect services. Side effect: Modes::ChanModes() -> Modes::GiveModeList(ModeMasks), mode list is formatted
identically for both MASK_CHANNEL and MASK_USER.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10733 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-27 22:29:56 +00:00
w00t
dcfd227ffb Fix a number of commands to have max_params field. This means in practice, that colons on gline reasons (etc) are no longer mandatory, provided the command tells the core how many parameters at max it has.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10718 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 16:41:13 +00:00
w00t
bde833f182 Add optional max_params for commands, which means that we can compress 'extra' params, while still accepting ':' terminated params, etc.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10715 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 16:41:09 +00:00
w00t
adf20f6486 Use TargetTypeFlags instead of int in a few places.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10711 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 13:14:23 +00:00
w00t
ffc0396516 As we have an enum for type, why not ..use it?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10710 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 13:14:22 +00:00
w00t
2b39234be2 Last of documentation for protocol interface. XXX, ProtocolInterface::GetServerList is quite poorly documented.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10709 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 12:59:14 +00:00
w00t
4d03a38661 Document SendMode.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10708 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 12:59:13 +00:00
w00t
b76777dfb4 Document SendTopic.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10707 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 12:59:13 +00:00
w00t
8e735c8f3a Document SendMetaData.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10706 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 12:59:12 +00:00
w00t
2be4fff3e3 Document ENCAP.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10705 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 12:59:11 +00:00
w00t
30b7a1bf7f (sort of..) Revert commit 7736e920fe6ccaf9ad1984afc70db19efd4fb8cd - remove dupe checking on connect classes. Now, we just delete ones with refcount 0 on rehash, and add new ones. Connection can only match a non-disabled class, so most of the braindamage should be gone from here, without causing wild pointer fun..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10701 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-25 10:17:53 +00:00
w00t
1200d6285b Revert earlier time() -> SI->Time() diff for now, this causes problems with dns.cpp in mysterious ways.. seemingly a bad pointer there somehow..?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10695 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-23 21:39:00 +00:00
w00t
164998f1e6 Patch from Namegduf converting all instances (where possible) of time() -> ServerInstance->Time(). Thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10691 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-23 18:15:04 +00:00
w00t
2f1b4c7ce3 Patch from dz to fix bug 622 (config errors build up from /rehash to /rehash), thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10690 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-23 18:07:07 +00:00
w00t
32a619dbea Implement <security:runasuser> and <security:runasgroup> - allows for set(g|u)id to drop privs after starting, which can be useful for people who want to bind privileged ports without exposing their anus to a giant cucumber.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10682 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-20 22:12:52 +00:00
brain
db3eea2ac4 Default 'noisy' to false. Until i hear from w00t i cant see how this can be of use right now (non-opers get spammed with crap just from doing regular things like joining channels)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10678 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18 19:13:25 +00:00
w00t
0d3ecb9642 Working privs implementation, and example usage in NOTICE for mass messaging.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10662 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18 16:52:48 +00:00
w00t
f432839202 Migrate oper commands to an std::set, add a set for privs also. Change the API a bit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10661 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18 16:52:46 +00:00
w00t
ca42e17535 Add skeleton of HasPrivPermission.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10660 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-18 16:52:44 +00:00