3194 Commits

Author SHA1 Message Date
brain
7666e1ad84 Aaaand, correct all the obligitary typos
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4129 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:29:42 +00:00
brain
a1af610ac1 Added masking stuff.
Basically, so that we can hold user modes and channel modes in the same list, we use bitwise masking.
We have a list of handlers, 256 in size 0 through 255, and to work out where a mode handler is dependent
on WHAT it is, we use this simple hashing algorithm (no collisions can occur):
(modeletter - 65) | mask
Where mask is 128 (10000000b) if its a user mode, or 0 (00000000b, duh) if its a channel mode.
Smart, and much faster than using a map of pairs.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4128 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:27:05 +00:00
brain
6b9d3c568d Added hashing stuff to hold both user and channel modes in the watcher/handler list
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4127 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:24:46 +00:00
brain
ace3781303 Mode parser WORKS! (for simple non-parameterized channel modes)
Tested with channel mode +s.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4126 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 15:04:36 +00:00
brain
182efa70e5 Dummy framework to insert the class for channelmode +s
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4125 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 14:35:33 +00:00
brain
2d05d8bc33 Header for cmode_s.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4124 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 14:31:05 +00:00
brain
4cb72aee73 Added cmode_s, skeleton mode handler for channel mode +s.
The naming convention for this dir is as follows: cmode_* -> channel modes
umode_* -> user modes.
Case sensitive mode letters on the end of the name such as cmode_s etc. Note,
this dir can only hold the core RFC modes, so we won't get name collisions e.g.
S and s.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4123 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 14:22:55 +00:00
om
598aedf098 More stuff for m_pgsql in, provider-side API stuff semi-done
Add m_sqlv2 header for the new API

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4122 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 13:36:11 +00:00
om
56ded38a45 change std::string's to const std::string references for *Feature() funcs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4121 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 13:34:10 +00:00
brain
13153694df Added InspSocket::WantWrite(), InspSocket::OnWriteReady() and private data methods to make it work.
See the XXX'ed section for a bit of minor craq


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4120 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 00:18:14 +00:00
om
7e709ca655 modules.*: Put some void* back to char*, sorry if they were only like that because of me... :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4119 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-07 00:16:28 +00:00
brain
88e6af302d Add pippijn under code contributors for m_connflood
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4115 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-04 10:38:47 +00:00
brain
0a6acf08c6 Added docs for conflood
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4114 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 20:39:12 +00:00
om
cba550cb97 Change InspSocket's private members to only be protected, I couldn't find any other way to do this before we get around to rewriting the socket engine.
Commit very first, very alpha, not-very functional version of the PostgreSQL module. It compiles..and that's..err..about it

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4112 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 16:39:09 +00:00
brain
7a942b70bc Someone made silence require 1 parameter, so no way to list the silence entries :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4111 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 16:02:44 +00:00
brain
2e328fd5fa Add m_connflood, pippijn's connect throttle module (now we are offering another paid unreal feature for nothing :p)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4109 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 15:34:06 +00:00
om
c8afadf939 Cleanups, change ugly if(\!*line.c_str()) to if(line.empty()); remove some craq..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4107 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 12:56:31 +00:00
om
b46b5f9525 Just to be really anal, typo fix in comment
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4106 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 12:43:02 +00:00
om
3bda9dcca8 Typo fixes to all the others too =/
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4104 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 12:39:36 +00:00
om
04d3c5908a Make spanningtree compile again >_<
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4103 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 12:30:22 +00:00
om
2a6bfde6fe Typo fix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4102 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-03 12:28:38 +00:00
brain
93150cc773 Enhance with new numerics for latest turkish moron detection
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4100 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-02 14:52:31 +00:00
brain
dc42f264d7 relocate the Move* methods to private: where they belong, rename erase_factory and erase_module to be more appropriate EraseFactory and EraseModule methods
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4098 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 15:07:09 +00:00
brain
75eb9178d5 Make WritePID a public function of class InspIRCd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4097 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 15:01:32 +00:00
brain
55de6781e0 Move SetSignals(), Start() and DaemonSeed() into private methods of class InspIRCd, move MakeLowerMap() into private: section
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4096 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 14:56:33 +00:00
om
903dbea2b1 Change WriteChannelWithServ and it's _NoFormat to take a const char* servername rather than char* - although it doesn't seem to be used :<
Lose some more casts in m_spanningtree, unneeded because of above changes
Make xline_set_creation_time() take const char* rather than char* for it's first parameter, lose more casts in spanningtree because of this
Make do_whois take a const char* rather chan char* nick, lose yet more casts

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4095 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 14:40:53 +00:00
om
3cf1ae0470 Replace rather craq'y loop with a couple of std::string calls
Change GetServerDescription to take const char* rather than char*
Change userrec::server from char* to const char*, this is more 'correct' as it's not safe to modify it (pointer as returned by std::string::c_str())
Change WhoWasGroup::server, see above about userrec::server

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4094 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 11:42:09 +00:00
w00t
a3a9d3e0f0 forward port of r4092
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4093 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-01 10:28:42 +00:00
brain
98c703511c Tweak to IS_LOCAL macro to exclude invalid fd's that are > MAX_DESCRIPTORS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4091 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-30 18:20:27 +00:00
brain
e5c8ee880b *** Interesting fix ***
When a remote kill occurs, the user record for the remotely killed user may still hang around in the servers user list which is used when removing users during a netsplit.
I managed to duplicate the old 'crash on netsplit' bug by sending a remote kill to a server, and then squitting that server without receipt of the corresponding QUIT.
The fix now removes the user record explicitly upon remote kill (this also includes collisions)


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4088 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-30 17:54:48 +00:00
special
9fc81392b3 Forward port of CullList and my bragging rights
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4087 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 15:35:42 +00:00
om
63a3d49a01 And add the include to make all the modules compile...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4085 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 15:01:28 +00:00
om
042de68ee5 This already adds the file and line number itself, call do_log() rather than log() then
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4084 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 14:23:35 +00:00
om
e0e96f0124 You don't need to cast a char* to a char* to put it through a const char*...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4083 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 09:33:44 +00:00
om
6fa94ee369 Remove hardcoded filename prefix to log message, with the new macro these are un-needed.
Remove un-needed cast, ffs guys, templates stop you needing to cast the stuff inside them... So why do you do it anyway? :<

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4082 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 09:29:14 +00:00
om
7c0a77920d Change log() to a #define, the real symbol is now do_log(), the new macro auto-prefixes all log messages with the file and line number where log() was called - should be nice for debugging and telling wtf is coming from what.Currently uses a (probably very standard) g++ extension to make the macro work. Shouldn't be an issue.
You must make clean and rebuild all of insp.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4081 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 08:30:25 +00:00
om
4a58726d8b Convert char* to const char* in InspSocket constructor prototype. Shouldn't break anything but ought to help lose some ugleh casts... >:)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4080 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-29 07:00:25 +00:00
special
fea0e87ae8 Added missing return in Server::UnpublishFeature()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4079 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-28 15:20:25 +00:00
special
b28e63cdf3 Added SQLQuery::GetError() and removed a lot of space indenting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4078 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-28 15:17:05 +00:00
brain
b254d3d034 More stuff for allowing hostnames in <bind> and <link> again - note there is a FIXME here.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4076 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-28 10:59:47 +00:00
brain
4d394250d9 Allow binding to hosts again in <bind> and <link>
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4074 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-28 10:53:02 +00:00
brain
a5d5953824 Add m_services_account
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4072 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-27 23:12:30 +00:00
brain
f4522a5749 Commenting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4069 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-27 20:58:49 +00:00
brain
8a8d0540aa We can re-enable special's security fix now - note this is good for boxes with one or more static ip's and still doesnt resolve the issue for smelly dynamic-ip users (well boo hoo :p)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4066 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-27 17:57:01 +00:00
brain
c55f9831ab Added auto-binding, picks the first ip in the <bind> tags that isnt localhost or INADDR_ANY, and auto binds to that IP to allow us to put back the security tweak
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4064 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-27 17:45:59 +00:00
brain
1805486ae5 Temporarily disable special's security improvement until we have either/or bind= and mask=
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4063 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-27 17:09:41 +00:00
brain
2ce729c003 Extra safety for user lists to not keep bad pointers hanging about
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4059 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-25 00:16:24 +00:00
brain
afcdca0670 Dont allow /REMOVE of a uline, dont allow /REMOVE of a user who isnt on the channel (*slaps* Om)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4057 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-24 18:00:28 +00:00
brain
7b0fcbfc06 Forwardport of safety fixes for Write* functions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4056 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-24 14:43:36 +00:00
special
72e17538de Forward port of samode edits
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4054 e03df62e-2008-0410-955e-edbf42e46eb7
2006-06-23 14:46:10 +00:00