Commit Graph

2481 Commits

Author SHA1 Message Date
Kyle Fuller 39f97a887d Let a user filter the result of help CModule::HandleHelpCommand 2012-01-01 14:16:48 +01:00
TorrentialStorm 7474c43902 Don't forward server redirects to client. 2012-01-01 14:16:42 +01:00
TorrentialStorm bc35c3ed37 Don't send server redirects to client [TorrentialStorm] 2012-01-01 14:16:34 +01:00
Alexey Sokolov b5043eb850 Unload modules in reverse order. 2012-01-01 14:16:27 +01:00
Uli Schlachter 927c1d3074 Increase the version number to 0.203
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-01 13:48:13 +01:00
Alexey Sokolov 11508aa72e Fix crash in bouncedcc module.
It happens when DCC RESUME is received.
Affected ZNC versions: 0.200, 0.202.

Thanks to howeyc for reporting this and providing the patch.
2012-01-01 00:47:01 +07:00
Uli Schlachter a3b9d8b13b Increase the version number to 0.202
Signed-off-by: Uli Schlachter <psychon@znc.in>
znc-0.202
2011-09-21 22:19:51 +02:00
Jim Hull 610bfe3eb9 fix formatting 2011-09-13 15:09:54 -07:00
Jim Hull 0e9f43fff8 rework SendBuffer fixing an issue where ClearBuffer() nuked the buffer after playing to the first client
(cherry picked from commit 793c34699a)

Conflicts:

	Chan.cpp
2011-09-13 15:03:09 -07:00
Alexey Sokolov dd3a2b3897 Install .py files along with .pyc
(cherry picked from commit 5e73af632a)
2011-09-13 22:13:17 +07:00
Jim Hull 244052f0de fixed a null reference to pClient in hooks 'OnChanBufferStarting,OnChanBufferStarting,OnChanBufferEnding,OnChanBufferEnding', such that when pClient is NULL the hooks are called on all clients associated to that user
Conflicts:

	Chan.cpp

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:52:41 +02:00
Kyle Fuller 7354564df3 Don't timeout bouncedcc connections, inactive bounced DCC chat's would be dropped otherwise 2011-09-13 09:38:18 +02:00
Uli Schlachter 13dbd6698c admin: Fix getchan {inconfig,keepbuffer,detached}
Instead of giving a useful result, they returned their result by sometimes
omitting the first character of the option name. Whoops.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:38:09 +02:00
Alexey Sokolov aa9ccbcbd7 Add -r parameter of ZNC to man.
It was missing.

Thanks to flaccid for noticing that.
2011-09-13 09:37:59 +02:00
Jonas Gorski a9f8e6550d fix build error when compiling against uclibc(++)
Fixes the following error:

