Commit Graph

1648 Commits

Author SHA1 Message Date
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
psychon
acc39c9351 modules/Makefile.in: $LIBS is unused and should not be used
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1094 726aef4b-f618-498e-8847-2d620e286838
2008-06-16 19:17:05 +00:00
psychon
d2aa281735 Fix the chmod of the perl modules
perl modules (.pm) don't need executable bits...

Thanks to Patrick Mathhaei from debian for this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1090 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 09:50:50 +00:00
psychon
80a947100a crypt: Fix bug where a usermsg was not forwarded to other clients
Thanks to SilverLeo for this patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1088 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 09:34:21 +00:00
psychon
442ef47c56 Add OnUserTopic module call
Patch by SilverLeo


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1086 726aef4b-f618-498e-8847-2d620e286838
2008-06-06 14:27:57 +00:00
psychon
1bb1206472 Webadmin: Add support for timezone offset
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1079 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 14:09:41 +00:00
psychon
0df0e9c234 Remove the *.de webadmin skins
I bet many people will kill me for this...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1078 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 14:07:29 +00:00
psychon
709d822157 Perform: Require an argument for the 'add' command
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1077 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 13:59:01 +00:00
psychon
8aa85fd12e Nickserv: Work on freenode (which uses lower case 'identify' notice)
Thanks to SilverLeo for the patch


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1076 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 10:54:44 +00:00
psychon
13ddd325f9 Webadmin: Don't reset all channel settings submitting a user page
In r1058 the behaviour of CUser::Clone() was changed. It now also handles the
channel settings. This change breaks webadmin, because it doesn't properly
set up the channels it feeds to CUser::Clone()

This commit 'fixes' this by adding an extra parameter to CUser::Clone() which
makes it revert to the old behaviour. Webadmin uses this parameter.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1074 726aef4b-f618-498e-8847-2d620e286838
2008-05-26 15:02:09 +00:00
psychon
ce5dae0f2b Cleanup autoop a little
This removes unused module hooks and some unused code.

It also gives some comments there own line.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1064 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:02:14 +00:00
psychon
01bc68b1cb Move ChangeDir() and MakeDir() from CUtils to CDir
Those function were not modified. Only change is the name.

Those *Dir() functions really made no sense in CUtils when there is FileUtils
stuff. They really fit much better into here. I'll bet they'll make new friends
fast. I mean, why shouldn't they?
Uhm... sorry ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1044 726aef4b-f618-498e-8847-2d620e286838
2008-05-08 16:58:32 +00:00
psychon
8c24ebb641 Webadmin: Remove the special rule for CVS and ignore .svn instead
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1043 726aef4b-f618-498e-8847-2d620e286838
2008-05-08 13:45:16 +00:00
psychon
8cf12e8931 Clean up FileUtils.h
This removes some commented out functions and it also
removes CFir::Exists() since CFile::IsDir() does exactly
the same job (and it uses fewer syscalls for that).



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1042 726aef4b-f618-498e-8847-2d620e286838
2008-05-08 13:32:34 +00:00
psychon
5665fd872d Update to latest Csocket
This breaks (& fixes again, as far as ZNC itself is concerened) API!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1040 726aef4b-f618-498e-8847-2d620e286838
2008-05-06 14:47:13 +00:00
psychon
3775748270 watch: Remove the raw /watch command
There is actually a 'real' /watch command which was blocked by this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1035 726aef4b-f618-498e-8847-2d620e286838
2008-04-30 14:09:15 +00:00
psychon
c64d7bc108 Force a space between if, for, while and (
This was done via:
   sed -ir 's/if(/if (/g; s/for(/for (/g; s/while(/while (/g' \
        *.h *.cpp modules/*.cpp



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1030 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:08:44 +00:00
psychon
b0a1714b86 Remove useless spaces inside of braces "( stuff )"
This was generated via the following command:

  cat <file> | \
  tr "\n" "€"| \
  sed -r 's/€[\t ]*\{€/ {€/g; s/\( */(/g; s/ *\)/)/g' | \
  tr "€" "\n"

Thanks to SilverLeo for producing this mess :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1029 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:00:19 +00:00
psychon
0470977497 schat: Use CString's features instead of strcasecmp and friends
This also breaks long lines (longest line is now 114 chars, was 180).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1028 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 12:39:21 +00:00
psychon
5822a2de75 Fix the Makefile's dependency tracking
Turns out that .depend's mtime changes when you modify files in there
and since every .cpp file depended on .depend, make regenerated everything.
Not good.

Fix this by inlining the mkdir for .depend.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1027 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 12:21:26 +00:00
psychon
5c5cde9c34 Makefile: Always do dependency tracking
If you now change znc.h, every file that '#include's znc.h is *always*
regenerated.

According to [1], these compiler flags were already around with GCC 3.2, so
this change shouldn't hurt anyone.

[1] http://lists.samba.org/archive/ccache/2002q4/000003.html


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1026 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 07:00:40 +00:00
psychon
5a34291455 Shell: Don't send invalid nonsense like empty strings as ident
The shell module uses the current nick for that user as the ident for queries
from *shell. This makes no sense I once managed to get an empty ident, which
confused irssi badly.

Since there is no good reason to use this as ident, just use some
static string as ident instead.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1021 726aef4b-f618-498e-8847-2d620e286838
2008-04-11 12:25:41 +00:00
psychon
5590307909 chansaver: Add all channels to the config when this module is loaded
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1018 726aef4b-f618-498e-8847-2d620e286838
2008-04-07 20:19:17 +00:00