Commit Graph

27 Commits

Author SHA1 Message Date
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
b7f38c4d4a Remove some code duplications and move functions into classes
This removes ReadFile(), WriteFile(), ReadLine(), Lower() and Upper() from
Utils.h and adds CFile::ReadFile().

The biggest part of this patch fixes modules to use CFile and CString instead
of these global functions.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1311 726aef4b-f618-498e-8847-2d620e286838
2008-12-30 13:05:04 +00:00
psychon
fe86b92359 Use CSocket instead of Csock in the email module
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1305 726aef4b-f618-498e-8847-2d620e286838
2008-12-27 09:06:49 +00:00
psychon
db21f88584 Rename OnUserAttached and OnUserDetached and add OnClientConnect
OnUserAttached is renamed to OnClientLogin and
OnUserDetached to OnClientDisconnect.
This adds some new function with different arguments for the old names to cause
warnings from -Woverloaded-virtual while compiling.

This patch also adds OnClientConnect() which is called when the low-level
raw connection is established. (No SSL-handshake was done at this point yet!)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1266 726aef4b-f618-498e-8847-2d620e286838
2008-10-29 17:26:30 +00:00
kroimon
5237a24747 Use CString::Equals() everywhere.
* (CString::CaseCmp() == 0) became CString::Equals()
* (CString::CaseCmp() != 0) became !CString::Equals()
* replaced some occurrences of strn?casecmp

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1234 726aef4b-f618-498e-8847-2d620e286838
2008-09-30 15:15:59 +00:00
psychon
adcca250e1 Use the new CModule::PutModule(const CTable&) in various modules
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1169 726aef4b-f618-498e-8847-2d620e286838
2008-08-24 12:51:04 +00:00
psychon
c64d7bc108 Force a space between if, for, while and (
This was done via:
   sed -ir 's/if(/if (/g; s/for(/for (/g; s/while(/while (/g' \
        *.h *.cpp modules/*.cpp



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1030 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:08:44 +00:00
psychon
b0a1714b86 Remove useless spaces inside of braces "( stuff )"
This was generated via the following command:

  cat <file> | \
  tr "\n" "€"| \
  sed -r 's/€[\t ]*\{€/ {€/g; s/\( */(/g; s/ *\)/)/g' | \
  tr "€" "\n"

Thanks to SilverLeo for producing this mess :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1029 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:00:19 +00:00
psychon
f74ab87e19 And fix a shitload of trailing whitespaces and space / tab mixups in ZNC
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@959 726aef4b-f618-498e-8847-2d620e286838
2008-02-16 12:52:11 +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
89e907efaa Remove $Log$ which was used by CVS
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@887 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 09:20:45 +00:00
psychon
ee350ab744 Change second argument to module in OnLoad() from sErrorMsg to sMessage.
This message is always displayed when the module returns (well, screw webadmin)
and this way a module can notify the user if it loaded but something unexpected
happened.

As you might guess, no one uses this ATM :)

Proposal comes from prozac


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
2007-10-28 17:57: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
psychon
a3b405bd07 sync from my branch rev 983 and 993:
- module api change, if module fails to load it can give back an useful error message
- give a message when client doesnt supply a password when connecting
- some minor cleanup


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@803 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:42:00 +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
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
6249e41c6f Renamed md5.cpp/h to MD5.cpp/h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@468 726aef4b-f618-498e-8847-2d620e286838
2005-09-07 05:16:01 +00:00
prozacx
c52542e469 Moved GetDescription() into second argument of MODULEDEFS()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@366 726aef4b-f618-498e-8847-2d620e286838
2005-05-26 20:42:13 +00:00
prozacx
fd231e6b3a Moved CUtils::ToString() into CString class
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@249 726aef4b-f618-498e-8847-2d620e286838
2005-05-08 06:42:02 +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
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
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
0ba6b056ec Get CFile from FileUtils.h now
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@236 726aef4b-f618-498e-8847-2d620e286838
2005-05-02 22:36:50 +00:00
imaginos
d68cd90e7c fixed int32's that test against npos to string::size_type
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@105 726aef4b-f618-498e-8847-2d620e286838
2005-04-04 06:35:19 +00:00
imaginos
a564545f75 moving to standard makefile system, and cpp only extension
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@46 726aef4b-f618-498e-8847-2d620e286838
2005-03-30 18:49:14 +00:00