Commit Graph

1648 Commits

Author SHA1 Message Date
psychon
2efea2157a webadmin: reload global modules whose settings were changed
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1331 726aef4b-f618-498e-8847-2d620e286838
2009-01-14 15:17:30 +00:00
psychon
6e880c5930 Remove maxlength="16" from the password input boxes in webadmin
This lead to silently truncated passwords which made logins a no-go.

Thanks to Julian for finding this one.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1330 726aef4b-f618-498e-8847-2d620e286838
2009-01-13 17:10:05 +00:00
psychon
a3169af5bd Add CUtils::SaltedHash() for doing salted hashes and do some cleanup
The stuff in CUtils::GetHashPass() and CUtils::GetSaltedHashPass() shouldn't
hurt, since we don't do such stuff in other places for passwords either.

This should improve the readability of the code a lot.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1324 726aef4b-f618-498e-8847-2d620e286838
2009-01-08 15:57:32 +00:00
psychon
607a7f1c16 Get rid of most strtoul() and atoi() calls and use CString's features instead
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1320 726aef4b-f618-498e-8847-2d620e286838
2009-01-04 10:48:02 +00:00
psychon
08ad0291ea Happy New Year 2009 everyone!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1317 726aef4b-f618-498e-8847-2d620e286838
2009-01-01 12:22:21 +00:00
silverleo
d6525a8efe Fixed awaynick so it doesnt evaluate the awaynick multiple times. Also fixed a timer problem if the client disconnected before the backnicktimer fired.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1313 726aef4b-f618-498e-8847-2d620e286838
2008-12-30 23:17:50 +00:00
psychon
b7f38c4d4a Remove some code duplications and move functions into classes
This removes ReadFile(), WriteFile(), ReadLine(), Lower() and Upper() from
Utils.h and adds CFile::ReadFile().

The biggest part of this patch fixes modules to use CFile and CString instead
of these global functions.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1311 726aef4b-f618-498e-8847-2d620e286838
2008-12-30 13:05:04 +00:00
psychon
fe86b92359 Use CSocket instead of Csock in the email module
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1305 726aef4b-f618-498e-8847-2d620e286838
2008-12-27 09:06:49 +00:00
psychon
1312e6512b Make watch save its settings and add CModule::ClearNV()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1304 726aef4b-f618-498e-8847-2d620e286838
2008-12-26 15:12:25 +00:00
psychon
458baa17f5 Some cleanup and fixes to schat
- schat now works again (yay)
- it now uses CSocket instead of Csock directly
- list only displays schat's own sockets
- other minor stuff


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1303 726aef4b-f618-498e-8847-2d620e286838
2008-12-25 08:48:59 +00:00
silverleo
1785a03c71 Dont try to join our sticky channels when the irc connection is not available.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1298 726aef4b-f618-498e-8847-2d620e286838
2008-12-21 09:05:16 +00:00
psychon
e493c23243 awaynick: Set awaynick on connect, not some time after that
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1291 726aef4b-f618-498e-8847-2d620e286838
2008-12-14 20:27:36 +00:00
psychon
08088be7d6 Add traffic tracking support to CSocket
Now every module that uses CSocket automatically gets its generated traffic
counted. Those which use Csock directly should be shot and burried anyway ;)

This adds CModule::IsGlobal().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1283 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 19:56:38 +00:00
psychon
03a13f6d51 Always show a message for active schat when a user reconnects
This was the user sees at once which schats are active.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1282 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 16:13:37 +00:00
psychon
3c088134f5 Minor stylistic fixes for schat
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1281 726aef4b-f618-498e-8847-2d620e286838
2008-12-06 16:07:00 +00:00
silverleo
9952e8d2c5 Added OnTimerAutoJoin(). Patch from Freman. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1272 726aef4b-f618-498e-8847-2d620e286838
2008-11-25 10:53:40 +00:00
silverleo
c71565103c Added OnIRCRegistration(). Patch from Freman. Thanks :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1271 726aef4b-f618-498e-8847-2d620e286838
2008-11-24 17:56:34 +00:00
psychon
db21f88584 Rename OnUserAttached and OnUserDetached and add OnClientConnect
OnUserAttached is renamed to OnClientLogin and
OnUserDetached to OnClientDisconnect.
This adds some new function with different arguments for the old names to cause
warnings from -Woverloaded-virtual while compiling.

This patch also adds OnClientConnect() which is called when the low-level
raw connection is established. (No SSL-handshake was done at this point yet!)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1266 726aef4b-f618-498e-8847-2d620e286838
2008-10-29 17:26:30 +00:00
psychon
e85ed684ea Some member vars of CWebAdminMod should really be local vars to OnLoad()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1265 726aef4b-f618-498e-8847-2d620e286838
2008-10-28 17:21:53 +00:00
psychon
dfaa0c34fc Fix the behaviour change of the last commit
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1264 726aef4b-f618-498e-8847-2d620e286838
2008-10-27 19:34:03 +00:00
psychon
b312a64c9d Partyline: clean up when a force-joined user is deleted
The old code didn't properly clean up after deleted users :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1263 726aef4b-f618-498e-8847-2d620e286838
2008-10-27 19:21:08 +00:00
silverleo
94f6e2cf79 Change OnStatusCommand to use non-const variable like most of the EModRet modulecalls
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1262 726aef4b-f618-498e-8847-2d620e286838
2008-10-26 19:47:17 +00:00
psychon
1701b39399 modperl: Show the actual compiler flags and get rid of the warnings
We now first run the perl command to get the compiler flags and display
those when compiling modperl, so we now what's going on.

Plus this also uses -Wno-write-strings to disabled all the perl compiler
warnings.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1261 726aef4b-f618-498e-8847-2d620e286838
2008-10-26 18:58:13 +00:00
psychon
d57f706523 Make schat's showsocks module admin-only
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1260 726aef4b-f618-498e-8847-2d620e286838
2008-10-24 17:12:06 +00:00
psychon
680127165a Improve webadmin's error messages
I just got this: (binding to ::1 on an ipv4-only build)
Module [webadmin] aborted: Could not bind to port 8080: No such file or directory
Module [webadmin] aborted: Could not bind to port 8080: Success


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1259 726aef4b-f618-498e-8847-2d620e286838
2008-10-23 15:20:09 +00:00
psychon
90cf81e686 Make ZNC compile on Mac OS out of the box
Thanks to ashikase for pointing out the needed linker and compiler flags.
Thanks to GiZMo for testing on his mac 10.5.4.

This also cleans up configure.in a little by adding appendMod.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1258 726aef4b-f618-498e-8847-2d620e286838
2008-10-22 19:40:51 +00:00
psychon
ecd50392ab Support out-of-tree builds
The autoconf documentation turned out to be helpful:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Build-Directories


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1257 726aef4b-f618-498e-8847-2d620e286838
2008-10-21 17:41:52 +00:00
psychon
b94e784301 Really use relative URLs in webadmin
I forgot the forms and the style sheets. Meh :(

Thanks to gencha for testing a snapshot and noticing that the forms are broken.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1254 726aef4b-f618-498e-8847-2d620e286838
2008-10-18 12:51:25 +00:00
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