Commit Graph

95 Commits

Author SHA1 Message Date
Alexey Sokolov a06b6495e8 Revert "Rewrite the JOIN channel logic, dropping MaxJoins"
This reverts commit db7c47f97d.

Too many joined channels at once started to cause disconnect because of
"Max SendQ Exceeded", which is not much better than previous Flood.

Now MaxJoins is 0 by default, which preserves the current behavior of
joining all channels at once. If someone experiences those disconnects
due to SendQ, they can tune MaxJoins.

Fix #329

Conflicts:
	include/znc/User.h
	modules/controlpanel.cpp
	modules/webadmin.cpp
	src/User.cpp
2013-06-09 23:39:10 +04:00
Alexey Sokolov 99895c77df Rewrite printing timestamps in znc -D
Previous commit doing it was 0f739de2c0
2013-06-04 23:13:17 +04:00
Ravomavain 10a982b6d3 Add CString::StripControls to strip controls (Colors, C0) from strings 2013-05-20 12:23:32 +02:00
Ravomavain 0c37fb1858 Add EDEBUG to CString::Escape function to escape debug output. 2013-05-12 12:22:26 +02:00
Alexey Sokolov 6569508522 Merge commit 'refs/pull/306/head' of github.com:znc/znc 2013-05-12 08:59:01 +04:00
Elizabeth Myers f578bf9424 Implement DH-AES encrypted password scheme.
This is superior to DH-BLOWFISH as Blowfish may suffer from certain
classes of weak keys, which is difficult to mitigate against without
regenerating DH parameters repeatedly. AES also has faced far more
scrutiny and is believed to be more secure.

Reference implementation (services-side):
https://github.com/atheme/atheme/blob/master/modules/saslserv/dh-aes.c
2013-04-16 05:39:10 -05:00
Alexey Sokolov 9f4f2817d1 Fix #293
In GetAvailableMods() modules paths were returned like "moddir//module.pm",
but when they are loaded, they use path "moddir/module.pm".

Because of that our hack of cleaning %INC when the module is unloaded,
which enables UpdateMod, removed wrong record from %INC, left right
record in it, and erased the module's namespace.

When the module was loaded again, the namespace was not restored,
because "require" didn't load the module, because it was still in %INC.

So, when we call a function of that module, the function does not exist
anymore.
2013-03-16 23:35:19 +07:00
Uli Schlachter 53c579b296 CJob: Add a way to do stuff on the main thread
This just moves the pipe from the socket code to the thread pool. However, now
all CJobs can use this and there is a single place for them to get deleted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15 11:58:27 +01:00
Uli Schlachter 75f2e3fa41 Add a generic threads abstraction
This should make it easier to work with threads. It provides classes for mutexes
and condition variables. Additionally, there is a special CMutexGuard that
automatically unlocks the mutex on destruction and a CThreadPool class.

