Commit Graph

420 Commits

Author SHA1 Message Date
psychon
aca6783f6f Use relative instead of absolute URLs in webadmin
This should make it possible to use webadmin together with apache's mod_proxy.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1253 726aef4b-f618-498e-8847-2d620e286838
2008-10-17 16:27:18 +00:00
psychon
f8462bffdd Fix webadmin to work with symlinks in the skins directory.
If dir is a symlink to a directory dir/.. is not the same as . which broke
webadmin.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1252 726aef4b-f618-498e-8847-2d620e286838
2008-10-16 18:11:18 +00:00
psychon
9c4a5a1d90 Some tweaking and cleaning up to configure.in
- Make it clear to autoconf that we are C++ only. It now no longer checks for a
  C compiler which might save time on some boxes.
- Honour CPPFLAGS.
- Remove some unused vars from AC_SUBST.
- Add includes to CXXFLAGS instead of using $INCLUDES for this.
- Use autoconf macros instead of 'echo' for the 'checking for perl' message.
- Fix all warnings from 'autoconf -W all'.
- Use AC_CONFIG_SRCDIR for helping configure find the source dir.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1251 726aef4b-f618-498e-8847-2d620e286838
2008-10-15 18:36:08 +00:00
psychon
133c8fcb8a nickserv: Auto-save passwords when they are set and remove the 'show' command
Passwords should be secret, so don't display them to everyone who asks.
The auto-save is there to make owine happy. ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1250 726aef4b-f618-498e-8847-2d620e286838
2008-10-14 17:28:10 +00:00
kroimon
2db68c519b Rewritten and enhanced module simple_away.
* Added proper 'help' command
* Module now only sets back if it really have set you away
* Case-insensitive commands
* 'reason' command now shows both raw and expanded away reason
* some structural and syntactical cleanup

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1247 726aef4b-f618-498e-8847-2d620e286838
2008-10-12 12:09:35 +00:00
psychon
0a4e4a10a6 Use the new CString constructor in various places to make them more readable
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1245 726aef4b-f618-498e-8847-2d620e286838
2008-10-10 17:58:36 +00:00
psychon
47099a9d88 perform: Clean up the style a little and make this look like the rest of znc
Patch by SilverLeo, thanks. :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1242 726aef4b-f618-498e-8847-2d620e286838
2008-10-08 16:04:08 +00:00
psychon
92a718e3a6 Use CSocket in webadmin instead of directly using Csock
This gets rid of some code duplication for managing the sockets.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1240 726aef4b-f618-498e-8847-2d620e286838
2008-10-04 20:55:50 +00:00
psychon
4aa01bcb71 Fix modperl to properly compile with perl 5.10.0
Thanks to bigpresh and kroimon for reporting this and testing the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1239 726aef4b-f618-498e-8847-2d620e286838
2008-10-03 18:07:22 +00:00
psychon
f81177b102 Fix stickychan to work with disabled channels (e.g. after a kick)
This kinda turns stickychan into kickrejoin... well, so what?

Thanks to Julian for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1238 726aef4b-f618-498e-8847-2d620e286838
2008-10-03 12:53:39 +00:00
psychon
497697dd3b Fix a crash bug when modperl was loaded on some arches
PERL_SYS_INIT3 was added to modperl in r1155-1158 to fix modperl on arches like
hppa. This added an invalid cast which caused a segfault.

If you have:
  const char *pArgv[];
Then pArgv will point to the same memory location as &pArgv. This pointer was
then casted to (char ***) which is one level of pointers too much for this
pointer.

