Commit Graph

267 Commits

Author SHA1 Message Date
J-P Nurmi
bbd84a06bf Promote server-time formatting to Utils 2014-03-02 02:01:40 +01:00
Alexey Sokolov
1c8e9b9355 Merge pull request #485 from uu1101/uriprefix
Allow serving the web interface under a subpath
Fix #480
Fix #138
2014-02-17 00:44:37 +00:00
uu1101
f6a881eeb2 Redirect to URIPrefix for paths outside the prefix 2014-02-16 12:45:10 +01:00
uu1101
c0974d9910 Don't support relative redirects 2014-02-16 12:45:10 +01:00
uu1101
4376b373d8 Prepend URIPrefix to web interface links
Prefix links in templates with URIPrefix and add the input field to the
Listener editor.

The URIPrefix is provided as a top-level template variable. All URIs
have been changed to have the prefix prepended.
2014-02-16 12:45:10 +01:00
uu1101
d796fc8312 Add prefix on redirects and strip it on requests 2014-02-16 12:45:09 +01:00
uu1101
88c85b0396 Add URIPrefix listener option 2014-02-16 12:45:09 +01:00
uu1101
d3ddb9b69d The Listener of a RealListener is never NULL 2014-02-15 14:57:33 +01:00
uu1101
7a9ce630ef Add CString::StartsWith and CString::EndsWith 2014-02-15 12:41:54 +01:00
Alexey Sokolov
b7592008af Merge pull request #484 from KiNgMaR/singleton
Allow more control over CZNC singleton
2014-02-08 18:03:06 +00:00
Ingmar Runge
ec6607ccf5 Use CZNC::DestroyInstance(). 2014-02-08 01:32:12 +01:00
Ingmar Runge
4c505946ac Patch ZNC core for more control over singleton... 2014-02-08 01:25:28 +01:00
Alexey Sokolov
17d97bba6b Merge pull request #482 from KiNgMaR/win32-file-move
work around Win32 rename() issue using native API
2014-02-07 20:48:08 +00:00
Ingmar Runge
d80e989dba work around Win32 rename() issue using native API 2014-02-06 18:06:29 +01:00
Ingmar Runge
b3021f913e squash some compiler warnings 2014-02-06 17:52:42 +01:00
Alexey Sokolov
2858da4c76 Don't create ~/.znc/modules/
It confuses people too much
2014-02-01 16:08:56 +00:00
Alexey Sokolov
225b494761 Don't reread list of TZs every time 2014-01-27 00:26:30 +00:00
Alexey Sokolov
05ca849339 Don't ask if user wants to create znc.pem or not
Sure they want!
2014-01-27 00:07:17 +00:00
Alexey Sokolov
366158d907 Add charset to version info 2014-01-25 13:50:07 +00:00
Alexey Sokolov
cfc1227171 Drop old charset module
It didn't work well with webadmin
2014-01-25 13:50:07 +00:00
Alexey Sokolov
c0a5ecb40b Add support for character encodings
Previous commit added support of it to Csocket.
When encoding is specified, core will convert incoming messages to UTF-8,
and outgoing messages from UTF-8.
When no encoding is specified, it will do nothing to bytes, like before.
This is to be changed somewhere in future, to have UTF-8 on wire by
default too.
When encoding's name starts with *, incoming messages will be treated as
UTF-8, if it is already correct UTF-8. Otherwise, it's converted.

