6945 Commits

Author SHA1 Message Date
w00t
b669f920ea Another big commit, just to please all my fans out there.. cmd_* -> Command*. Muahaha.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8290 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 21:43:48 +00:00
w00t
8d1af47d02 3 second penalty to CYCLE.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8286 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 21:15:54 +00:00
w00t
496a38c28c Update/clarify a comment a bit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8281 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 20:27:44 +00:00
w00t
665ae74f2a Tidy up some DNS stuff more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8280 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 20:22:21 +00:00
w00t
af739bfa5f Move DNS timeouts into the UserResolver class, where they should have been (but seems to have been overlooked due to the relics of 1.0). This simplifies some stuff :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8278 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 20:09:52 +00:00
brain
f561b32be2 Minor tweak to avoid a storm of redundant read events. This isnt the fix, i dont think, but its needed anyway
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8276 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:41:34 +00:00
w00t
aa3dc8c472 Tidy up this windows ifdef. Still not sure why it's needed at all, but okay..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8273 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:30:57 +00:00
w00t
50fed3e9a6 We bloated. We're 5 lines now, not 4. :(
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8272 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:26:24 +00:00
brain
0c04ea89db Set these back to sane operation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8271 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:24:09 +00:00
brain
32bffd861f Change how the socket engines work when you addfd on an fd that already exists.
the only SANE outcome is that youve forgotten to DelFd, so it does this for you.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8269 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:09:59 +00:00
brain
1e29b89731 Remove more debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8268 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:07:23 +00:00
brain
2fd3db6bac Remove debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8267 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 19:07:06 +00:00
brain
9ecfbdd8c0 Use the new IncreasePenalty rather than directly using += on the Penalty value.
Maybe the penalty value should be private and there should be an accessor, GetPenalty()?


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8266 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 18:08:48 +00:00
w00t
e3ffe49bbe Add a 10 second penalty on failed oper-up. This may seem a little extreme, but people shouldn't be failing anyway, so I think this is a legitimate thing to do. Helps prevent brute-forcing of oper logins.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8265 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 18:05:22 +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
52a8a6d2bd Fixed ssl clients on trunk. The problem peavey was having was that before ReadBuffer was char[] now its char*. sizeof() on char[] returns its size in chars, and sizeof on char* returns 4. :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8263 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 17:59:08 +00:00
brain
1afe64600c Set penalties (documentation page listing these to come)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8262 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 17:26:46 +00:00
brain
1106ed5571 This now sets User::ExemptFromPenalty too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8261 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 17:21:03 +00:00
brain
f90bbd3813 Don't penalize any of the SA commands
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8260 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 16:19:41 +00:00
brain
a8bfe53cd4 Don't penalise /kill and /*line
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8259 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 16:18:32 +00:00
w00t
ce8eba7d4b Don't penalise PING/PONG
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8258 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:56:38 +00:00
w00t
ff8f998b2b Add penalties for WHO, INVITE, LIST, JOIN, PART.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8257 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:51:59 +00:00
brain
710689b2c4 Add penalty to /commands as extra parameter
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8256 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:51:10 +00:00
brain
ed2ca79021 Add the check for user->ExemptFromPenalty
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8255 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:33:14 +00:00
brain
2311a4b6f7 Move some stuff around so the last penalty line doesnt get held erroneously until data arrives again
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8254 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:30:58 +00:00
brain
773afbfe3b Set cmd_nick to have a penalty of 3
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8253 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:26:25 +00:00
brain
56787e7dae Tweak so that commands with larger penalty than 1 work right
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8252 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:25:25 +00:00
brain
317c0288c8 Yay, all works!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8251 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 14:18:43 +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
w00t
fd37f4ba0e CHange Penalty to be set in constructor, and to default to 1
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8249 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:58:01 +00:00
brain
5471a3d5f7 Dont forget to initialize the new value
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8248 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:56:44 +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
b80d1be349 Penalty should be 'const int'. Note, you can set a const in the constructors init-list, see line 109
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8246 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:52:42 +00:00
w00t
804fee1b54 Add int Penalty to Command. At the moment, nothing uses this, and constructor doesn't set it - I'll fix that up shortly. This is so Brain can use it in his gubbins without the source tree being broken. :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8245 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:50:58 +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
brain
efec4e0e08 Change a !string.length to string.empty. these are more readable and on some implementations faster
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8243 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:29:48 +00:00
w00t
e51d2a73ea Subtract a boobie
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8242 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:23:35 +00:00
w00t
4487dde76f Remove next_call garbage.. It didn't really do much more than obfuscate things. InspIRCd::DoBackgroundUserStuff() is now called once per second, roughly. This will (of course) not be going into 1.1.x
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8241 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-21 12:22:39 +00:00
brain
7c5ab78be2 Fix here too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8237 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-20 17:36:47 +00:00
brain
b6e6289e19 Fix small memory leak (this cant theoretically happen anyway unless you remove a network interface while an ident is connecting, and then youll only leak 12 bytes)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8234 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-19 19:23:23 +00:00
brain
06f6f5333a Tons of comments!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8233 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 19:02:19 +00:00
brain
8b92a8135c Oops, OnCheckReady being called after registration! This doesnt break the new m_ident, but it goes against spec
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8232 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 18:35:09 +00:00
brain
525e038f8d Fix here too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8229 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 18:26:46 +00:00
brain
08e490f706 Yay fixed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8226 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 18:22:03 +00:00
brain
8b41eadd92 Socket engine tweaks to fix a glitch, and improvements to new m_ident
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8225 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 18:16:47 +00:00
brain
0738c47225 Set IdentRequestSocket::done on failure to getsockname() in OnConnected
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8224 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 17:59:22 +00:00
brain
fdd3804828 This new ident module now seems to work rudimentarily.
Should be safe to backport to 1.1, then make look nicer in 1.2, its pretty neat as it stands though.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8223 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 17:55:51 +00:00
brain
bc2a959b4c No gaurantees this works AT ALL. do not use yet!!!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8222 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-18 17:31:01 +00:00
brain
d4d432f6cd Remove debug
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8221 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-17 20:29:15 +00:00
brain
4bd22e7be8 UID translator broken with space or comma seperated lists (thanks danieldg)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8220 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-17 20:28:45 +00:00