Thanks to an anonymous reporter who pointed out the crash.
Thanks to pippijin for helping me understand the C++ magic.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1237 726aef4b-f618-498e-8847-2d620e286838
2008-10-02 16:26:09 +00:00
psychon
02e4d35085 Clean up modules/Makefile.in for modperl
The HAVE_PERL define isn't used anymore and we had some compiler flags for
modperl mentioned multiple times. Plus IMHO this looks better now ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1235 726aef4b-f618-498e-8847-2d620e286838
2008-09-30 18:07:25 +00:00
kroimon
5237a24747 Use CString::Equals() everywhere.
* (CString::CaseCmp() == 0) became CString::Equals()
* (CString::CaseCmp() != 0) became !CString::Equals()
* replaced some occurrences of strn?casecmp

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1234 726aef4b-f618-498e-8847-2d620e286838
2008-09-30 15:15:59 +00:00
psychon
3014ae5dcb Remove CSocket::m_sLabel since it isn't really used at all
It doesn't really make much sense either, because Csock already has contains
a socket name member which can be used for this. This is exactly what this
patch does.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1229 726aef4b-f618-498e-8847-2d620e286838
2008-09-29 13:34:42 +00:00
kroimon
3b8134c3b0 Another whitespace/tab mixup fix.
Hopefully the last one...
Again, no functional changes in this commit.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1219 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 14:42:34 +00:00
kroimon
1eaac2835b Renamed UseHiddenHost to UseCloakedHost to ensure consistency.
Thanks to fred for noticing this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1218 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 12:24:01 +00:00
kroimon
946add25c2 Added the Q module which allows the user to auth with QuakeNet's Q bot.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1217 726aef4b-f618-498e-8847-2d620e286838
2008-09-27 09:52:00 +00:00
psychon
120c1cedf2 Import the dark-clouds webadmin skin bigpresh made. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1210 726aef4b-f618-498e-8847-2d620e286838
2008-09-19 17:24:38 +00:00
psychon
cad1ee5367 Keepnick: Dont forward nick change errors which we generated ourselves
This blocks 433 replies from the irc server if the keepnick module tries
to change our nick. This way the user isn't flooded with those errors.
Oh and the actual logic is a little more complicated than this...

This patch is inspired and implemented by SilverLeo. Thanks :)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1209 726aef4b-f618-498e-8847-2d620e286838
2008-09-18 19:58:53 +00:00
psychon
debe3ec335 Makefile: Make all output files depend on the Makefile itself
If you now rerun ./configure (e.g. for a different --prefix), everything
will be recompiled.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1205 726aef4b-f618-498e-8847-2d620e286838
2008-09-14 17:57:15 +00:00
psychon
258793168b Bugfix in keepnick: PutUser() vs PutModule() screwup
Sorry, my bad.
Thanks to SilverLeo for finding and fixing this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1203 726aef4b-f618-498e-8847-2d620e286838
2008-09-14 06:05:23 +00:00
kroimon
b14156a5db partyline: Adjusted the hostmask for actions from rottenboy.com to znc.in to ensure uniformity to the rest of znc. See also commit 1181.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1195 726aef4b-f618-498e-8847-2d620e286838
2008-09-10 14:24:07 +00:00
kroimon
fa57b9eb54 Added module 'autocycle' to replace the old core's functionality.
Credits to both psychon and kroimon

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1192 726aef4b-f618-498e-8847-2d620e286838
2008-09-07 11:50:43 +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
df27598832 chansaver: Save channel keys (+k) again, core doesn't do it anymore on its own
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1190 726aef4b-f618-498e-8847-2d620e286838
2008-09-05 19:46:43 +00:00
psychon
57bdb554a9 I was told this is confusing, so let's clean this up (/me waves at eTeen)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1188 726aef4b-f618-498e-8847-2d620e286838
2008-09-03 16:24:08 +00:00
psychon
85a70a418c Add JoinTries and MaxJoins config options to webadmin
This also changes the layout of the default skin a little, because it was
a little messed up. I still don't like the result, but meh, send patches!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1187 726aef4b-f618-498e-8847-2d620e286838
2008-09-03 14:28:18 +00:00
psychon
00fcf767a7 Keep the traffic stats more up-to-date (/msg *status traffic)
This now also adds the traffic caused by webadmin, schat and dcc bouncing
to the stats.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1183 726aef4b-f618-498e-8847-2d620e286838
2008-08-31 07:21:21 +00:00
psychon
02beef2e07 Use znc.in instead of znc.com
No cookie for that domain catcher at znc.com!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1181 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 09:00:21 +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
adcca250e1 Use the new CModule::PutModule(const CTable&) in various modules
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1169 726aef4b-f618-498e-8847-2d620e286838
2008-08-24 12:51:04 +00:00
psychon
074adc94c1 Don't check if perl is enabled in modperl
The Makefile only compiles this module if it is enabled.
I think it's better to error out if for some reason this doesn't work instead
of silently producing an empty modperl.so.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1165 726aef4b-f618-498e-8847-2d620e286838
2008-08-24 06:19:14 +00:00
imaginos
5f0846fc9a changing data types back to proper notation, and down cast the array passed in
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1158 726aef4b-f618-498e-8847-2d620e286838
2008-08-17 18:46:43 +00:00
imaginos
5fbc0aa538 remove const keywords for perl's sake
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1157 726aef4b-f618-498e-8847-2d620e286838
2008-08-17 18:02:09 +00:00
imaginos
03213ae279 fix arg to PERL_SYS_INIT3
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1156 726aef4b-f618-498e-8847-2d620e286838
2008-08-17 17:48:18 +00:00
imaginos
b3bfb1b9ba bug fix as reported by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495076, still needs to be tested
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1155 726aef4b-f618-498e-8847-2d620e286838
2008-08-17 14:53:18 +00:00
psychon
8fa9122cdb Fix the keepnick module
- Properly initialize that pointer-beast.
- Actually compile.

