5204 Commits

Author SHA1 Message Date
peavey
0392e44ac5 Closer now, but somehow libpq invalidates the file descriptor on server shutdown leaving us in limbo.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6294 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-11 03:34:22 +00:00
peavey
84b11d497c reconnects still broken, but getting there.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6293 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 23:33:17 +00:00
peavey
be8a96afed SQLConn rewritten to use EventHandler instead of InspSocket. This is much neater and gives total control of destroy and delete of resources.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6292 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 21:00:37 +00:00
brain
0489438111 If we have a bitmask of 0 in apply_lines, dont even bother to run the function!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6291 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 17:54:43 +00:00
brain
2ba3cb83d6 Also, if the line already existed, dont OR the value in, so that if all the say, glines we receive already exist, dont bother to apply glines :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6290 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 17:47:39 +00:00
brain
1e3c3d2008 Clever stuff for applying lines (this needs testing);
When bursting, we clear a bitmask to 0.
When we receive glines etc, we OR bits in the bitmask to values of APPLY_GLINES, APPLY_KLINES etc depending on what we've received, e.g. is it ADDLINE G, or ADDLINE K.
When we ENDBURST at the end of the burst, pass the bitmask to apply_lines, rather than APPLY_ALL :)
NOTE: While not bursting, the bitmask is flushed after each gline, but this is still faster as only the line type we just added will be ORed in.


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6289 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 17:46:38 +00:00
brain
b55d5722c5 Only send snotice if the eline doesnt exist yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6288 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 17:36:05 +00:00
brain
425ab67e76 Improve speed of these, and only send out snotice if the gline doesnt already exist
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6287 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 17:34:57 +00:00
peavey
16e8b383c5 Typo
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6286 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 00:57:35 +00:00
brain
e339a87eb4 Change stats z to show volountary and involountary seperately
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6285 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-10 00:16:06 +00:00
brain
49e34a508d Comment on a lot of recently added stuff that wasnt properly documented (until now)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6284 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 22:31:19 +00:00
brain
d569a50e74 Someone forgot to make correct deps for timer.h. Fixed.
Added InspTimer::CancelRepeat(), we can use this within the Tick method to cancel a repeat so that the timer is deleted after the tick, as DelTimer isnt safe within the Tick method


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6283 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 19:15:30 +00:00
brain
65dedc3bc1 Add a call to InvalidateCache() to fix this:
[04:48] --- peavey is now known as PEAVEY
[04:48] --- peavey is now known as peavey
Second line should be PEAVEY -> peavey


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6282 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 17:21:26 +00:00
special
c2c963813b Made the real name value for /admin optional (line isn't displayed if not specified)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6281 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 13:43:12 +00:00
special
59bff82d23 Whoever added clearcache must have been asleep; they left the definition of it as cmd_admin::Handle
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6280 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 13:39:47 +00:00
special
3282cf07a1 Made m_denychans support wildcards
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6279 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 13:21:17 +00:00
peavey
f1d7e1e544 Have ConvNumeric correctly convert 0 to 0 instead of an empty string.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6278 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 04:15:10 +00:00
peavey
d3472e07a1 Revert repeat timer to old one, to make sure it only runs if list was actually being called by a user.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6277 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 02:58:43 +00:00
brain
190815df67 Add specialization for ConvToStr on a single char, return std::string(in,1) :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6276 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 02:09:36 +00:00
brain
11c5695f29 This is better, and proved working
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6275 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 02:05:01 +00:00
brain
525b7e3409 This is a bit better
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6274 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 01:36:51 +00:00
brain
8ac4e727cc Overloaded template classes for mucho improved ConvToStr speed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6273 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 01:30:51 +00:00
peavey
b239c182da TimeSyncTimer now uses repeat timer.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6272 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 01:21:47 +00:00
brain
5694565e09 Assigning a std::string var initially to "" is pointless.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6271 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 01:14:39 +00:00
peavey
9f25dfcc54 Make safelist use repeat timer.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6270 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 01:12:14 +00:00
brain
cf2d41558a Tidy up (optimize, improve) chanrec::WriteChannelWithServ
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6269 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 00:49:40 +00:00
brain
4d920e5188 Tidy up an if/then/else chain into a switch
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6268 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 00:31:52 +00:00
brain
be70931a50 Cache channel max bans value to save an O(n) loop of match() on every ban (etc) add
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6267 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-09 00:25:18 +00:00
peavey
7a9d31a463 cmd_whowas now uses the shiny new repeating timer.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6266 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 19:58:16 +00:00
brain
1f83b592ea Tweaks to mode parser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6265 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 19:13:48 +00:00
brain
2fe4636fa4 Add repeating timers, and make an hourly prune of the dns cache, otherwise a cache entry might not be cleared until a user with that ip comes back!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6264 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 18:42:13 +00:00
brain
a3bda51ef1 user->WriteServ( "371 %s :. o O ( The Inspire Internet Relay Chat Server ) O o .", user->nick);
user->WriteServ( "371 %s :      ( Putting the ricer into ircer since 2007 )", user->nick);



git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6263 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 17:07:08 +00:00
special
6b16b35520 Someone forgot to add clearcache to the makefile install (thanks AnMaster)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6262 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 10:37:57 +00:00
peavey
d85fae1a65 getpidfile was not working at all. Fix it to work as intended.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6261 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 04:13:23 +00:00
peavey
9f13269062 Move whowas containers into whowas class to avoid all cpp files including cmd_whowas.h to try and destroy the containers on fork exit.\nThis would cause a segfault when forking due to the containers destroy being called multiple times, but still allow the server to fork it's child and leave the server running.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6260 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 04:07:04 +00:00
brain
bf3acfa61d Add /CLEARCACHE, oper only command which completely purges the DNS cache -- useful if you just want to cut down on ram use at any point.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6259 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 00:18:52 +00:00
peavey
2bd5a5b5a2 Now even less leakage on add.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6258 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 00:10:19 +00:00
brain
4b75bac97e Oh, this tweak is for w00t -- rehash will remove expired items from the dns cache
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6257 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-08 00:05:55 +00:00
brain
e82913ed68 Update a comment, and touch a header just to make people rebuild stuff >:)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6256 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 22:36:42 +00:00
brain
adee2d71f5 If the result is cached, dont bother waiting for the dns timeout, release them at the next timer tick if all modules are satisfied
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6255 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 22:11:18 +00:00
brain
fe46f3c228 Document dns caching, add a "bool cached" to OnLookupComplete method in Resolver, and and add " -- cached" to end of 'looking up your host' string if their result is a cached result
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6254 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 22:01:00 +00:00
brain
2a5e6d416f And its all done and working!
(note, we still need to test cache expiry)


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6253 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 21:37:06 +00:00
brain
f1ca6c6d71 DNS caching stuff (almost done)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 21:35:25 +00:00
peavey
8d948ff975 Tidy up old MaintainWhoWas.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6251 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 21:17:41 +00:00
brain
dac672cf30 DNS Stuff - this wont work right yet, it will soon (tm)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6250 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 21:16:03 +00:00
peavey
6b9eaeba41 Move all /WHOWAS related out of core and into cmd_whowas.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6249 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 21:14:17 +00:00
brain
f9eb4c966f Fix m_testcommand which tries to use an undefined pointer as ServerInstance
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6248 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 20:08:49 +00:00
brain
9db7f13b0c Add TTL stuff to dns system (pass it to inherited objects)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6247 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 20:01:11 +00:00
brain
2458d30566 Rename all the classes in m_httpd to be HttpServer etc,
Make a copy of the request in the http client so we dont need to leave pointers hanging around in the requestor module


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6246 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 17:27:11 +00:00
brain
34f4ee851c Make this use the newer format of class Request (this module was still using the old cast-data-to-char*-and-use-getdata-method)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6245 e03df62e-2008-0410-955e-edbf42e46eb7
2007-01-07 17:16:30 +00:00