]>
jfr.im git - irc/rizon/znc.git/log
Uli Schlachter [Sat, 11 Jun 2011 16:33:50 +0000 (18:33 +0200)]
Only export a single function from modules
This moves the version check into the function which loads the module info. That
way, we just need a single dlsym() call per module and thus can't get any errors
from the second dlsym() call. And IMHO this feels nicer anyway. ;-)
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sat, 11 Jun 2011 16:16:00 +0000 (18:16 +0200)]
Use references instead of pointers for CModInfo
This works fine and reduces the chances of memory leaks.
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Sat, 11 Jun 2011 11:32:09 +0000 (18:32 +0700)]
Merge branch 'modinfo'
Alexey Sokolov [Sat, 11 Jun 2011 11:27:13 +0000 (18:27 +0700)]
Support wiki pages names in python modules.
Also this fixes showing python modules in available modules list.
Alexey Sokolov [Sat, 11 Jun 2011 11:21:06 +0000 (18:21 +0700)]
Support wiki pages names for perl modules.
Alexey Sokolov [Sat, 11 Jun 2011 11:09:56 +0000 (18:09 +0700)]
Add link to wiki page from any nonextra module.
Alexey Sokolov [Sat, 11 Jun 2011 10:46:37 +0000 (17:46 +0700)]
Modules can now provide its wiki page name.
It's shown on webadmin as a link.
Alexey Sokolov [Sat, 11 Jun 2011 10:28:15 +0000 (17:28 +0700)]
Add a way for module to customize additional info.
For that you need to write a specialization of template function
void TModInfo<CYourModule>(CModInfo&), and inside it put needed values
to the argument.
Alexey Sokolov [Sat, 11 Jun 2011 10:19:36 +0000 (17:19 +0700)]
Change a way for modules to provide description.
Now there're only 2 functions which modules export:
ZNCModVersion() and ZNCModInfo().
ZNCModInfo() returns CModInfo instance, which contains
description, globality, function for loading the module. It needs to be
deleted afterwise.
Uli Schlachter [Fri, 10 Jun 2011 14:39:51 +0000 (16:39 +0200)]
Check the for our minimum required autoconf version
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 9 Jun 2011 19:38:59 +0000 (12:38 -0700)]
Merge pull request #55 from Un1matr1x/bugfix/white_space_edition
remove evil trailing white space
Un1matr1x [Thu, 9 Jun 2011 19:29:13 +0000 (21:29 +0200)]
remove some more of the evil trailing white spaces & tabs
Un1matr1x [Thu, 9 Jun 2011 19:00:33 +0000 (21:00 +0200)]
Merge branch 'master' of git://github.com/znc/znc into white_space_edition
Alexey Sokolov [Wed, 8 Jun 2011 02:53:42 +0000 (09:53 +0700)]
Support compiling python modules in cwd
Un1matr1x [Wed, 8 Jun 2011 04:51:13 +0000 (06:51 +0200)]
tabs in newlines could be removedĀ²
Un1matr1x [Wed, 8 Jun 2011 04:47:46 +0000 (06:47 +0200)]
Merge branch 'master' of git://github.com/znc/znc into bugfix/white_space_edition
Kyle Fuller [Wed, 8 Jun 2011 03:04:08 +0000 (04:04 +0100)]
CUser: remove some non-existant methods from the headers
These include:
- SendFile
- GetFile
- ResumeFile
Which were removed when DCC was moved out of the core
Brian [Wed, 2 Mar 2011 03:31:35 +0000 (20:31 -0700)]
Redo commands for send_raw modules. Also, use the new CModCommand stuff.
Un1matr1x [Tue, 7 Jun 2011 19:39:25 +0000 (21:39 +0200)]
remove evil trailing white space
Uli Schlachter [Tue, 7 Jun 2011 16:23:05 +0000 (09:23 -0700)]
Merge pull request #50 from bpcampbe/TrimBuffer
Add CChan::TrimBuffer and have SetBufferCount call it.
Kyle Fuller [Sat, 4 Jun 2011 16:00:10 +0000 (17:00 +0100)]
Improve the debug messages from identfile module
Alexey Sokolov [Sat, 4 Jun 2011 07:19:54 +0000 (14:19 +0700)]
Check what make should user use and ask user to do that.
Alexey Sokolov [Thu, 2 Jun 2011 01:10:46 +0000 (08:10 +0700)]
Add regex comment for CUser::IsValidUserName()
Kyle Fuller [Wed, 1 Jun 2011 21:11:58 +0000 (22:11 +0100)]
Do not include DCCSock in mod(perl|python)
Kyle Fuller [Sun, 29 May 2011 20:23:15 +0000 (21:23 +0100)]
Make schat use DCCBindHost
Kyle Fuller [Tue, 31 May 2011 00:39:19 +0000 (01:39 +0100)]
Use the module save path for dcc's, and remove DLPath since it is no longer used.
Kyle Fuller [Mon, 30 May 2011 21:24:40 +0000 (22:24 +0100)]
Move dcc file transfers to their own module
Kyle Fuller [Sat, 2 Apr 2011 21:50:24 +0000 (22:50 +0100)]
Migrate dcc bouncing to its own module
Kyle Fuller [Sat, 2 Apr 2011 19:58:38 +0000 (20:58 +0100)]
Remove OnDCCUserSend module hook
Kyle Fuller [Tue, 31 May 2011 01:00:23 +0000 (02:00 +0100)]
Rename "str" to "String" in the admin panel.
This was accidentally renamed in
abed808121fb96f70d7c .
Brian [Mon, 30 May 2011 00:37:05 +0000 (18:37 -0600)]
Add CChan::TrimBuffer and have SetBufferCount call it.
Kyle Fuller [Wed, 25 May 2011 12:24:14 +0000 (13:24 +0100)]
Add a web interface to the certauth module
Kyle Fuller [Tue, 24 May 2011 16:52:09 +0000 (17:52 +0100)]
Make certauth accept a optional argument of the key when you add a key
Kyle Fuller [Tue, 24 May 2011 12:14:41 +0000 (13:14 +0100)]
Make certauth use the CModCommand API
Kyle Fuller [Wed, 25 May 2011 15:46:53 +0000 (16:46 +0100)]
Rename a variable from 'string' to 'str' because 'string' shadows a global declaration
Uli Schlachter [Sat, 21 May 2011 11:58:29 +0000 (13:58 +0200)]
Merge branch 'master' of https://github.com/pfn/znc
Conflicts:
modules/extra/away.cpp
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 15 May 2011 11:15:51 +0000 (13:15 +0200)]
autoattach: Allow limiting by hostmask
This adds hostmasks to autoattach. E.g. if you don't like me, you add an entry
of "! * psychon!*" and autoattach won't attach you to channels just because I
said something. The same can be done in the non-negated case, "only attach when
foo says something".
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 13 May 2011 16:19:08 +0000 (18:19 +0200)]
Correctly handle excessive web sessions
The old code didn't actually destroy the session, but only made sure we couldn't
use it anymore. What a waste of memory.
This was tested by adding a DEBUG()-call to CWebSock::~CWebSock():
Before this patch:
Page Request [/]
Remote IP: 127.0.0.1; discarding session [
ca104adaa54f933b6b8394e88e68ab0d22e0fc227ed23e93d1421e4d3fda8211 ]
Auto generated session: [
d40364e8d0a55432b86a1b2598865c2323e35cc6e77cade35b9a1b7605712ca6 ]
After this patch:
Page Request [/]
Remote IP: 127.0.0.1; discarding session [
707e3b262fe47b93d8c796354574506c398cc5b5d84aa2972dc3d031d8f731f5 ]
Destroying session [
707e3b262fe47b93d8c796354574506c398cc5b5d84aa2972dc3d031d8f731f5 , 127.0.0.1 for <unknown>
Auto generated session: [
47de1c82a8b6eaae54a9cc8c29163ab53ec2add7198cf1df7f80506ea1bda2b6 ]
Obviously, the destructor is only called after this change.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 13 May 2011 15:24:10 +0000 (17:24 +0200)]
Set errno in CListener::Listen()
CSocket doesn't necessarily set errno, but the callers of Listen() assume an
error message in errno.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 13 May 2011 14:40:40 +0000 (16:40 +0200)]
Make it possible to use ExpandString-stuff in QuitMsg
You can now use "Uptime: %uptime%" as your quit message, yay!
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 13 May 2011 13:48:47 +0000 (15:48 +0200)]
Warn if a *module message is ignored
Some modules (e.g. webadmin) don't handle messages to *module in any way. Make
it clear to the user why they didn't get any reply back in this case.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 8 May 2011 20:19:51 +0000 (22:19 +0200)]
WebModules: Add some more debug output
This now prints more info in case of errors which might help figure out bugs.
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Sun, 8 May 2011 08:14:13 +0000 (15:14 +0700)]
Add bootstrap.sh as symlink to autogen.sh
Some projects use name autogen, and some use bootstrap. Meh.
Alexey Sokolov [Fri, 6 May 2011 08:17:30 +0000 (15:17 +0700)]
Check SWIG version in configure.
Uli Schlachter [Sun, 1 May 2011 09:53:37 +0000 (11:53 +0200)]
Some fixes for README.md
This fixes some broken markup and adds modpython
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 1 May 2011 09:49:21 +0000 (02:49 -0700)]
Merge pull request #42 from Un1matr1x/change/readme.
overhaul Readme.md
Un1matr1x [Sun, 1 May 2011 09:17:03 +0000 (11:17 +0200)]
Wiki-Links changed, ModPython added, small optical changes
Uli Schlachter [Sat, 30 Apr 2011 10:29:12 +0000 (12:29 +0200)]
Update to latest Csocket
This fixes a problem where Csocket detected socket timeouts (as configured with
SetTimeout()) too late if there was few activity. See csocket's git commit
message for more info, I'm lazy. :-P
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Mon, 25 Apr 2011 02:44:52 +0000 (09:44 +0700)]
Don't confuse people with away module.
Alexey Sokolov [Mon, 25 Apr 2011 02:42:50 +0000 (09:42 +0700)]
Show error for --makepem if compiled without SSL.
Alexey Sokolov [Thu, 21 Apr 2011 03:02:15 +0000 (10:02 +0700)]
Allow log module to get no arguments.
This was broken since
znc-0.098-17-g64e565c (
563bce5987ca4c24035279126243ea0f5c7b9efa )
which introduced possibility of log module to specify wanted path as argument.
Thanks to turnor for reporting this.
Uli Schlachter [Fri, 15 Apr 2011 16:03:38 +0000 (18:03 +0200)]
Csocket: Compile when SSLv2 is disabled in openssl
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Thu, 14 Apr 2011 03:04:27 +0000 (10:04 +0700)]
Make ProtectWebSessions to be checkbox in webadmin.
Michael Edgar [Thu, 14 Apr 2011 01:21:46 +0000 (21:21 -0400)]
Added myself to authors, in case this lands.
Michael Edgar [Thu, 14 Apr 2011 00:24:26 +0000 (20:24 -0400)]
Added a global config option for IP-based session protection.
The new setting defaults to true, and is settable in the web admin panel. When
set to false, IP address checks are ignored. For users behind proxies (students,
large corporate networks) that don't guarantee a consistent IP, this makes the
web admin panel much more usable.
Paul Driver [Mon, 4 Apr 2011 20:01:49 +0000 (21:01 +0100)]
passwords >8chars on Solaris, nitpicky solaris LIBS
Kyle Fuller [Mon, 4 Apr 2011 18:16:05 +0000 (19:16 +0100)]
Fix ConfigTest.cpp and cert.cpp so they compile
This was broken since ZNCDebug.cpp was introduced
Kyle Fuller [Sun, 3 Apr 2011 01:12:16 +0000 (02:12 +0100)]
Remove a pointless status command provided by the shell module
Kyle Fuller [Tue, 29 Mar 2011 16:55:50 +0000 (17:55 +0100)]
Add the cert module which allows you to use a SSL certificate on outgoing IRC connections
Kyle Fuller [Sun, 3 Apr 2011 19:03:37 +0000 (20:03 +0100)]
Include signal.h to make znc compile again
Uli Schlachter [Sun, 3 Apr 2011 16:04:14 +0000 (18:04 +0200)]
Don't use poll() on Mac OS
Congratulations, Apple. Your OS is really great. In some versions (according to
google, it used to work in older releases), poll() can only handle sockets. If
you give it a pipe (as e.g. the shell module does), it will fail with POLLNVAL
which Csocket handles by going into an endless loop.
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Sun, 3 Apr 2011 13:13:17 +0000 (20:13 +0700)]
Merge branch 'py' of https://github.com/kylef/znc into kylef-py
Conflicts:
modules/modpython/znc.py
Alexey Sokolov [Sun, 3 Apr 2011 12:28:17 +0000 (19:28 +0700)]
Rearrange compiler/linker flags for modpython.
This should fix some issues with --as-needed.
Thanks to wired for reporting this.
Alexey Sokolov [Sun, 3 Apr 2011 12:13:47 +0000 (19:13 +0700)]
Parse new ExecSock.h and ZNCDebug.h with SWIG.
That functionality was accessible by perl and python modules before.
Now that stuff is in own headers, so let's parse them too,
to have them still be able to use this.
Alexey Sokolov [Sun, 3 Apr 2011 12:12:38 +0000 (19:12 +0700)]
Fix compilation error introduced in
3f24f28736 .
psychon uses --enable-run-from-source and therefore missed this use of CFile.
Uli Schlachter [Sun, 3 Apr 2011 09:48:50 +0000 (11:48 +0200)]
Stop including FileUtils.h in any header
This causes every piece of code which wants to use CFile or CDir to have to
include FileUtils.h. This causes quite some noise.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 09:13:37 +0000 (11:13 +0200)]
Move CExecSock to ExecSock.h
As a result, Utils.h no longer has to include Socket.h and lots of stuff breaks.
Due to a severe case of lazyness, some of the code for CExecSock is still in
Utils.cpp. Feel free to fix if you really have to.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 08:41:27 +0000 (10:41 +0200)]
Move DEBUG() from Utils.h into new ZNCDebug.h
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 08:24:15 +0000 (10:24 +0200)]
defines.h doesn't need main.h
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 08:21:59 +0000 (10:21 +0200)]
Don't include FileUtils.h in znc.h or Modules.h
Both these headers only really need CFile* which can be handled with a forward
declaration.
To make this possible, some methods are moved from the header file into the
corresponding implementation file, because they used CFile or CDir static
members.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 08:06:16 +0000 (10:06 +0200)]
Include less headers in WebModules.h
From Client.h, only CAuthBase is needed. This is solved by moving the whole
CWebAuth class to WebModules.cpp.
The include of FileUtils.h is avoided by changing the API. GetAvailSkins() now
returns the skin names instead of a CFile for the skin's path.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sun, 3 Apr 2011 07:27:08 +0000 (09:27 +0200)]
Handle Listeners after SSLCertFile
Else, the Listeners will ignore the SSLCertFile config option.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sat, 2 Apr 2011 21:28:32 +0000 (23:28 +0200)]
Don't include znc.h in Listener.h
znc.h pulls in most headers, Socket.h pulls in way less headers. This should
speed up compiles by 0.
0000000314 %.
The rest of this is compile fixes for stuff which assumed that Listener.h
includes znc.h for them. :-)
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sat, 2 Apr 2011 21:03:33 +0000 (23:03 +0200)]
Raise our IRC connection timeouts
ZNC will now send a PING if the connection was idle for 270 to 300 seconds.
After 540 seconds (that is, about 270 to 240 seconds later) the timeout is
triggered and ZNC reconnects.
These values are "inspired" by the values eggdrop uses.
The old timeouts were 180 to 210 secs for the PING and 240 secs for the timeout.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Sat, 2 Apr 2011 14:52:52 +0000 (16:52 +0200)]
Improve the handling of module load messages
Instead of doing ugly stuff to shorten the "Loaded Module [foo]" message, we now
just always generate the shorter version of that message. The code paths which
didn't do this shortening now prepend that message themselves.
The result is that every message looks the same as it did before, but the code
for generating these is a little nicer.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 1 Apr 2011 19:23:11 +0000 (21:23 +0200)]
Config: Fix some errors in the comment handling
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Fri, 1 Apr 2011 19:22:14 +0000 (21:22 +0200)]
Re-add the ISpoof{File,Format} handling which was lost
Whoops, someone here failed at rebasing stuff.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Mon, 28 Mar 2011 13:57:46 +0000 (15:57 +0200)]
Overhaul the config parsing
This moves stuff to a two-step model. First, the new class CConfig reads the
config file, parses it and creates a in-memory model of stuff. Only then do we
actually go forward and apply the stuff.
The upside of this is that some config errors are caught before we change
anything on the running upside.
Let's see how much stuff this broke...
Signed-off-by: Uli Schlachter <redacted>
Kyle Fuller [Fri, 1 Apr 2011 16:04:18 +0000 (17:04 +0100)]
Cleanup znc.py
Kyle Fuller [Fri, 1 Apr 2011 14:48:09 +0000 (15:48 +0100)]
Make znc.py follow pep8
Kyle Fuller [Fri, 1 Apr 2011 00:05:25 +0000 (01:05 +0100)]
Add __repr__ methods to CUser, CChan, CNick in modpython
Kyle Fuller [Fri, 1 Apr 2011 00:00:46 +0000 (01:00 +0100)]
Add __str__ methods to CModule, CUser, CChan, and CNick in modpython
Uli Schlachter [Thu, 31 Mar 2011 17:18:11 +0000 (19:18 +0200)]
Fix a stupid memleak
Where's my brown paper back...?
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 17:07:36 +0000 (19:07 +0200)]
Improve lock file error handling
When we have an error during rehashing / config writing, we continue keeping the
old lock around since we haven't gotten rid of that one yet.
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 16:21:36 +0000 (18:21 +0200)]
Check for errors while writing the config
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 16:15:49 +0000 (18:15 +0200)]
CZNC::WriteNewConfig() check for errors
This code now errors out if there is any error while writing the config. I
tested this with a full file system (full tmpfs of size 4k).
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 16:10:02 +0000 (18:10 +0200)]
CFile::TryExLock(): Use O_RDWR by default
Getting an exclusive lock on a file with TryExLock() requires write access,
therefor O_RDONLY is wrong here.
This worked back when we were using flock() for file locking, because flock()
doesn't need write access for an exclusive locks.
This fixes a bug where "--makeconf" claims that there is already a znc instance
running on the config file. This happened because it mis-interpreted the -EBADF
error from fcntl() as "something else already has a lock".
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 16:00:07 +0000 (18:00 +0200)]
CFile: Add an error flag
Whenever an error happens with some file operation, the error flag is now set.
This is especially interesting for tracking errors from Write().
Signed-off-by: Uli Schlachter <redacted>
Uli Schlachter [Thu, 31 Mar 2011 15:29:49 +0000 (17:29 +0200)]
Remove config-related module hooks
This removes the following module hooks:
OnConfigLine()
OnWriteConfig()
OnWriteUserConfig()
OnWriteChanConfig()
Modules could use these hooks for writing/reading their own stuff to/from
znc.conf. However, no module (ever?) did this and IMHO no module should ever do
this either. Modules can save stuff via SetNV(), module arguments (SetArgs())
and in their GetSavePath().
Signed-off-by: Uli Schlachter <redacted>
Alexey Sokolov [Thu, 31 Mar 2011 13:41:59 +0000 (20:41 +0700)]
modpython: Make strings to be stringable.
Now you can use str() on objects of znc.String.
The same is true for arguments which represent CString&.
Alexey Sokolov [Thu, 31 Mar 2011 13:27:23 +0000 (20:27 +0700)]
Fix recent commit of moving python to pkg-config.
Alexey Sokolov [Thu, 31 Mar 2011 13:10:24 +0000 (20:10 +0700)]
modpython: move CPyRetString to own header.
It was defined twice: in modpython.cpp, and in modpython.i
And there is a fake CPyRetString in modpython.i
Now both places which use real CPyRetString include the file instead.
Fake CPyRetString is still in modpython.i
Alexey Sokolov [Thu, 31 Mar 2011 13:01:00 +0000 (20:01 +0700)]
Use pkg-config for modpython.
python3-config fails when python is installed not system-wide.
It doesn't return -L/path/to/libs.
pkg-config resurns it.
Note that this changes meaning of optional argument to ./configure --enable-python=...
Kyle Fuller [Wed, 30 Mar 2011 18:48:26 +0000 (19:48 +0100)]
Update old znc config to work with the new identfile module
Kyle Fuller [Wed, 30 Mar 2011 18:19:55 +0000 (19:19 +0100)]
Create a identfile module, this replaces the old ident spoofing built into znc
Kyle Fuller [Tue, 29 Mar 2011 21:12:55 +0000 (22:12 +0100)]
Remove ident spoof from znc core
Kyle Fuller [Tue, 29 Mar 2011 20:38:13 +0000 (21:38 +0100)]
Add the OnIRCConnectionError(CIRCSock *pIRCSock) module hook
Uli Schlachter [Wed, 30 Mar 2011 08:38:07 +0000 (10:38 +0200)]
Merge branch 'notes' of https://github.com/kylef/znc
Kyle Fuller [Wed, 30 Mar 2011 00:20:29 +0000 (01:20 +0100)]
Add a option to the notes module so that you can prevent it from sending you notes when you connect
Kyle Fuller [Tue, 29 Mar 2011 14:45:33 +0000 (15:45 +0100)]
Make the notes module use CModCommand