Commit Graph

78 Commits

Author SHA1 Message Date
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
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
acd854eb1c Remove virtual where it makes no sense
This commit actually saves memory, since some classes no longer contain a
pointer to their vtable!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1300 726aef4b-f618-498e-8847-2d620e286838
2008-12-22 17:22:34 +00:00
psychon
d254240866 Remove some unused code for ipv6 from CServer (and from CUser)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1294 726aef4b-f618-498e-8847-2d620e286838
2008-12-19 13:43:56 +00:00
kroimon
d1b3c2b94d Removed AutoCycle from core
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1191 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 11:23:57 +00:00
psychon
da8c892d4f Add a config option 'MaxJoins' to limit the number of joins ZNC does at once
This should hopefully fix a couple of 'Excess flood' problems we were having.

Thanks to SilverLeo for finally writing this :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1177 726aef4b-f618-498e-8847-2d620e286838
2008-08-29 15:06:08 +00:00
psychon
03e34ac6e6 Remove KeepNick
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1151 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 11:34:11 +00:00
psychon
13dd3996d5 Remove some unused arguments and unimplemented functions
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1146 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 10:14:41 +00:00
psychon
bf3acfe88a Remove CUser::m_bIRCConnected
CUser::GetIRCSock() != NULL is the replacement. This is a small chance in
sematics. Before this, a user only counted as connected to IRC when the 001
numeric was received. Now it already counts as connected when the connection
was established. This change doesn't hurt any of the current users of
CUser::IsIRCConnected() and so this change should be fine.

Yay, one var less ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1131 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 08:19:57 +00:00
psychon
7059bf02f6 CUser::GetIRCSock() only returns a member var, so it can be moved to the header
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1130 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 08:16:43 +00:00
psychon
86924339a3 Add some 'const' attributes to various functions
No real changes in here, only way more constness...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1129 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 08:13:06 +00:00
psychon
4a62fca388 Fix CUser::Clone() to work with salted passwords
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1128 726aef4b-f618-498e-8847-2d620e286838
2008-07-13 16:25:53 +00:00
psychon
bf2bd39769 Add supports for salted hashes to znc.conf
These changes the format of the 'Pass' config option. The old format is
still accepted. The new format is:

  Pass = plain#<plain text password>
  Pass = md5#<password hash>
  Pass = md5#<hash of password with salt appended>#<salt>#

This also makes ZNC only write configs in the new format.

znc --makeconf and znc --makepass now always generate salted hashes.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1127 726aef4b-f618-498e-8847-2d620e286838
2008-07-13 15:32:27 +00:00
psychon
13ddd325f9 Webadmin: Don't reset all channel settings submitting a user page
In r1058 the behaviour of CUser::Clone() was changed. It now also handles the
channel settings. This change breaks webadmin, because it doesn't properly
set up the channels it feeds to CUser::Clone()

This commit 'fixes' this by adding an extra parameter to CUser::Clone() which
makes it revert to the old behaviour. Webadmin uses this parameter.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1074 726aef4b-f618-498e-8847-2d620e286838
2008-05-26 15:02:09 +00:00
psychon
a77de4ea65 CUser: Save CIRCSock* instead of looking it up every time
Via profiling ZNC it was found that much CPU time was spent inside FindSockByName()
which in turn was called by CUser::GetIRCSock():

w00t volunteered to write a patch to save that pointer inside CUser and
here is the result. Thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1053 726aef4b-f618-498e-8847-2d620e286838
2008-05-13 18:18:51 +00:00
psychon
01bc68b1cb Move ChangeDir() and MakeDir() from CUtils to CDir
Those function were not modified. Only change is the name.

Those *Dir() functions really made no sense in CUtils when there is FileUtils
stuff. They really fit much better into here. I'll bet they'll make new friends
fast. I mean, why shouldn't they?
Uhm... sorry ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1044 726aef4b-f618-498e-8847-2d620e286838
2008-05-08 16:58:32 +00:00
psychon
0afd0cf5dd Support channels other than #chan or &chan
Without this e.g. +chans are changed to #+chans in CChan::CChan()
because IsChan() pretends it's sure that this can't be a channel.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1019 726aef4b-f618-498e-8847-2d620e286838
2008-04-08 08:21:40 +00:00
psychon
f9d12fb872 Fix a memory leak in CUser::Clone()
Clone() didn't free the list of servers, but instead just leaked it.

This introduces CUser::DelServers() for simplicity.

