brain
e00b5b82db
Comments, add more detail, remove dnsqueue.h include from tons of places
...
Remove THREADED_DNS defines from all over the place
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4629 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:26:11 +00:00
brain
f44d25e8c3
Fixes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4628 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:09:07 +00:00
brain
be1e2e4ee5
Fixes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4627 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 23:07:26 +00:00
brain
e74bb16a4f
Stuff to make user host resolving use class Resolver - not tested yet
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4626 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:59:59 +00:00
brain
cc83231b94
Remove X_ESTAB_CLASSDNS, X_ESTAB_DNS now does the job of this (i TOLD w00t and om i was removing this eventually, and now i did :p)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4625 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:22:02 +00:00
brain
f368a03cf2
Remove unused vars from class DNS
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4624 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:21:16 +00:00
brain
ce9d870efa
Remove unused temp buffers
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4623 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 22:19:31 +00:00
brain
a5c9214743
Removed threaded dns (it might make a comeback some day, but as it stands its incompatible with the new OO resolver)
...
Migrated to new OO resolver, removed as much firedns craq as is safe to do so, operates over one file descriptor now and keyed against request id.
The only way to use the system is via class Resolver (so i'll need to migrate the rest of the ircd to use it)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4622 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 21:35:07 +00:00
brain
4a26a36523
This might well be the last commit to this dns resolver in its current form. With a bit of luck, we can make a better (always-threaded) one
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4612 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 12:33:13 +00:00
brain
4488e47713
The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if this works yet.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 11:46:19 +00:00
brain
4789b3f653
AF_INET -> define to AF_FAMILY, will be either AF_INET or AF_INET6
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4610 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 10:42:22 +00:00
brain
c80508b28b
Move to entirely using insp_sockaddr and insp_inaddr for socket stuff, first step on the road to ipv6 support
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4609 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 10:37:16 +00:00
brain
15a3422e9e
Missing include breaks "make clean" on the cmd_* files
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4608 e03df62e-2008-0410-955e-edbf42e46eb7
2006-08-01 10:09:16 +00:00
brain
11376014e3
Remove match/wildcmp wrapper which just casts from const char* to char*, do the cast within wildcmp and rename wildcmp to match.
...
Remove other casts by casting directly to unsigned char* first time around
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4607 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-31 12:30:42 +00:00
brain
c746f9a964
REMOTE STATS! WOOO AND YAY!
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4596 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-30 13:00:51 +00:00
brain
66ce314989
Finish off /WHO (i think it covers everything). Now has a few extra options
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4581 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28 20:44:20 +00:00
brain
28cfa7d8ae
Document <options:syntaxhints> and <options:nouserdns>
...
Change syntaxhints to seperate RPL_TEXT (prefix SYNTAX)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4578 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28 16:54:42 +00:00
brain
0caead69fb
Tidyup message.cpp, remove some really old craq.
...
Improve tidiness of new common_channels function
Add timeout value to blocking CleanAndResolve function
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4572 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28 12:15:26 +00:00
brain
95840640cb
Change all references to voodoo numbers (7, 3 etc) to the new bitwise constants for user->registered
...
Change a lot of user->fd > -1 to use the IS_LOCAL() macro
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4569 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28 12:00:25 +00:00
brain
dc8f5d02f7
Add support for syntax of commands in place of the text 'Not enough parameters' in numeric 461, where supported.
...
To support this each derived class of command_t must set the value of command_t::syntax to a non-empty string.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4561 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-28 00:13:41 +00:00
brain
a1f073f66f
Change std::pair<bool,std::string> to neater typedef "ModePair"
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4557 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-27 19:40:47 +00:00
brain
98a92e20f1
Mode merging during FJOIN with ourts==theirts. Only +k and +l have CheckTimestamp methods atm, needs to be finished by me and TIDIED.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4556 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-27 17:59:20 +00:00
brain
feb7185050
commit remainder of new mode bouncing stuff for TS based modes
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4550 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-27 02:33:00 +00:00
brain
f4d202cdbb
Add extra method to mode handler, ModeHandler::ModeSet().
...
Returns a std::pair<bool,string>.
if the bool is true, the mode is set, and the second item in the pair is the parameter set on it, if any
If the bool is false, the mode is not set, and the parameter given is returned as the second item of the pair
To be used in mode bouncing, to build a safe set of bounced modes (dont ask yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4549 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-26 21:54:36 +00:00
om
4d0cd408df
Add an ID field to Request and a GetId() method, takes const char* and returns it - Added new constructor to use it, all modules using ID should convert to the 'new' way of doing Requests, data is now theoretically depreceiated
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4529 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-23 15:32:22 +00:00
brain
69ae63ecd2
Change stats recv/send to double, so they can hold truly massive numbers of transferred bytes (they would overflow after about 6 weeks on a busy net otherwise)
...
Fix some warnings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4450 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 15:03:26 +00:00
brain
250c92805c
Change counters to unsigned long to prevent overflow to negative counts
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4449 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 14:56:47 +00:00
brain
eff5563892
Test change
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4444 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 13:50:16 +00:00
brain
40b67389a9
Add #include <sys/select.h> to select engine, we probably need it
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4443 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 13:29:06 +00:00
brain
67daf0546b
Fix typo in kqueue engine
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4440 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 12:54:56 +00:00
brain
3a6885d6a1
* Seperate out socket engines into derived classes of SocketEngine.
...
* Add a classfactory SocketEngineFactory to create a new socketengine of the configured type
* Implement configure hax to compile only the required socketengine and the base class
* Eliminates ugly defines, and is more in line with C++ ways
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4439 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-19 12:51:21 +00:00
brain
983f18f834
Tried to implement sprintf that returns std::string of any size, realized it would scale like unreal scales to ircnet (e.g. it wouldnt!) so took it back out.
...
Moved chop() functionality into userrec::AddWriteBuf and make it nicer (no strlen)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4433 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-18 21:43:37 +00:00
brain
b5788187ac
Document irc::commasepstream and irc::tokenstream
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4414 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 15:31:53 +00:00
brain
085cd4278f
Created new class irc::commasepstream.
...
Will read comma seperated lists and works identically to irc::tokenstream
It's re-entrant so we can run two of them together for JOIN
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4412 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 15:08:59 +00:00
brain
d787576389
Fix socket leak properly this time
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4405 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 13:52:10 +00:00
brain
5d18f26b6b
Fix case sensitive commands issue due to new std::string based parser, improve the craq disabled commands check that was potentially O(n) where n is the number of disabled commands (erk)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4404 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 13:02:38 +00:00
brain
0757a4a495
mass tidyup, change A LOT of stuff to const char** which was char** (such as parameters to commands in handlers)
...
which makes the new lineparser work neater with no casts. This also removes tons of casts from other locations
(all in all, ive added 2 casts and removed almost a hundred)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4403 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 12:18:29 +00:00
brain
80d1296c31
MAJOR tidy of line parser, some parts rewritten and major chunks removed
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4402 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 08:38:33 +00:00
om
c195e03e61
const the std::string reference in tokenstream's constructor
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4400 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 07:23:03 +00:00
brain
ef10f984fa
This should be faster, we read it like a stream now with GetToken until GetToken returns "".
...
The optimizations done by gcc means theres only one std::string constructor call per token, which is mmm yum.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4397 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 02:09:58 +00:00
brain
6ab0b94dce
irc::tokenstream is a token parser which using std::string and std::vector builds a list of tokens using irc parsing rules.
...
e.g.:
:arse PRIVMSG #chan :foo bar baz
becomes
a[0] = ":arse", a[1] = "PRIVMSG", a[2] = "#chan", a[3] = "foo bar baz".
*** SOMEONE *** needs to optimize this or at least verify its neatness (without making it total craq and unreadable). Feel free to mess with my code.
Any optimizations you make, run them against the COMMENTED OUT TEST SUITE at the top of main() in src/inspircd.cpp and ensure ALL output is the same
with no crashes. (note: if you comment out and build with the test suite, all inspircd will do is output test data and exit!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4396 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-16 01:40:58 +00:00
brain
5454b47bd5
Removed GCC2 checks as we havent supported gcc2 for years
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4394 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-15 17:35:31 +00:00
brain
40ef7ec1b6
3.3 -> 3.4 fix (the 3.3 stuff was actually craq)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4393 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-14 21:29:23 +00:00
brain
d4ca01f12f
Add <options:nouserdns> - defaults to off. if set to on, no user dns lookups are performed, saving resources
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4386 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-14 13:02:40 +00:00
brain
174169ac35
Rollback dns change
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4384 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-14 12:14:42 +00:00
brain
ccb1837a14
Fix dns socket leak found in stable
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4383 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-14 11:43:17 +00:00
brain
a8b71c68dd
Tiny tiny docs update, not even worth re-generating the docs for atm
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4370 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 16:15:00 +00:00
brain
7b41936ce8
Document class Resolver
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4369 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 15:35:59 +00:00
brain
d4cb72e312
Make it work:
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4357 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 12:43:55 +00:00
brain
069fa0a472
Test framework in m_testcommand, add interface
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4354 e03df62e-2008-0410-955e-edbf42e46eb7
2006-07-12 12:26:58 +00:00