In file included from ZNCString.cpp:10:0:
FileUtils.h: In static member function 'static CString CDir::GetCWD()':
FileUtils.h:246:36: error: 'getcwd' was not declared in this scope

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:37:46 +02:00
Uli Schlachter fe05574f24 autocycle: Only cycle once in 15 seconds
This should stop all fights against ChanServ. Please note that nothing will
happen if we are the only one in the channel after 15 secs since this module
only checks if it needs to do something when someone leaves a channel.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:36:59 +02:00
Uli Schlachter 891d7a3e3a route_replies: Improve the timeout message
Fixes #57.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:36:13 +02:00
Kyle Fuller ebab559931 Fix CChan::TrimBuffer() (#63)
CChan::TrimBuffer() was trying to do "m_vsBuffer.begin() + -<some number>" which would cause a segmentation fault

Fixes #63
2011-09-13 09:36:02 +02:00
Uli Schlachter b6903fd798 Increase the version number to 0.201
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-13 09:35:38 +02:00
Uli Schlachter d91803bf22 Increase the version number to 0.200
Signed-off-by: Uli Schlachter <psychon@znc.in>
znc-0.200
2011-08-20 22:33:15 +02:00
Kyle Fuller 6aa31689ac [cert module] Allow \r\n to be inside a certificate when uploading with the web interface.
Thanks to Robby for reporting
2011-08-16 22:19:43 +01:00
Kyle Fuller 74919a8759 Fix uploading a certificate in the web interface for the cert module 2011-08-16 20:38:51 +01:00
Uli Schlachter 8f53d3fbb0 Fix modp{erl,ython} installation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-06 10:43:39 +02:00
Kyle Fuller e86ff3219d Fix module data for extra/ modules for real 2011-08-05 22:16:21 +01:00
Uli Schlachter da0ba75549 Fix CString::Escape_n() and add some tests for it
This bug was originally reported by someone on irc, but sadly I forgot who it
was. Sorry!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-05 16:09:22 +02:00
Uli Schlachter cb6798d36f Fix module data for extra/ modules
No module in extra/ comes with any data currently, so this was tested by moving
perform to extra/. The install is untested.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-05 15:19:09 +02:00
Uli Schlachter 8d17f50600 Include zncconfig.h in all headers
The rule is that zncconfig.h must be the very same thing that is included. We
cheat and only include it in headers (so that modules dont have to have be
changed). However, it looks like some modules where missed.

This commit fixes test/ConfigTest which crashed if _GLIBCXX_DEBUG was enabled
(--enable-debug) because it didn't see this define before including a c++
header.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-05 15:02:04 +02:00
Uli Schlachter dcf357b1f6 Stop asking for the host name in --makepem
Come on, it's a self-signed certificate, how much value does it have anyway?
Also, it gets rid of a question during --makeconf which confuses some people.

This should now use $HOSTNAME and fall back to "host.unknown" if that isn't set.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-08-03 22:05:21 +02:00
Kyle Fuller 90f741d2ca Make the CUser::IsIRCConnected method check if the IRC connection is authed because may of its callers expect this behaviour.
This fixes a bug reported by Robby where a channel could become disabled while a the user is connected to irc, but before they have authenticated.
2011-07-29 19:21:25 +01:00
Uli Schlachter 9685f16b96 Fix a memleak in CChan::AddNick()
This memleak existed since 5e070e788 from almost a year ago.

Thanks to Olipro for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-27 15:14:01 +02:00
Uli Schlachter f1cb09bd9c Don't send a MODE request when JOINing
Since commit 1a1cc4c756, we'd always send a "MODE #chan" to IRC when we
received a "JOIN #chan". It used to work before that commit, because the mode
reply which is automatically sent on join is sent before the "end of /names"
numeric.

This just removes that MODE request. Proper IRC server should always send a MODE
reply on channel join.

Thanks to nyuszika7h`` for the report.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-27 15:12:03 +02:00
Uli Schlachter dd56a3c2ba Broadcast an error on EMFILE
When we hit the "maximum open files" limit, we close the listener that hit this
error. Previously we did so silently which means no one could figure out what
happened.

This commits adds a broadcast message giving a hint, but this should never
happen in a real-world situation anyway (unless you have 1000 users).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-25 16:58:11 +02:00
Alexey Sokolov 795126031b Fix verifying listener in --makeconf.
If ZNC is compiled with IPv6, ZNC tried to verify the listener using
IPv6 regardless of what user said.

Thanks to wodim for reporting this.
2011-07-19 08:48:57 +07:00
Alexey Sokolov ea58912093 Hide every symbol except ZNCModInfo from modules.
This means that now it's possible to have the same class names in
different modules, which reduces chances of weird errors.

Thanks to mclc for noticing this.
2011-07-15 22:56:47 +07:00
Alexey Sokolov efda366d44 Fix znc-buildmod if znc was compiled out of tree. 2011-07-15 21:44:15 +07:00
Uli Schlachter 789f1ff7b5 Update to latest Csocket
This fixes the "busy loop waiting for an SSL handshake to finish" which the last
"Update to latest Csocket" was already supposed to fix. However, that fix had a
bug if poll() is used instead of select().

poll()'s timeout argument is in milliseconds while select also allows
microseconds. Since Csocket originally used select(), it expects the
microseconds-approach. This means it has to divide by 1000 to get the timeout
argument for poll().

However, the iQuickReset which was used to "fix" (rather: hide) the busy loop
was less than 1ms so this still resulted in a timeout of 0 (= busy loop) because
integer division truncates the result.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-13 20:47:56 +02:00
Uli Schlachter 4fbca80705 WebMods: Set another cookie if the IP check fails
This means that they will get a new cookie on the next request. This will make
sure that you will be able to use webadmin again if your IP changed (which seems
to happen to quite a number of people).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-13 20:40:55 +02:00
Uli Schlachter 00024b1b3a znc-buildmod: Print znc's version number
This helps people figuring out that they are still building their modules for
the wrong znc version since they have more than one installation on their box.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-13 19:56:48 +02:00
Alexey Sokolov 63e8d42e3d Don't fail to load if can't find fixfreenode. 2011-07-10 19:46:34 +07:00
Alexey Sokolov 7ea5e1fd4c Remove fixfreenode module.
Old CAPAB method doesn't work with freenode now, and new CAP method is
handled by CAP support in the core.
2011-07-06 00:52:18 +07:00
Uli Schlachter 88e7f093a1 Update to latest Csocket
Fixes:

- A possible crash bug for empty DNS replies with c-ares. E.g. a AAAA lookup for
  google.com doesn't give any reply but is still successful. This might be a
  c-ares bug (there is ARES_ENODATA) or c-ares just changed its behavior?
  (No bug report, just noticed accidentally)
- Connecting to ipv4-only hosts with a v6 bindhost caused weird errors:
  https://github.com/znc/znc/issues/47
- There was a pull request for some DSA server certificate thingy:
  https://github.com/znc/znc/pull/46
- Busy loop waiting for an SSL handshake to finish:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631590
- Some other stuff? No idea what some of the changes in here are actually doing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-06-26 12:11:40 +02:00
Uli Schlachter 554429a61f Fix a bug in MCString::Encode()
For character values above 127, the signed char that could be used here did the
wrong thing. That is, *it >> 4 returned a negative value and the array hexdigits
was read indexed with that wrong value.

Fix this by explicitly using unsigned char.

Thanks to crocket for reporting this bug which he found with perform (broken
entries after a restart/reload).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-06-13 15:19:17 +02:00
Uli Schlachter 25ce7de020 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 <psychon@znc.in>
2011-06-11 18:33:50 +02:00
Uli Schlachter ca97dca6dc Use references instead of pointers for CModInfo
This works fine and reduces the chances of memory leaks.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-06-11 18:16:00 +02:00
Alexey Sokolov d683aea48d Merge branch 'modinfo' 2011-06-11 18:32:09 +07:00
Alexey Sokolov f7c4f5459c Support wiki pages names in python modules.
Also this fixes showing python modules in available modules list.
2011-06-11 18:28:46 +07:00
Alexey Sokolov 79e78608b3 Support wiki pages names for perl modules. 2011-06-11 18:21:06 +07:00
Alexey Sokolov 262216731b Add link to wiki page from any nonextra module. 2011-06-11 18:09:56 +07:00
Alexey Sokolov 0c840f922d Modules can now provide its wiki page name.
It's shown on webadmin as a link.
2011-06-11 17:46:37 +07:00
Alexey Sokolov e6e3331457 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.
2011-06-11 17:28:15 +07:00