Commit Graph

18 Commits

Author SHA1 Message Date
cflakes
f4b4eafc74 Removed the mis-use of the fake module concept in WebMods.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2011 726aef4b-f618-498e-8847-2d620e286838
2010-06-06 11:41:31 +00:00
psychon
635fb4bc00 Update to latest Csocket
This adds Csock::ConvertAddress() which produces printable addresses. We use
this function in CZNCSock to strip away 4in6 prefixes (e.g. ::ffff:127.0.0.1).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1930 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 11:17:42 +00:00
psychon
a7d26bb598 Fix a crash bug in WebModules
WebModules use CHTTPSock for the HTTP server. That class requires a CModule
instance for working since it's based on CSocket. This was solved by creating a
fake module instance which is destroyed when the socket is destroyed.

The problem here was that CSocket's destructor tried to access that module
instance which was already destroyed resulting in a use-after-free.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1824 726aef4b-f618-498e-8847-2d620e286838
2010-03-10 19:16:38 +00:00
psychon
f72e2f8abd Remove --disable-modules
ZNC without modules is like rain without being inside,
you really don't want that!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1794 726aef4b-f618-498e-8847-2d620e286838
2010-02-25 12:29:40 +00:00
psychon
1d88f564dc Fix a bunch of style suggestions from cppcheck[1]
Thanks to DarthGandalf for this patch. You must be bored. :P

[1] cppcheck.sf.net


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1776 726aef4b-f618-498e-8847-2d620e286838
2010-02-19 16:21:07 +00:00
psychon
f0d125a3a3 Revert r1765
This breaks traffic stats. Thanks to flakes for noticing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1773 726aef4b-f618-498e-8847-2d620e286838
2010-02-18 17:07:50 +00:00
psychon
b7450b0b21 Remove CModule::m_bGlobal
This one is partly due to cppcheck, too, because it warned that one of CModule's
constructors didn't initialize m_bGlobal.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1765 726aef4b-f618-498e-8847-2d620e286838
2010-02-18 12:51:59 +00:00
psychon
5202e315ee Socket.cpp: Add missing #ifdef _MODULES
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1736 726aef4b-f618-498e-8847-2d620e286838
2010-02-05 16:05:25 +00:00
prozacx
c549df9641 Moved CSocket to Socket.cpp/h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1733 726aef4b-f618-498e-8847-2d620e286838
2010-02-05 02:01:00 +00:00
psychon
1b51f15d47 Switch to Csocket's c-ares code
This removes all of znc's c-ares code and instead enables Csocket's built-in
version. That code is newer than ZNC's, but should hopefully work just as good.
Let's wait for the bug reports....


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1704 726aef4b-f618-498e-8847-2d620e286838
2010-01-10 13:20:20 +00:00
silverleo
07d7477dec It's 2010, where's my hoverboard?
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1693 726aef4b-f618-498e-8847-2d620e286838
2010-01-06 09:37:05 +00:00
psychon
8366b461e1 Fix some comment that I recently committed
Thanks to KiNgMaR.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1590 726aef4b-f618-498e-8847-2d620e286838
2009-08-07 19:17:04 +00:00
psychon
f8c78f83ef Fix a crash bug if c-ares is enabled
CSocket sometimes calls our select() wrapper with writeds == NULL and we didn't
handle this case at all which lead to a NULL pointer dereference.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1586 726aef4b-f618-498e-8847-2d620e286838
2009-08-05 19:35:09 +00:00
psychon
4fd1b09f7f Fix some startup error messages
We should *never* use exit(0); on error and it doesn't hurt if our error
messages use a similar wording.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1585 726aef4b-f618-498e-8847-2d620e286838
2009-08-01 09:06:20 +00:00
psychon
b25e65dbb6 Add a limit of 10 unidentified connections per IP
Everything which isn't a CClient with a successful login counts as an
unidentified connection in this context. Modules who don't want this kind of
limit on their listening sockets can override CSocket::ConnectionFrom(), but
their sockets will still count towards this limit.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1561 726aef4b-f618-498e-8847-2d620e286838
2009-07-10 13:27:55 +00:00
psychon
f77e526652 Add c-ares support
Every socket which is based on CZNCSock will now use c-ares for its name
resolving. This is possible thanks to CSocket's Csock::GetAddrInfo() which
lets one override the DNS lookup.

This can be disabled with --disable-c-ares.

If IPv6 is enabled and Csocket didn't specify which kind of lookup (ipv4/ipv6)
it wants, we first do an ipv4 lookup. If that lookup doesn't yield any useful
result, we try again with an ipv6 lookup. If one wants to force ipv6 usage on a
domain which also resolves to an ipv4 address, he has to set an ipv6 vhost.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1551 726aef4b-f618-498e-8847-2d620e286838
2009-06-30 09:56:01 +00:00
psychon
442aee2baf Add and use CZNCSock instead of Csock everywhere
This class will be used to implement async DNS in a later commit.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1550 726aef4b-f618-498e-8847-2d620e286838
2009-06-29 11:26:19 +00:00
psychon
65510446df Move CSockManager into Socket.h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1549 726aef4b-f618-498e-8847-2d620e286838
2009-06-29 07:50:45 +00:00