Commit Graph

41 Commits

Author SHA1 Message Date
psychon 74623a9e5c Fix CLockFile's fd leak
CLockFile::Close() only closed the fd if we didn't call
fork() or are the father. Fix this.

This also fixes rehashing for --disable-debug.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@955 726aef4b-f618-498e-8847-2d620e286838
2008-02-11 21:01:50 +00:00
psychon 74fb58cce5 Add --no-color switch and only use escape sequences if isatty() says so
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@926 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:27:59 +00:00
psychon 5210c3bfae Fix for OpenBSD and don't busy loop for file locks
I don't think there is a high change that the file lock becomes available
in the short time we did loop and retry the lock, so that code served no
real purpose.

Also, this includes unistd.h in Utils.h which is needed for OpenBSD.
Thanks to fred for testing on his openbsd/sparc box.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@918 726aef4b-f618-498e-8847-2d620e286838
2008-01-08 17:13:10 +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 4e0ccf8331 Change CLockFile so that it doesn't leak fds when you call Open() twice
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@891 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 09:34:49 +00:00
psychon 5993255ac3 Fix some ICC warnings found by Kuja
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@846 726aef4b-f618-498e-8847-2d620e286838
2007-09-27 21:00:08 +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 d6aab01b08 Don't try to copy from a null source
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@716 726aef4b-f618-498e-8847-2d620e286838
2006-03-26 20:45:27 +00:00
prozacx a94c26c708 Added TCacheMap
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@697 726aef4b-f618-498e-8847-2d620e286838
2006-03-17 06:57:04 +00:00
prozacx 08c221a5d6 Fixed var name
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@693 726aef4b-f618-498e-8847-2d620e286838
2006-03-16 04:50:00 +00:00
prozacx 71c5382909 Added some smart pointer classes
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@688 726aef4b-f618-498e-8847-2d620e286838
2006-03-16 00:03:08 +00:00
imaginos 626122d590 fixed wrong type being used on 64bit
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@642 726aef4b-f618-498e-8847-2d620e286838
2006-02-11 11:55:55 +00:00
prozacx a4ca68f6f4 Init fd to -1
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@608 726aef4b-f618-498e-8847-2d620e286838
2006-02-06 02:10:21 +00:00
prozacx bf1715973b Added prompt for pem file generation
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@557 726aef4b-f618-498e-8847-2d620e286838
2005-10-10 04:33:30 +00:00
prozacx 02567e4309 Changed a variable to CString::size_type for 64bit support
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@472 726aef4b-f618-498e-8847-2d620e286838
2005-09-07 07:18:40 +00:00
prozacx 0823b27f37 Moved CUtils::wildcmp() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@251 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 07:51:46 +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 511832a8d6 Moved CUtils::Trim() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@247 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 04:30:14 +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 11ae1b690f Moved CUtils::Ellipsize() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@245 726aef4b-f618-498e-8847-2d620e286838
2005-05-07 09:43:26 +00:00
prozacx 24950d24e4 Moved CUtils::Token() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@244 726aef4b-f618-498e-8847-2d620e286838
2005-05-07 09:18:56 +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 503dc56a30 Split CFile into its own files called FileUtils.cpp/h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@231 726aef4b-f618-498e-8847-2d620e286838
2005-05-02 22:33:49 +00:00
prozacx 94c5addfc9 Added optional bool param to PrintMessage() to make text bold
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@226 726aef4b-f618-498e-8847-2d620e286838
2005-05-02 05:16:35 +00:00
prozacx 3abf42228d Added GetNumInput() and sHint argument to GetInput
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@209 726aef4b-f618-498e-8847-2d620e286838
2005-04-30 11:02:10 +00:00
prozacx 6070d73763 Added GetHashPass()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@206 726aef4b-f618-498e-8847-2d620e286838
2005-04-29 08:30:41 +00:00
prozacx c6eea2aec1 Added default values for GetInput() and GetBoolInput()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@204 726aef4b-f618-498e-8847-2d620e286838
2005-04-29 00:27:45 +00:00
prozacx 79aaf3d527 Got rid of those pesky trailing whitespaces
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@203 726aef4b-f618-498e-8847-2d620e286838
2005-04-28 23:53:14 +00:00
prozacx e233decc2d Added GetInput() and GetBoolInput()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@201 726aef4b-f618-498e-8847-2d620e286838
2005-04-28 23:41:38 +00:00
prozacx b0f2874f8b Added EX_BadModVersion exception
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@187 726aef4b-f618-498e-8847-2d620e286838
2005-04-26 07:13:27 +00:00
prozacx f32fb1b3f1 Changed from checking pidfile to locking the config
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@177 726aef4b-f618-498e-8847-2d620e286838
2005-04-24 05:53:07 +00:00
prozacx 3fe14f6ed2 Added SHUTDOWN user command by way of an exception
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@154 726aef4b-f618-498e-8847-2d620e286838
2005-04-19 18:26:18 +00:00
prozacx 1873745f1f Added PrintPrompt() and GetPass() to CUtils
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@141 726aef4b-f618-498e-8847-2d620e286838
2005-04-17 23:45:23 +00:00
prozacx a9d08422f5 Added colorful printing functions
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@139 726aef4b-f618-498e-8847-2d620e286838
2005-04-17 19:05:06 +00:00
imaginos 7627ea1162 added GenerateCert
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@86 726aef4b-f618-498e-8847-2d620e286838
2005-04-03 18:45:00 +00:00
prozacx 5f09d05bbd Added MakeDir for creating dirs including parents
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@73 726aef4b-f618-498e-8847-2d620e286838
2005-04-03 05:46:18 +00:00
prozacx 3315c349a2 Removed bad version of WildCmp() and inserted the correct version of wildcmp()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@40 726aef4b-f618-498e-8847-2d620e286838
2005-03-10 06:34:19 +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