Yeah, I know, I fail...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1153 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 11:54:26 +00:00
psychon
5d58910d24 Add a new module that implements KeepNick
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1152 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 11:36:30 +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
3106f3b90e modperl: Fail if modperl.pm can not be loaded
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1147 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 10:16:52 +00:00
psychon
cc3d99515d awaynick: Disable KeepNick on load instead of failing to load
This should make someone in #znc really happy. :P
This is based on a patch from SilverLeo.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1142 726aef4b-f618-498e-8847-2d620e286838
2008-07-22 08:39:18 +00:00
psychon
1f6abb6468 partyline: Some fixes for users who are not connected to IRC
This was found via default channels (LoadModule = partyline ~#chan).

- Always use a valid (=non-empty) server name
- If a user is not connected to IRC, all clients might have a different idea of
  the current nick. Handle this for SendNickList() via a new function
  PutUserIRCNick() that uses the irc nick if we are connected to IRC and else
  correctly uses the nick that clients thinks it curretnly has.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1141 726aef4b-f618-498e-8847-2d620e286838
2008-07-21 13:58:24 +00:00
psychon
1c2c52651a Make webadmin generate salted passwords, too
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1139 726aef4b-f618-498e-8847-2d620e286838
2008-07-20 15:06:33 +00:00
psychon
10210e4619 Don't throw any exceptions in CModules::LoadModule() on version mismatch
This also removes all the code catching those exceptions. There was nothing
which justified these exceptions and removing them doesn't hurt.

ByeBye CException::EX_BadModVersion


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1137 726aef4b-f618-498e-8847-2d620e286838
2008-07-17 12:01:44 +00:00
psychon
27c1a76cf8 Shell module: Don't give any stdin to executed apps
We now close the write end of the pipe that serves as stdin for the apps
we run. This means that any read attempts will return EOD (read() returns 0)
which should hopefully tell our apps that we don't have stdin for them.
Sadly vim doesn't care... (Only thing I tested that still broke)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1136 726aef4b-f618-498e-8847-2d620e286838
2008-07-17 10:30:32 +00:00
psychon
0003c28f7b Shell module: Small cleanup
We already have a special function for stripping of special chars, so
why does the shell module still do it 'by hand'?


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1135 726aef4b-f618-498e-8847-2d620e286838
2008-07-17 10:16:40 +00:00
psychon
a5dcb3ff77 webadmin: Use the new CZNC::AuthUser() API
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1116 726aef4b-f618-498e-8847-2d620e286838
2008-07-07 18:36:26 +00:00
psychon
7965a12bd0 Fix a privilege escalation bug in webadmin if auth modules are used
auth modules = imapauth and saslauth

Some code in CWebAdminSock::OnLogin() is skipped if a module handles auth
and thus m_pUser stays NULL. Most checks for admin rights only check for
m_pUser being NULL and thus any user WHO ALREADY HAS A VALID LOGIN can edit
other users if they know their user name.
(=Change the password of an admin and log in using this info)

One of the major excpeptions are the templates which use m_bAdmin instead of
m_pUser for checking the privieleges, thus users still see the normal pages
and this bug stayed unnoticed for a while.

This patch now moves the code that sets m_pUser to some code which is executed
in both cases, when an auth module is in effect and when one isn't.
(Well, technically this isn't a move, but code duplication, but executing this
 twice won't hurt and one of the follow-up patches cleans this up.)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1113 726aef4b-f618-498e-8847-2d620e286838
2008-07-07 18:30:35 +00:00
psychon
5e0c652b9a Add the remote ip to the info CAuthBase got
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1112 726aef4b-f618-498e-8847-2d620e286838
2008-07-07 18:24:38 +00:00
psychon
bea3d85e8c autoattach: Don't allow adding the same entry twice
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1100 726aef4b-f618-498e-8847-2d620e286838
2008-06-22 14:06:01 +00:00