Commit Graph

1963 Commits

Author SHA1 Message Date
psychon 1fcd6a5dee webadmin: Automatically convert module arguments
This patch makes webadmin automatically open its own listening port if it gets
a port number on the command line. It also handles -noircport etc. Basically, it
handles everything. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1984 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 19:49:52 +00:00
psychon dda647dbd7 Better error message if pkg-config is not found
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1983 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 18:44:25 +00:00
psychon 10d1fa41a9 Move module templates to DATADIR
The file hierarchy standard wants that!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1982 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 16:51:17 +00:00
psychon 8e8463092b WebModules: Make PAGE_DONE imply Close()
When one now finishes a web request with PAGE_DONE, the code actively calls
Close(CLT_AFTERWRITE) which one previously had to call explicitly. This means
there is finally a difference between PAGE_DONE and PAGE_DEFERRED. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1981 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 15:54:06 +00:00
psychon c70d5da7f3 Remove some empty directory
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1980 726aef4b-f618-498e-8847-2d620e286838
2010-05-13 13:51:58 +00:00
psychon 0d8b146059 Some love for the man page
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1979 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 20:16:04 +00:00
psychon 5c713f5d2d Notes: Add some missing returns
When deleting a note via /#-<key> or listening the available notes via /#?, the
code somehow managed to add a note.

Also, this fixes checking for empty notes.

Found by tomaw, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1978 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 18:19:11 +00:00
psychon ea269948e4 Add and use new config option "Listener"
This is what each option does:

Listen on ipv4 and ipv6: Listener, Listen6
Listen on ipv4 only:     Listener4, Listen4, Listen
Listen on ipv6 only:     Listener6
Removed:     ListenPort (not used since at least 0.047)

(ZNC will only ever use Listener* by itself)

This was done to preserve the old meaning of "Listen" and "Listen6", so that
user configs don't break after update.

