Commit Graph

29 Commits

Author SHA1 Message Date
psychon
20c79083de Don't use "ip:port" but "ip port" for display purposes
With ipv6 addresses, ip:port just looks wrong.

Found by KiNgMaR, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1955 726aef4b-f618-498e-8847-2d620e286838
2010-04-30 10:50:33 +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
ec828fd081 Fix all overloaded Csock::ReadData() functions
CSocket changes the prototype, we follow.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1767 726aef4b-f618-498e-8847-2d620e286838
2010-02-18 13:16:44 +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
ade1ee5418 Add a new DCCVHost config option
If this option is set to an ip address, this one is used as the local address
for DCC connections. This can e.g. be used to "fix" DCC bouncing with ipv6
connections. Without it, this just more or less fails badly.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1647 726aef4b-f618-498e-8847-2d620e286838
2009-10-10 12:45:25 +00:00
psychon
f8178e9bc8 Fix a user-after-free bug
When a user is deleted we didn't properly clean up after it. Active DCC
connections (CDCCBounce and CDCCSock) where left laying around and at some later
point of time they used their CUser* pointer which now pointed to invalid data.

This bug is similar to the one from r1557.

Thanks to cnu, our beloved master of destruction, for finding yet another way to
make ZNC break and for testing the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1575 726aef4b-f618-498e-8847-2d620e286838
2009-07-22 16:54:52 +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
ef8b28fb68 Micro optimization
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1462 726aef4b-f618-498e-8847-2d620e286838
2009-03-31 09:04:47 +00:00
psychon
177a5d24db Include Utils.h in less headers and move some code out of the header
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1350 726aef4b-f618-498e-8847-2d620e286838
2009-01-25 20:07:14 +00:00
psychon
235b10c200 Use that new define everywhere
Now there are no uses of DEBUG_ONLY() left :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1349 726aef4b-f618-498e-8847-2d620e286838
2009-01-25 16:51:54 +00:00
psychon
08ad0291ea Happy New Year 2009 everyone!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1317 726aef4b-f618-498e-8847-2d620e286838
2009-01-01 12:22:21 +00:00
psychon
18ce52e32d Limit the maximal read buffer space that is used for every socket
CSocket caches the data read from a socket and then looks for lines in there.
If there is no line end, this buffer can grow quite large. This patch now
closes sockets if they get a huge read buffer.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1233 726aef4b-f618-498e-8847-2d620e286838
2008-09-30 14:43:51 +00:00
psychon
00fcf767a7 Keep the traffic stats more up-to-date (/msg *status traffic)
This now also adds the traffic caused by webadmin, schat and dcc bouncing
to the stats.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1183 726aef4b-f618-498e-8847-2d620e286838
2008-08-31 07:21:21 +00:00
psychon
9e6d05a0bd Remove some unneeded includes from DCCBounce.h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1106 726aef4b-f618-498e-8847-2d620e286838
2008-06-27 09:27:34 +00:00
psychon
4fd07208ab DCC bouncing: Throttle the receiving side if we can't bounce the data fast enough
It could happen that ZNC was killed by the OOM killer. This was caused by
DCC bouncing receiving as fast as possible and caching everything in memory.

This throttles the receiving side via PauseRead() and UnPauseRead().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1069 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:16:29 +00:00
psychon
e72c445694 Clean up includes
All the headers are now self-contained (g++ Header.h -o /dev/null).

Some system headers where moved to the .cpp they are actually needed in,
some of our own headers are includes less. (Especially MD5.h)

Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h
is the first file included.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:31:16 +00:00
psychon
eeec633e30 Update copyright header for 2008
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@910 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:13:07 +00:00
psychon
a09a7e79f6 Switch to the copyright headers the GPLv2 wants us to have
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@843 726aef4b-f618-498e-8847-2d620e286838
2007-09-21 18:55:33 +00:00
prozacx
0a62274975 Committing patches from crox/psychon
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@790 726aef4b-f618-498e-8847-2d620e286838
2007-03-12 06:26:54 +00:00
prozacx
6dcacaa79e Added contact info
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@752 726aef4b-f618-498e-8847-2d620e286838
2006-09-13 07:39:48 +00:00
prozacx
a9e60b43c5 Migrated away from CString::ToString() in favor of explicit constructors
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@669 726aef4b-f618-498e-8847-2d620e286838
2006-02-25 09:43:35 +00:00
prozacx
0eaf9bdc1e Wrapped TSocketManager into CSockManager
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@650 726aef4b-f618-498e-8847-2d620e286838
2006-02-12 21:00:59 +00:00
prozacx
89e5079ce9 Upgrading to CZNC::Get()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@508 726aef4b-f618-498e-8847-2d620e286838
2005-09-19 04:09:37 +00:00
prozacx
6dbb196ed7 Changed port from int to ushort
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@376 726aef4b-f618-498e-8847-2d620e286838
2005-06-01 21:01:26 +00:00
prozacx
223a660ca1 Moved CUtils::ToString() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@248 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 06:24:40 +00:00
prozacx
078bbcf019 Moved some more functions from CUtils into CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@246 726aef4b-f618-498e-8847-2d620e286838
2005-05-07 11:42:10 +00:00
prozacx
beb5b49b3f Changed all references to std::string over to CString
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@240 726aef4b-f618-498e-8847-2d620e286838
2005-05-05 18:11:04 +00:00
prozacx
2f7d06db1c cout not cerr
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@75 726aef4b-f618-498e-8847-2d620e286838
2005-04-03 05:47:50 +00:00
prozacx
538d3ece4e Initial revision
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2 726aef4b-f618-498e-8847-2d620e286838
2004-08-24 00:08:51 +00:00