Commit Graph

100 Commits

Author SHA1 Message Date
Alexey Sokolov 2f853bee61 A bit more debug output for tdns 2012-03-24 00:36:13 +07:00
Alexey Sokolov 4865a2da0c Serve web pages as utf-8 2012-03-23 11:53:20 +07:00
Alexey Sokolov 9b3a764a6c Use XHTML 2012-03-23 11:14:29 +07: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
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
Kyle Fuller 38ce17906c Don't forward WHO replies with multi-prefix to unsupported clients 2012-03-21 15:23:16 +00:00
Alexey Sokolov c98abf00a5 Implement protection from flood.
For ZNC-server connection
2012-03-21 19:48:26 +07:00
Alexey Sokolov 3aa6b581fc Csock: able use non-int number of secs for timer.
This patch happened in upstream csocket too, so update won't break
anything.
2012-03-20 09:03:44 +07:00
Alexey Sokolov 819776873d Add SSL/IPv6/DNS info to znc --version 2012-03-15 01:38:37 +07:00
Alexey Sokolov ddb1af86fd Ask for port > 1024 in --makeconf
There're so many people who try lower ports and get permission denied :(
Who really wants to use privileged port, can add it using /znc addport
2012-03-10 08:24:19 +07:00
Kyle Fuller aa9a629bf3 CString("off").ToBool() shouldn't be true 2012-03-06 18:00:43 +00:00
Kyle Fuller f44b7fc7c4 Clear channel buffers if keep buffer is disabled and we're online 2012-03-06 17:55:14 +00:00
Kyle Fuller c54b3d0b87 webadmin: Implement clone user
Closes #127
2012-02-24 17:26:04 +00:00
Alexey Sokolov 7ac61474ed ZNC-Extra no more.
Few the most useless modules are just removed, the others are moved to
standard modules.
2012-02-21 19:34:36 +07:00
Kyle Fuller 11e5f7636d Add 381 to the buffer (You are now an IRC Operator) 2012-02-19 14:39:03 +00:00
Uli Schlachter 1dd8d9bf3e Block all signals in DNS threads
A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:26:19 +01:00
Uli Schlachter 252e6d7151 Threaded DNS: Handle spurious wakeups
As DarthGandalf noticed, POSIX allows spurious wakeups from pthread_cond_wait.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:13:25 +01:00
Kyle Fuller 8863d853c9 Allow disabling the use of adding networks for non admins
Closes #122
2012-02-15 16:27:47 +00:00
Kyle Fuller b9ff3ddcb1 The connect queue shouldn't be unpaused when ZNC starts 2012-02-14 19:34:02 +00:00
Kyle Fuller 59ad967d77 Merge branch 'queue' 2012-02-14 19:32:03 +00:00
Uli Schlachter 0bdb18a427 Threaded DNS: Use a thread pool
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.

To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.

Fixes #132.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-14 20:28:28 +01:00
Kyle Fuller 30fb68023b Pause connect queue should pause and resume a timer
So we don't cheat the connect delay
2012-02-14 19:22:50 +00:00
Kyle Fuller e47f76db6c Allow the connection queue to be paused 2012-02-14 19:22:33 +00:00
Kyle Fuller ec1202daf3 {unload,reload}mod: Don't get modinfo if the type is defined
This allows us to unload a module if we supply the type and mod info
cannot be loaded (such as if the module file has been moved).
2012-02-14 12:10:07 +00:00
Kyle Fuller e08d53dcd5 Show network modules on the web interface menu
Closes #121
2012-02-13 23:58:32 +00:00
Kyle Fuller 5c844cf81a Send nick changes to clients before we use call the OnNick module hook
This fixes a bug where sending anything to a client, such as with
PutModule will fail because it will refer to the new nick before the
client knows about it. The watch module did this.
2012-02-12 20:07:57 +00:00
Kyle Fuller b1ed9c9b74 Add methods to CModule to get the web path
Add these values to the template and use them when linking to any module
2012-02-09 17:07:28 +00:00
Kyle Fuller b1593238d5 Make the URL's for web modules include the module type (#121) 2012-02-09 14:19:26 +00:00
silverleo bb666b0ab7 Fix an Unrecoverable config error issue when reading from an old config.
Default this boolean to true incase there are no networks to loop over. This
will silently drop any network modules for the user, but since there are no
networks anyway it doesn't really matter.
2012-02-05 16:45:00 +02:00
Alexey Sokolov 47c427c39d Merge branch 'master' of github.com:znc/znc 2012-02-05 17:44:31 +07:00
Alexey Sokolov 94f785948b Check that modules are in place on start.
There're many people who forget to run "make install" and then wonder
why they can't load any module.

This should fix it, hopefully.
2012-02-05 17:41:40 +07:00
Uli Schlachter 95d6041018 Fix a busy loop with the connection queue
If connecting to a server failed without needing any time for DNS, the connect
timer would busy loop over the networks, because a network re-inserted itself
into the queue and the timer would try the network again.

Fix this by moving the connection queue to a separate instance of std::list when
the timer fires. From then on, we just iterate through that list while networks
which want to try again add themselves to the "real" connection queue instead.

We only have to make sure that any networks that are left in the old connection
queue after the timer is done get prepended to the "real" connection queue.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 19:53:03 +01:00
Uli Schlachter 1d16d1ce7d Fix a stupid bug in CUser::~CUser()
A CIRCNetwork's destructor removes the network from its associated user's list
of networks. Now that you know this, stare at the diff until you figure out the
problem. Yeah, "ouch".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:16:54 +01:00
Uli Schlachter 233897b3a8 threaded DNS: Remove an unneeded function
This inlines the function into its only caller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:15:52 +01:00
Uli Schlachter 94c7b04245 Threaded DNS: Remove TDNS mutex
POSIX actually guarantees for us that this white is atomic and thus a partial
write is not allowed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:15:52 +01:00
Alexey Sokolov b811ea83d5 Describe how to use networks. 2012-01-30 00:38:51 +07:00
Alexey Sokolov fa287ef791 Make networks a bit less confusing.
If user is connected without network, try "default" network first, if it
exists. If not, try "user" network. If it doesn't exist too, just use
the first one.

Also configs converted from old configs have "default" network instead
of "user" one.
2012-01-27 22:51:09 +07:00
Uli Schlachter 29564f1c7e CFile: Make sure errno is always set correctly
This fixes weird problems were strerror() made us print garbage.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-22 18:51:01 +01:00
Uli Schlachter beacc0180c TDNS: Fix a use-after-free-race-with-threads
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-19 19:41:21 +01:00
Kyle Fuller b447169011 Allow setting a network-specific settings the same as the user setting
Fixes #94
2012-01-17 22:01:19 +00:00
Kyle Fuller f5dbe86543 CTCP's with no values should not be passed to the client
Fixes #105
2012-01-17 21:40:14 +00:00
Alexey Sokolov 937998d4a5 Merge branch 'master' into tdns 2012-01-15 13:12:28 +07:00
Alexey Sokolov ff8065ed32 TDNS: Fix few incompabilities with last Csocket. 2012-01-15 13:11:56 +07:00
Alexey Sokolov 0a7ef76de3 Use @t=time instead of @time for server-time capability.
It's incompatible change, but it makes protocol more flexible.
Version with @time was never released anyway.
2012-01-15 12:51:03 +07:00