Fix #151
Fix #366
2014-01-25 13:50:07 +00:00
Alexey Sokolov
6012cdee77 Update Csocket to e818c7b0d31b0ed71c74f9d0035b58efd73f3988
This adds support for character encodings, and decreases CPU usage in
some cases
2014-01-25 13:50:07 +00:00
Nicolas Martyanoff
f215ec602f Include the command name in ERR_INVALIDCAPCMD messages
As described in the IRCv3 Client Capability Negotiation document
(http://ircv3.org/specification/capability-negotiation-3.1).
2014-01-23 12:44:07 +01:00
Alexey Sokolov
f456b274b5 Warn users about port 6667 in --makeconf
This should decrease chance of web browsers failing to connect to ZNC
2014-01-18 12:28:38 +00:00
Alexey Sokolov
559abc3d8c Merge pull request #458 from ConorOG/issues_235a
fix #235, erroric console output, status message overwrite
2014-01-16 15:22:33 -08:00
Alexey Sokolov
e0fd211053 Merge pull request #441 from psychon/websocks-expire-oldest
WebModules: Discard sessions in LRU order
2014-01-16 15:21:27 -08:00
James Seward
07c1628d50 Trim servername in jump command
Fixes e.g. tab-completing servername in irssi
2014-01-16 20:04:53 +00:00
Conor O'Gorman
dd0ba1def4 define terminal control codes for messages, tidy, tweak ok message 2014-01-01 18:08:31 +00:00
Conor O'Gorman
2d1a632910 fix #235, erroric console output, status message overwrite
using alternative message style
otherwise ncurses/terminal codes for cursor position would seem necessary
2014-01-01 16:10:38 +00:00
Falk Seidel
f19b4caa43 Welcome to 2014 - year 10 with ZNC 2013-12-31 10:10:55 +01:00
Uli Schlachter
414fa40eb5 WebModules: Discard sessions in LRU order
Currently, znc has a limit of 5 web sessions per IP address. This limit exists
to defend against some obvious DoS attacks. When this limit is hit, some session
is discarded.

Previously, we would discard the session that std::multimap::find() would give
us. The multimap used mapped from IP addresses to sessions. Thus, we would
discard the oldest session.

This commit changes this into some least-recently-used logic. Whenever a session
is used, we record the timestamp of this. Then when a session has to be picked
for discarding, the one with the oldest timestamp is used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-12-07 20:56:27 +01:00
dgw
2b3d40a501 tweak wording of "out of networks" errors 2013-11-21 13:07:17 +04:00
Alexey Sokolov
f6b8167e36 Merge pull request #341 from cork/master
Add irc command to allow disabling channel
2013-11-14 11:24:00 -08:00
Alexey Sokolov
3e56f093f2 X-Forwarded-For: verify the whole chain, from the end 2013-11-14 22:37:36 +04:00
Alexey Sokolov
ccbc469168 Merge commit 'refs/pull/349/head' of github.com:znc/znc 2013-11-14 08:27:50 +04:00
Alexey Sokolov
c74344f783 Fix error message for invalid network name 2013-10-20 17:51:43 +04:00
Alexey Sokolov
11efcee422 Merge commit 'refs/pull/422/head' of github.com:znc/znc 2013-10-20 17:42:45 +04:00
Ingmar Runge
7a1b725958 whitespace fix 2013-10-18 21:03:20 +02:00
Ingmar Runge
b5c898eaff modules: add OnAddNetwork, OnDeleteNetwork hooks. 2013-10-18 20:35:21 +02:00
Alexey Sokolov
d16ab96032 Fix saving config on cygwin
It failed always on some installations
2013-10-15 22:04:21 +04:00
Toon Schoenmakers
98ceafb1ba Replaced the GetNick().Equals() with NickEquals() where possible
Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 22:35:49 +02:00
Toon Schoenmakers
9166f5a250 Renamed IsNick to NickEquals
Also added a TODO to add proper IRC case comparing.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 18:36:03 +02:00
Toon Schoenmakers
83b9a28e4c Implemented a nick compare function
As suggested by the todos in IRCSock, added IsNick(CString) method
so the ugly Nick.GetNick().Equals(GetNick()) could be simplified.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2013-10-10 17:22:16 +02:00
KindOne
8c6b4b8d21 Correct two typos. 2013-09-18 00:26:37 +04:00
Kyle Fuller
e7ff40f785 Fix a crash when you delete a user with more than one attached client
Fixes #403
2013-09-17 18:55:22 +02:00
Alexey Sokolov
a09d644975 Fix error message for /znc addnetwork irc.network.net 2013-09-07 16:02:50 +04:00
Alexey Sokolov
894e0a2f18 Return old fakeonline module as modules_online
It was accidentally dropped in 0.207 because of the confusing name,
it looked too much like antiidle module.

Instead, this module tells broken clients like Colloquy that *status and
*module are "online". Otherwise those clients require user to always
prepend messages to *module with "/msg *module", even if the window of
*module's query is active.

Also fix the module to support network modules
2013-09-01 22:21:11 +04:00
Alexey Sokolov
d5e03cb736 Fix support for /msg @#chan :hi
005 STATUSMSG defines list of characters prependable to channel name,
but we used simple modes instead.

See
https://tools.ietf.org/html/draft-brocklesby-irc-isupport-03#section-3.16

Fix #272

Thanks to grawity for the link to 005 docs draft, and to carrot for
testing the patch.
2013-08-29 22:31:25 +04:00
Martin Nowack
eda4426085 Request secure cookie transmission for HTTPS
If cookies are not marked as secure, they can be sent
back by the client on unencrypted channels, disclosing
information. With this fix, clients are requested to
send cookies back on a secure channel in case HTTPS is
used.
2013-08-01 15:14:54 +02:00
Lunatrius
4368c189f7 Fixed double forward slashes and incorrect active module highlighting. 2013-07-01 17:30:32 +02:00