This thread pool is used to replace the thread pool in the sockets code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15 11:58:22 +01:00
Ingmar Runge ea94795646 HTTPSock: Gzip compression for static files (text/* mime types + files
with .js extension) and dynamic HTML responses (if gzip is available and
the compression method is supported by the requesting HTTP client).
2013-03-08 09:49:45 +01:00
Un1matr1x 3a34593359 The same procedure as last year, Miss sophie?
Same procedure as every year, James.
2012-12-31 12:44:31 +01:00
Alexey Sokolov 4036114975 Add CModule::ExpandString()
It chooses which ExpandString() to call, of user or of network.
2012-11-23 21:40:30 +07:00
Alexey Sokolov 94cce5ae38 Update Csocket, fix #254 2012-11-21 00:53:39 +07:00
Alexey Sokolov 071801a65d Increase the version number to 1.1 2012-11-07 01:33:45 +07:00
Alexey Sokolov 73b2daf24d Increase the version number to 1.0 2012-11-06 22:41:24 +07:00
Alexey Sokolov b5102355cb Add a way to move networks between users.
It should help for migrating old multiuser setup to new multinetwork
one.

Fix #217
2012-09-30 16:23:50 +07:00
Alexey Sokolov 9b2898f603 Implement setting "Max number of networks" for user.
Fix #226
2012-09-20 01:24:47 +07:00
Alexey Sokolov 39ba5f28ea Fix errors on cygwin (more proper fix) 2012-08-19 16:14:17 +07:00
Alexey Sokolov c06db11513 Revert "Fix few errors on cygwin."
This reverts commit b77e697273.
2012-08-19 16:10:32 +07:00
Alexey Sokolov b77e697273 Fix few errors on cygwin.
I hate timeval...

Thanks to Lizzy Eilson for reporting this.
2012-08-19 15:25:09 +07:00
Alexey Sokolov a4d99e2726 Fix compilation.
These lines are not needed.

They even fail to compile on some compilers.

Thanks to Han` and fred for reporting this.
2012-08-15 19:39:22 +07:00
Alexey Sokolov a6716486c9 Fix modperl startup.
User.h and Utils.h should not depend on each other, and instead of name
of default method need to have a function in CUtils, which hashes using
default method (such function is in CUser now)
2012-08-15 03:03:55 +07:00
Alexey Sokolov 9fd4149d73 Fix modperl and modpython compilation.
Also fix few string-related inconsistences.
2012-08-15 00:38:23 +07:00
Kyle Fuller 67299ebfa8 Fix a bunch of conversion warnings #197 2012-08-14 19:31:14 +07:00
Alexey Sokolov 8360e906d5 It was bad idea to set *macEXITER to false inside MODULECALL :(
There're places where it's initialized to true before calling
MODULECALL.
2012-08-12 03:12:42 +07:00
Alexey Sokolov 27aa7036f5 Fix #117 2012-08-10 19:32:27 +07:00
Alexey Sokolov d37cb447a0 Use gettimeofday instead of clock_gettime.
POSIX.1-2008 deprecates gettimeofday...
So perhaps it will be changed back in future.

For now gettimeofday is more portable :(
2012-08-09 00:37:16 +07:00
Alexey Sokolov 44b382c6fc Update server-time implementation to match new standard. #181 2012-08-05 09:45:48 +07:00
Kyle Fuller 721d603383 Support messages directed to specific user prefixes
Closes #195
2012-07-28 00:07:46 +07:00
Alexey Sokolov 62c9ac1a0b using in headers is evil :( 2012-07-26 20:46:11 +07:00
Alexey Sokolov a131127770 Show commit id in version for git builds. 2012-07-21 23:27:53 +07:00
Alexey Sokolov cebc093254 Per-network bind hosts.
Fix #147
2012-07-19 00:59:41 +07:00
Kyle Fuller 981963a41e Don't send our password required notice until after CAP negotiation 2012-06-28 21:15:12 +01:00
Alexey Sokolov 27f42d1118 Rename (non-) KeepBuffer to AutoClearChanBuffer.
It should be a less confusing name...
2012-05-09 22:32:12 +07:00
Alexey Sokolov ff0a8bc94e Fix compilation of timestamps in -D
On some architectures time_t is not the same as long int.

Thanks to fred for reporting this.
2012-05-04 22:44:31 +07:00
Alexey Sokolov dc8cdd40de Make debug lines a bit smaller.
Well, a byte actually, not bit...
2012-04-14 19:07:11 +07:00
Alexey Sokolov 3e458a98e4 Merge some work by Jens-Andre Koch
Only his changes to the core are presented here.
Unfortunately, the skin itself looks ugly on Opera,
and simply doesn't work on Firefox...

Merge branch 'master' into znc-ation

Conflicts:
	modules/data/lastseen/tmpl/lastseen_WebadminUser.tmpl
	modules/data/webadmin/tmpl/settings.tmpl
2012-04-10 23:19:15 +07:00
Alexey Sokolov 28f6809af8 Webadmin: edit listen ports 2012-03-31 06:48:24 +07:00
Alexey Sokolov 95053f4db4 Increase the version number to 0.207 2012-03-29 23:28:25 +07:00
Jens-Andre Koch 92ec938150 Added Webskin "znc-ation" 2012-03-28 12:24:27 +02:00
Alexey Sokolov 30b99d58f3 Show list of timezones in webadmin. 2012-03-23 01:16:25 +07:00
Alexey Sokolov 1d4d657e23 Deprecate TimezoneOffset 2012-03-22 23:21:25 +07:00
Alexey Sokolov f0cab46c3f Merge https://github.com/znc/znc/pull/78 (TZ)
Conflicts:
	modules/admin.cpp
	src/User.cpp
2012-03-22 22:58:46 +07:00
Alexey Sokolov 355d5feb7a Move TZ-related code to own place. 2012-03-22 22:20:41 +07:00
Alexey Sokolov e83efead26 Nicify webadmin interface for flood protection. 2012-03-22 13:22:13 +07:00
Alexey Sokolov 19dff7cded Remove decl of func whose definition was removed. 2012-03-22 12:19:45 +07:00
Kyle Fuller 6999c8222d ResetJoinTries once we enable a channel
Fixes #83
2012-03-21 22:25:45 +00:00
Kyle Fuller db7c47f97d Rewrite the JOIN channel logic, dropping MaxJoins
Instead we fill the JOIN line up with as many channels as we can fit in
an IRC line. Rate limiting is done per command now, making MaxJoins
unnecessary.
2012-03-21 22:06:54 +00:00
Alexey Sokolov fb2b5193bc Show link to http://znc.in from web 2012-03-22 04:27:26 +07:00
Alexey Sokolov c98abf00a5 Implement protection from flood.
For ZNC-server connection
2012-03-21 19:48:26 +07:00