Thanks to DarthGandalf for thinking about and implementing this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1977 726aef4b-f618-498e-8847-2d620e286838
2010-05-10 17:45:15 +00:00
cflakes b0bc22128e Moved port/listener modifying *status commands to their own
method (UserPortCommand). This removes some previous dupe
code (HI BRIAN) and prepares for web only/IRC only port
support.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1976 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 20:22:23 +00:00
cflakes e9f8a06476 Charset module:
- Added some comments
- Fixed some places where iconv_close may have been called two times on the same
handle which apparently crashed some implementations. Woops. Thanks to x-demon
for noticing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1975 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 20:13:19 +00:00
cflakes 5e58456c84 Make webadmin show whether a Listener/port accepts IRC and/or HTTP connections.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1974 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 19:08:41 +00:00
cflakes dae195ebb0 Partly undo psychon's last commit in favor of just removing all the
setter methods. Suggested by psychon himself.
The second and more important part of this patch adds an optional
web_only/irc_only token to the Listen config setting. Using this,
you can make Listen ports listen for IRC or Web/HTTP connections
only (or for both if you don't add any of the _only tokens).
Examples:
Listen = irc_only 3000
Listen4 = web_only +3001
Listen6 = ::1 6000
and so on.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1973 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 18:55:13 +00:00
psychon 4d7690cff9 CListener: Deny changes to settings after setup
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1972 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 18:27:11 +00:00
cflakes 4947a6441f Use a better error message for browsers connecting to IRC only listener ports.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1971 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 17:51:06 +00:00
silverleo 8d432f29a3 Fixed modtcl result fetching from the interpreter.
Tcl 8.6 no longer supports accessing the result field directly,
so we now use the public getter.

Thanks to flakes for finding this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1970 726aef4b-f618-498e-8847-2d620e286838
2010-05-09 17:24:02 +00:00
psychon 8c2ee6cf82 configure: Check earlier for dlopen()
Linking against libcrypto.a apparently needs libdl, so we should check for this
before trying to find openssl's libs.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1969 726aef4b-f618-498e-8847-2d620e286838
2010-05-04 19:27:58 +00:00
psychon 83bedc10b0 Some debug output less
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1968 726aef4b-f618-498e-8847-2d620e286838
2010-05-03 17:53:47 +00:00
psychon dd8dabdfd1 WebMods: Calculate the module's web path correctly
Until now, the code checked for <moddir>/www/<mod name> and just used
./modules/www/<mod name> if the other dir didn't exist.

Now we calculate the correct path from the module's shared object's path, which
is the correct thing to do.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1967 726aef4b-f618-498e-8847-2d620e286838
2010-05-03 13:49:45 +00:00
psychon 5631a20499 Some more fun with tabs
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1966 726aef4b-f618-498e-8847-2d620e286838
2010-05-02 08:36:57 +00:00
psychon 00d0a1f01a Some more tabs and cleanup
There was some code in FileUtils.h which was added in r232 (in 2005) to znc.
It was already commented out back then which means it is commented out for
5 years already. I'm 99% sure we can safely remove that. :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1965 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 20:36:42 +00:00
psychon 586ed9802e Some more tabs gone
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1964 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 20:26:30 +00:00
psychon eee34d359b Change a bunch of tabs into spaces
At the beginning of lines, one uses tabs for indenting. In the middle of the
line, you use spaces. If you want two different lines to line up with each
other, you start them with the same number of tabs and use spaces for the rest
of the indenting in the "other" line.

Really, that's how one does it!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1963 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 20:15:01 +00:00
cflakes 729299eb67 Refuse harder and print a debug warning in case some bad code
tries to write invalid lines to the config file.
Patch by DGandalf, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1962 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 18:47:52 +00:00
cflakes 6fbba375b8 We now trim all leading and trailing spaces from parameter values passed
into webadmin/webmods. This makes sense in almost every case, be it that
users accidentally hit the space bar or try to outsmart ZNC by entering
nothing but spaces into a textbox.
By doing the latter, it was possible to trick ZNC into not starting up
again. Thanks to Redirect_ for bringing this to our attention. Another
commit that will fix the underlying problem while writing to the config
file will follow.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1961 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 18:36:05 +00:00
psychon cc6e59eacf Add and use CListener::AcceptType
This enum let's one control what kind of connections a listener will allow.
HTTP requests to an IRC-only port and IRC requests to a HTTP-only port will be
booted off.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1960 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 14:33:15 +00:00
cflakes f1285bb52e Removed an unnecessary admin check from the new traffic page.
Sorry for not noticing this earlier :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1959 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 12:07:23 +00:00
cflakes 895f077084 Added a "Traffic Info" page to webadmin. 99% of the patch have been done
by BrianC, so thanks again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1958 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 12:04:44 +00:00
psychon 8698349134 Add an alias for discon_kick
discon_kick is now called disconkick, so load that one instead when we see a
config line with "LoadModule = discon_kick".

Idea by BrianC.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1957 726aef4b-f618-498e-8847-2d620e286838
2010-05-01 11:36:42 +00:00
psychon 0a9d2391dd MOTD: Use ExpandString()
Thanks to Un1matr1x for the idea.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1956 726aef4b-f618-498e-8847-2d620e286838
2010-04-30 18:15:50 +00:00
psychon 94afb82089 Don't use "ip:port" but "ip port" for display purposes
With ipv6 addresses, ip:port just looks wrong.

Found by KiNgMaR, thanks.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1955 726aef4b-f618-498e-8847-2d620e286838
2010-04-30 10:50:33 +00:00
cflakes 9d9c9b78b2 Properly fixed the last commit. Stupid CTemplate. Stupid me.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1954 726aef4b-f618-498e-8847-2d620e286838
2010-04-29 20:00:03 +00:00
cflakes c475d6ec10 Fixed a possible segfault with empty loops in CTemplate introduced AND identified by BrianC.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1953 726aef4b-f618-498e-8847-2d620e286838
2010-04-29 19:53:03 +00:00
cflakes ee78daedd8 disconkick module: Only send a kick to channels that the client is actually joined to,
avoid massive kick spam when re-connecting repeatedly and rapidly fails.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1952 726aef4b-f618-498e-8847-2d620e286838
2010-04-29 10:31:47 +00:00
cflakes 21eeacad6a Fix revision 1949... the SORT thing obviously needs to go into <?LOOP?> and not <?IF?> OH HAI BRIAN
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1951 726aef4b-f618-498e-8847-2d620e286838
2010-04-28 23:16:00 +00:00
cflakes b165d66a36 Added some more flags to the "summary" that configure prints at the end.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1950 726aef4b-f618-498e-8847-2d620e286838
2010-04-28 23:01:18 +00:00
cflakes 65f3478469 Another patch by BrianC, building upon the previous revision,
this uses the new sort feature to sort channel tables in stickychan's
and webadmin's channel tables and webadmin's user table, also the module
names in the menu. Hooray!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1949 726aef4b-f618-498e-8847-2d620e286838
2010-04-28 22:00:26 +00:00
cflakes db8872523a Added the ability to sort template loop data based on a key.
e.g. <? LOOP name SORTASC=key ?> or <? LOOP name SORTDESC=key ?>

Patch by BrianC, thanks again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1948 726aef4b-f618-498e-8847-2d620e286838
2010-04-28 21:34:09 +00:00
cflakes af15b96fb3 Added the necessary checks for (lib)iconv in order to enable
the charset module from extra to do its thing. This has been
a pain in the ass and I'd like to thank psychon who made most
of the autofoo happen and BrianC for finding out that BSD sucks
and for testing! Yay!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1947 726aef4b-f618-498e-8847-2d620e286838
2010-04-27 15:40:24 +00:00
psychon 0c00623a09 Outsmart autoconf
When checking for libperl, evil little autoconf thought we intent to use perl
everywhere (HAHA, no!) so it went forward and added -lperl to $LIBS. Despite
this being a bad idea in general (come on, it's perl!), this also made
subsequent checks fail because the linker didn't find libperl (we reverted back
LDFLAGS to an older value after checking for perl and so the path to libperl got
lost).

Fix this by outsmarting autoconf. Let's wait for the autofail to strike back!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1946 726aef4b-f618-498e-8847-2d620e286838
2010-04-27 15:30:50 +00:00
cflakes a9c983da25 WebMods: Moved some shared/common CSS things into a global.css file that all skins (should) embed.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1945 726aef4b-f618-498e-8847-2d620e286838
2010-04-26 16:39:11 +00:00
cflakes 7d450509ed Fixed some weird code in webadmin.cpp that prevented
module arguments from showing up with the new GetParam().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1944 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:58:56 +00:00
cflakes adf6dbd75f BrianC totally pimped the del_user page.
"Yo ZNC, we heard you like deleting users so we put a delete button in your
delete user page so you can delete while you delete."


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1943 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:49:07 +00:00
cflakes 8ab18c358a Add the cool charset module to "extra". It normalizes character sets,
so if your client sends e.g. ISO-8859-1, and users on your IRC server
want UTF-8, this module can help you.
Or, the other way around, if users on your IRC server send messages
with weird charsets that your client doesn't understand, this module
can convert them to UTF-8 or something for you (as long as you know
the names of the source charsets, at least).
More explanation will be added to the wiki shortly.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1942 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 21:45:13 +00:00
cflakes ba0a25ce46 Fixed lastseen template to reflect the new user deletion confirmation page.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1941 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:43:23 +00:00
cflakes b7601d3119 Fixed GetParam call in the notes module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1940 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:37:24 +00:00
cflakes ccad15f8f9 Make del_user page look nicer.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1939 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:36:42 +00:00
cflakes 0aacfdf83c Adjusted the GetParam calls in webadmin.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1938 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 20:33:03 +00:00
psychon 0b6a69d1d4 Webadmin: Use a dedicated page for confirming user deletes
The old Javascript way didn't work when one had javascript disabled.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1937 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 14:46:45 +00:00
cflakes 316277132a WebMods: Fix cookie check and menu entry variables to use the new GetParam methods.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1936 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 14:45:22 +00:00
psychon 0a99a9f404 HTTPSock: Split up parameter access
Every function on CHTTPSock which works with request parameters now has a new
flag bool bPost which decides whether only POST or GET parameters should be
used.

This breaks everything which tries to access GET parameters, but once this is
fixed we should be pretty safe against CSRF.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1935 726aef4b-f618-498e-8847-2d620e286838
2010-04-25 14:09:23 +00:00