The reordering in the destructor is to fix some theoretical bugs (I bet
someone will hate me for this).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@993 726aef4b-f618-498e-8847-2d620e286838
2008-03-24 22:24:15 +00:00
psychon
5370a54012 Add DenySetVHost patch from Veit Wahlich aka cru
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@925 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:18:36 +00:00
psychon
cc20744683 Small cleanup to calling of OnBoot() for user modules
There is no reason to call it indirectly and this should also
decrease the binary size a little.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@919 726aef4b-f618-498e-8847-2d620e286838
2008-01-08 19:48:45 +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
d78369fee0 Main part is: Add disconnect and connect to *status
Other stuff included here:
- Always send the quit message when disconnecting from IRC
- Partly rewrite CConnectUserTimer::RunJob() for some de-uglification


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@874 726aef4b-f618-498e-8847-2d620e286838
2007-11-16 22:37:27 +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
c0e3f3bb03 Add JoinTries config var which sets a limit for channel join tries to avoid
flood issues. This var defaults to 0 which means 'No Limit'.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@811 726aef4b-f618-498e-8847-2d620e286838
2007-07-04 20:15:10 +00:00
psychon
b772e2664e Merged rev 838,888,890,894,899,900,902-904,926,934,963,984-989 from crox's branch:
- Changes to specfile
- define PATH_MAX and RTLD_LOCAL if not defines
- compile fixes
- SetFileName should not set m_iFD
- check for cygwin and do not use -fPIC
- replaced if ... elif with case in configure.in
- handle 437 reply code
- allow disabled channels
- use strerror() in CIRCSock::SockError()
- added GetUser() to CClient and CIRCSock
- added support for traffic accounting
- added names to timers


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@806 726aef4b-f618-498e-8847-2d620e286838
2007-05-17 19:09:17 +00:00
psychon
1fa9187be6 Revs 945-948;952-953:
- add timezone offset if server is in another timezone than the client
- add prependTimestamp
- add version number to configure.in
- write connect delay back into znc.conf


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@801 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:29:39 +00:00
psychon
f601db2cd8 merge with rev 932 psychon branch:
- module call for /me's
- timestamps for playback and query buffer
- WALLOP stuff / fix
- properly join channels _after_ namesx or uhnames were set up
- dont screw up raws on reconnect when you ran /lusers
- change default quit msg and version reply to CZNC::GetTag(false)
- change CZNC::GetTag() to point to sf.net
- kind of an rewrite for partyline, added fixed channels (this doesnt work on irssi,
		did it ever work?)
- add the timestamp support to webadmin too
- add ConnectDelay config option to avoid being killed because we connected too fast
- make znc handle usermodes correctly


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@799 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:13:17 +00:00
psychon
6a6ae0ed94 Add antiidle module and buffer WALLOPS in the query buffer
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@798 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 21:47:46 +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
70aafdee8f Moved awaynick functionality into modules/awaynick.cpp module
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@775 726aef4b-f618-498e-8847-2d620e286838
2006-09-17 22:57:28 +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
49e98202a2 Don't allow @ and . to make their way from username to nick/altnick/ident
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@704 726aef4b-f618-498e-8847-2d620e286838
2006-03-20 00:26:53 +00:00
prozacx
0dd418181a Added CUser::IsBeingDeleted() to allow for different messaging when a user is being deleted vs detaching or disconnecting
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@703 726aef4b-f618-498e-8847-2d620e286838
2006-03-19 22:44:10 +00:00
prozacx
b8c4fc760a Added a timer to ping inactive clients
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@670 726aef4b-f618-498e-8847-2d620e286838
2006-02-26 09:42:13 +00:00
prozacx
3d7bf1fce8 Delete the clients and modules before the user
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@649 726aef4b-f618-498e-8847-2d620e286838
2006-02-12 10:09:00 +00:00
prozacx
ca8247058f Added ipv6 support and multiple listen ports
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@641 726aef4b-f618-498e-8847-2d620e286838
2006-02-11 10:06:45 +00:00
prozacx
a490f62dde Renamed CUserSock to CClient
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@581 726aef4b-f618-498e-8847-2d620e286838
2005-10-15 03:55:09 +00:00
prozacx
42ab8a43cf Fixed IsIRCConnected()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@574 726aef4b-f618-498e-8847-2d620e286838
2005-10-14 19:47:04 +00:00
prozacx
fb103fa96e Fixed problem with CUserSock losing m_pIRCSock when znc jumps IRC servers
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@573 726aef4b-f618-498e-8847-2d620e286838
2005-10-14 17:46:34 +00:00
prozacx
f9afabc23e Respect AwaySuffix by starting timers in Clone()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@569 726aef4b-f618-498e-8847-2d620e286838
2005-10-12 06:57:32 +00:00
prozacx
8ac650bd25 Added an optional pointer to a client sock to skip for Put*() functions
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@563 726aef4b-f618-498e-8847-2d620e286838
2005-10-11 08:04:17 +00:00
prozacx
e3b723de5b Made multiple clients per user a config option
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@556 726aef4b-f618-498e-8847-2d620e286838
2005-10-09 23:19:07 +00:00
prozacx
b5a3cd3727 Fixed AwayNick timer and added BackNick timer
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@553 726aef4b-f618-498e-8847-2d620e286838
2005-10-09 21:47:57 +00:00
prozacx
aaec84a317 Added preliminary support for multiple clients per user
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@547 726aef4b-f618-498e-8847-2d620e286838
2005-10-09 08:40:40 +00:00
prozacx
ef1c8de55a Added concept of Admin to users
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@526 726aef4b-f618-498e-8847-2d620e286838
2005-09-24 04:29:11 +00:00
prozacx
beeace93b8 Removed GetPemLocation()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@516 726aef4b-f618-498e-8847-2d620e286838
2005-09-20 04:30:56 +00:00
prozacx
a29b4762bf Removed FindModPath()... use CZNC's instead
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@511 726aef4b-f618-498e-8847-2d620e286838
2005-09-20 01:55:36 +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
4484999c26 Added WriteConfig()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@436 726aef4b-f618-498e-8847-2d620e286838
2005-07-18 01:57:59 +00:00