]> jfr.im git - irc/rizon/znc.git/log
irc/rizon/znc.git
3 years agoWrite forceserver and webircpassword to conf rizon origin/HEAD origin/rizon
Adam [Wed, 12 May 2021 03:04:05 +0000 (23:04 -0400)] 
Write forceserver and webircpassword to conf

3 years agoMake force local conn server configurable
Adam [Sat, 16 Jan 2021 19:07:23 +0000 (14:07 -0500)] 
Make force local conn server configurable

3 years agoMove webirc password to config
Adam [Sat, 16 Jan 2021 18:50:45 +0000 (13:50 -0500)] 
Move webirc password to config

3 years agoFix build on modern libssl versions
Adam [Sat, 16 Jan 2021 17:46:42 +0000 (12:46 -0500)] 
Fix build on modern libssl versions

7 years agoRevert "Revert "Enable debugging by default""
Adam [Wed, 31 Aug 2016 20:59:30 +0000 (16:59 -0400)] 
Revert "Revert "Enable debugging by default""

This reverts commit 312c3ad63157e22eb37997eec7425da9accd9315.

8 years agoWrite config files less often with chansaver
Adam [Tue, 8 Mar 2016 21:42:44 +0000 (16:42 -0500)] 
Write config files less often with chansaver

8 years agoRevert "Enable debugging by default"
Adam [Sat, 12 Dec 2015 17:42:07 +0000 (12:42 -0500)] 
Revert "Enable debugging by default"

This reverts commit fcf54795632f1d1f31a84e31587065ecf656f5d1.

10 years agoAnnotate detach message with number of clients remaining, if applicable.
Nolan Lum [Sun, 18 May 2014 01:35:54 +0000 (18:35 -0700)] 
Annotate detach message with number of clients remaining, if applicable.

This resolves the issue where users would be marked inactive if a detach occurs while another client is still attached.

10 years agoDon't redefine _FORTIFY_SOURCE if compiler already defines it
Alexey Sokolov [Sun, 19 Jan 2014 10:13:30 +0000 (10:13 +0000)] 
Don't redefine _FORTIFY_SOURCE if compiler already defines it

10 years agoautogen.sh: Check for pkg-config before calling automake
Uli Schlachter [Wed, 22 Jan 2014 19:58:52 +0000 (20:58 +0100)] 
autogen.sh: Check for pkg-config before calling automake

Signed-off-by: Uli Schlachter <redacted>
Conflicts:
autogen.sh

10 years agoDon't make backup of znc.conf readable by everyone.
Alexey Sokolov [Sat, 15 Jun 2013 17:15:38 +0000 (21:15 +0400)] 
Don't make backup of znc.conf readable by everyone.

It doesn't really matter, since the whole ~/.znc/ is not readable, but
it's better to be safe.

10 years agoMakefile: Remove unused (and broken) variable
Uli Schlachter [Tue, 7 May 2013 19:33:46 +0000 (21:33 +0200)] 
Makefile: Remove unused (and broken) variable

Signed-off-by: Uli Schlachter <redacted>
10 years agoroute_replies: Add some WHOIS numerics
Mantas Mikulėnas [Sun, 28 Apr 2013 00:09:42 +0000 (03:09 +0300)] 
route_replies: Add some WHOIS numerics

Charybdis can return all these.

Conflicts:
modules/route_replies.cpp

10 years agoMake /znc detach case insensitive
Kyle Fuller [Sat, 22 Dec 2012 17:41:24 +0000 (17:41 +0000)] 
Make /znc detach case insensitive

Closes #213

Conflicts:
ClientCommand.cpp

10 years agoDETACH should support the same syntax as PART (except no message)
Nolan Lum [Tue, 4 Mar 2014 01:35:11 +0000 (17:35 -0800)] 
DETACH should support the same syntax as PART (except no message)

Closes #225, this isn't the same as #225, but `/msg *status detach` is
something different, since it supports wildcard matching.

10 years agoCModule::OnMode(): Fix a stupid NULL pointer dereference
Uli Schlachter [Thu, 6 Dec 2012 16:28:05 +0000 (17:28 +0100)] 
CModule::OnMode(): Fix a stupid NULL pointer dereference

When joining a channel, OnMode() (via SetModes()) was called with pOpNick ==
NULL. This bad pointer was turned into a reference and given to modules.

This bug exists since 2008 when the OnMode() module call was added. It wasn't
noticed before because apparently no module used this CNick argument before.

Signed-off-by: Uli Schlachter <redacted>
Conflicts:
Chan.cpp

10 years agoDon't send our password required notice until after CAP negotiation
Kyle Fuller [Thu, 28 Jun 2012 20:15:12 +0000 (21:15 +0100)] 
Don't send our password required notice until after CAP negotiation

Conflicts:
Client.cpp

10 years agorfc1459 states that PART can take multiple channels
Nolan Lum [Tue, 4 Mar 2014 02:24:39 +0000 (18:24 -0800)] 
rfc1459 states that PART can take multiple channels

Parameters: <channel>{,<channel>}

Fixes #175

10 years agoCString("off").ToBool() shouldn't be true
Kyle Fuller [Tue, 6 Mar 2012 18:00:43 +0000 (18:00 +0000)] 
CString("off").ToBool() shouldn't be true

10 years agoFix Makefiles so we actually use RIZON, and clean up properly.
Nolan Lum [Tue, 4 Mar 2014 00:57:06 +0000 (16:57 -0800)] 
Fix Makefiles so we actually use RIZON, and clean up properly.

10 years agoRemove module we don't use anymore.
Nolan Lum [Mon, 3 Mar 2014 09:25:08 +0000 (01:25 -0800)] 
Remove module we don't use anymore.

10 years agoAdd Rizon flag to configure.ac, move Rizon modules into separate directory.
Nolan Lum [Mon, 3 Mar 2014 09:19:31 +0000 (01:19 -0800)] 
Add Rizon flag to configure.ac, move Rizon modules into separate directory.

10 years agoDon't print debug info to stdout with a debug compile if it is not isatty()
Adam [Sun, 8 Dec 2013 01:37:43 +0000 (20:37 -0500)] 
Don't print debug info to stdout with a debug compile if it is not isatty()

10 years agoFix DelClients(), removing clients can modify the client vector
Adam [Mon, 16 Sep 2013 15:36:26 +0000 (11:36 -0400)] 
Fix DelClients(), removing clients can modify the client vector

11 years agoEnable debugging by default rizon-0.206
Adam [Mon, 10 Sep 2012 15:01:58 +0000 (11:01 -0400)] 
Enable debugging by default

11 years agoAlso remove kicked users channels
Adam [Fri, 7 Sep 2012 19:25:14 +0000 (15:25 -0400)] 
Also remove kicked users channels

11 years agoFix chansaver to not rewrite the config each time a user joins a channel on startup
Adam [Fri, 7 Sep 2012 19:20:15 +0000 (15:20 -0400)] 
Fix chansaver to not rewrite the config each time a user joins a channel on startup

11 years agoMove away and notify_connect out of extras
Adam [Fri, 24 Aug 2012 20:29:51 +0000 (16:29 -0400)] 
Move away and notify_connect out of extras

11 years agoMerge commit 'znc-0.206' into rizon
Adam [Fri, 24 Aug 2012 20:26:16 +0000 (16:26 -0400)] 
Merge commit 'znc-0.206' into rizon

11 years agoWhy was this removed
Adam [Tue, 17 Jul 2012 00:12:34 +0000 (20:12 -0400)] 
Why was this removed

11 years agoImport of Rizon's ZNC-0.200
Nol888 [Sun, 3 Jun 2012 02:23:22 +0000 (22:23 -0400)] 
Import of Rizon's ZNC-0.200

12 years agoIncrease the version number to 0.206 znc-0.206
Uli Schlachter [Thu, 5 Apr 2012 19:24:36 +0000 (21:24 +0200)] 
Increase the version number to 0.206

Signed-off-by: Uli Schlachter <redacted>
12 years agoimapauth: Follow RFC more closely
Uli Schlachter [Fri, 30 Mar 2012 21:15:57 +0000 (23:15 +0200)] 
imapauth: Follow RFC more closely

The IMAP RFC allows the server to announce its capabilities before replying to
the LOGIN command. imapauth would misinterpret that as a failed login.

The fix is to only handle lines which contain the tag ("AUTH") used for the
login command.

Thanks to rlpowell for reporting that imapauth doesn't work against
imap.google.com and for testing the fix.

Signed-off-by: Uli Schlachter <redacted>
12 years agoResetJoinTries once we enable a channel
Kyle Fuller [Wed, 21 Mar 2012 21:57:56 +0000 (21:57 +0000)] 
ResetJoinTries once we enable a channel

Fixes #83

12 years agoAsk for port > 1024 in --makeconf
Alexey Sokolov [Sat, 10 Mar 2012 01:24:19 +0000 (08:24 +0700)] 
Ask for port > 1024 in --makeconf

There're so many people who try lower ports and get permission denied :(
Who really wants to use privileged port, can add it using /znc addport

12 years ago"no" should be false in CString::ToBool()
Kyle Fuller [Sun, 15 Jan 2012 05:04:21 +0000 (05:04 +0000)] 
"no" should be false in CString::ToBool()

12 years agoMake certs valid for 10 years
Uli Schlachter [Fri, 13 Jan 2012 19:57:10 +0000 (20:57 +0100)] 
Make certs valid for 10 years

Previously, a certificate generated with --makepem expired after a year which is
weird and pointless (come on, it's self-signed!).

Signed-off-by: Uli Schlachter <redacted>
12 years agoidentfile: Make sure member values are NULL
Kyle Fuller [Thu, 22 Mar 2012 22:49:59 +0000 (22:49 +0000)] 
identfile: Make sure member values are NULL

12 years agoAdd Show command to identfile.
Alexey Sokolov [Wed, 14 Mar 2012 18:04:27 +0000 (01:04 +0700)] 
Add Show command to identfile.

It should help us to debug that annoying bug of identfile aborting
connections...

12 years agoCFile: Make sure errno is always set correctly
Uli Schlachter [Sun, 22 Jan 2012 17:51:01 +0000 (18:51 +0100)] 
CFile: Make sure errno is always set correctly

This fixes weird problems were strerror() made us print garbage.

Signed-off-by: Uli Schlachter <redacted>
12 years agoCTCP's with no values should not be passed to the client
Kyle Fuller [Tue, 17 Jan 2012 21:40:14 +0000 (21:40 +0000)] 
CTCP's with no values should not be passed to the client

Fixes #105

12 years agoIdentfile: don't crash when ZNC is shutting down.
Alexey Sokolov [Thu, 26 Jan 2012 23:37:15 +0000 (06:37 +0700)] 
Identfile: don't crash when ZNC is shutting down.

Thanks to Domin for reporting this.

Conflicts:

modules/identfile.cpp

12 years agoIncrease the version number to 0.204 znc-0.204
Uli Schlachter [Sun, 22 Jan 2012 17:13:31 +0000 (18:13 +0100)] 
Increase the version number to 0.204

Signed-off-by: Uli Schlachter <redacted>
12 years agoautoreply: Honor RFC 2812.
Alexey Sokolov [Tue, 29 Nov 2011 11:45:27 +0000 (18:45 +0700)] 
autoreply: Honor RFC 2812.

There must not be autoreply for notices.

Thanks to nyuszika7h for noticing this.

12 years agoRemove notes on the GENERATE command in the cert module
Kyle Fuller [Mon, 21 Nov 2011 20:20:51 +0000 (20:20 +0000)] 
Remove notes on the GENERATE command in the cert module

12 years agoroute_replies: Handle raw 482
Uli Schlachter [Sat, 5 Nov 2011 11:17:31 +0000 (12:17 +0100)] 
route_replies: Handle raw 482

lahwran reported the following message from *route_replies and also figured out
which message we failed to handle, thanks!

<*route_replies> This module hit a timeout which is possibly a bug.
<*route_replies> To disable this message, do "/msg *route_replies silent yes"
<*route_replies> Last request: MODE #somesecretchannel I

Signed-off-by: Uli Schlachter <redacted>
12 years agoChange the order of -I directives in Makefile.
Alexey Sokolov [Sat, 5 Nov 2011 04:51:53 +0000 (11:51 +0700)] 
Change the order of -I directives in Makefile.

If ZNC was already installed, it had its headers somewhere.
The chances are that something else can be installed at the same place,
including some ZNC's dependency whose include dir would be included to
CXXFLAGS. Another possibility of including that dir is triggered when
using FreeBSD - ./configure explicitly adds -I/usr/local/include in that
case.

And so we get a directory with old ZNC headers included to CXXFLAGS
before our new shiny ./include.

With their order changed, the proper headers are included now.

Thanks to those who repored the issue, thanks to PsWii60 for helping to
track it down, thanks to my parents for creating me and therefore
enabling me to fix it, and to many other people.

Conflicts:

Makefile.in
modules/Makefile.in

12 years agoDon't use "mkdir" during install
Uli Schlachter [Thu, 3 Nov 2011 07:54:23 +0000 (08:54 +0100)] 
Don't use "mkdir" during install

lahwran just showed up on irc and told us that he installed znc, but znc failed
to find any modules. The reason for this was his umask 077 which means that
"make install" installed stuff so that only root can access it.

The solution is do use "install -d" since that makes sure to ignore the
currently set umask.

However, google finds results which say that "install -d" might mess with stuff
of pre-existing directories when it shouldn't, so we must first test if the
directory already exists before calling install. Obviously, this makes our
Makefile a lot more readable. :-(

I didn't have time to test this properly, so stuff might break.

Signed-off-by: Uli Schlachter <redacted>
Conflicts:

modules/Makefile.in

12 years agoCheck for /usr/bin/swig2.0 too.
Alexey Sokolov [Thu, 3 Nov 2011 03:49:14 +0000 (10:49 +0700)] 
Check for /usr/bin/swig2.0 too.

SWIG 2 is named that way on Debian-based systems...

12 years agoidentfile: Improve the debug messages
Kyle Fuller [Fri, 7 Oct 2011 10:30:31 +0000 (11:30 +0100)] 
identfile: Improve the debug messages

The new debug messages allow us to see when the identfile is unlocked

Conflicts:

modules/identfile.cpp

12 years agoImprove admin module description.
Alexey Sokolov [Thu, 6 Oct 2011 14:47:52 +0000 (21:47 +0700)] 
Improve admin module description.

12 years agoFscking perl... This fixes modperl's compilation.
Alexey Sokolov [Tue, 4 Oct 2011 03:29:55 +0000 (10:29 +0700)] 
Fscking perl... This fixes modperl's compilation.

12 years agoThis avoids your irc windows being filled with away stuff
Toon Schoenmakers [Sat, 24 Sep 2011 20:34:45 +0000 (22:34 +0200)] 
This avoids your irc windows being filled with away stuff

Downside of antiidle is that because it messages yourself internally
the irc server will send messages to you when you're marked as away.
This can end up being really annoying, so those messages are blocked
with these changes.

Signed-off-by: Toon Schoenmakers <redacted>
12 years agoSend a MODE request when JOINing
Uli Schlachter [Thu, 22 Sep 2011 18:18:26 +0000 (20:18 +0200)] 
Send a MODE request when JOINing

This kind of reverts/fixes f1cb09bd9ce0489d96f4ef91b3e226e0b0a37662.

Robby found a bug with evil ChanServ which goes like this:

- You join an empty, but registered channel and the IRCd applies its default
  modes (+nt), but ZNC didn't ask for MODE, so doesn't know this.
- ChanServ applies whatever channel modes it wants to apply. This causes ZNC to
  see a mode change (e.g. +s).

The result of this is that ZNC thinks that the channel has mode +s and it will
tell every client that connects to it about this.

The fix is to send a MODE request when JOINing. To make sure that we don't
confuse clients, we block the reply.

Signed-off-by: Uli Schlachter <redacted>
12 years agoSHA256.cpp: Include some ZNC header first
Uli Schlachter [Thu, 22 Sep 2011 16:25:22 +0000 (18:25 +0200)] 
SHA256.cpp: Include some ZNC header first

This is required to make sure that zncconfig.h is the very first header that is
being included.

This problem was noticed by someone reporting some "macro redefined" warnings.

Signed-off-by: Uli Schlachter <redacted>
12 years agoMove autocycle module to extra.
Alexey Sokolov [Sun, 4 Sep 2011 17:44:33 +0000 (00:44 +0700)] 
Move autocycle module to extra.

Modern/decent networks have services anyway, and for registered channels
this module is useless. Also it tends to fight ChanServ in case if
ChanServ joins/parts the channel to remove ops.

Users of deprecated ne^W^Wnetworks without services can use it from extra.

12 years agoDrop @DEFS@ from the build system
Uli Schlachter [Mon, 29 Aug 2011 12:02:39 +0000 (14:02 +0200)] 
Drop @DEFS@ from the build system

This will only ever be set to -DHAVE_CONFIG_H. However, we shouldn't give this
flag to other people's code (e.g. through znc-config). Since we don't need it,
it's best to just drop it completely.

Signed-off-by: Uli Schlachter <redacted>
12 years agoAdd a message sent to user in case of redirect.
Alexey Sokolov [Wed, 31 Aug 2011 19:41:12 +0000 (02:41 +0700)] 
Add a message sent to user in case of redirect.

12 years agoLet a user filter the result of help CModule::HandleHelpCommand
Kyle Fuller [Wed, 31 Aug 2011 13:00:00 +0000 (14:00 +0100)] 
Let a user filter the result of help CModule::HandleHelpCommand

12 years agoDon't forward server redirects to client.
TorrentialStorm [Wed, 24 Aug 2011 16:55:59 +0000 (17:55 +0100)] 
Don't forward server redirects to client.

12 years agoDon't send server redirects to client [TorrentialStorm]
TorrentialStorm [Wed, 24 Aug 2011 12:15:20 +0000 (13:15 +0100)] 
Don't send server redirects to client [TorrentialStorm]

12 years agoUnload modules in reverse order.
Alexey Sokolov [Tue, 9 Aug 2011 17:37:56 +0000 (00:37 +0700)] 
Unload modules in reverse order.

12 years agoIncrease the version number to 0.203
Uli Schlachter [Sun, 1 Jan 2012 12:48:13 +0000 (13:48 +0100)] 
Increase the version number to 0.203

Signed-off-by: Uli Schlachter <redacted>
12 years agoFix crash in bouncedcc module.
Alexey Sokolov [Sat, 31 Dec 2011 17:47:01 +0000 (00:47 +0700)] 
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.

12 years agoIncrease the version number to 0.202 znc-0.202
Uli Schlachter [Wed, 21 Sep 2011 20:19:51 +0000 (22:19 +0200)] 
Increase the version number to 0.202

Signed-off-by: Uli Schlachter <redacted>
12 years agofix formatting
Jim Hull [Tue, 13 Sep 2011 22:09:54 +0000 (15:09 -0700)] 
fix formatting

12 years agorework SendBuffer fixing an issue where ClearBuffer() nuked the buffer after playing...
Jim Hull [Tue, 13 Sep 2011 22:03:09 +0000 (15:03 -0700)] 
rework SendBuffer fixing an issue where ClearBuffer() nuked the buffer after playing to the first client
(cherry picked from commit 793c34699a0de8a384cea359821beea66c1a00a4)

Conflicts:

Chan.cpp

12 years agoInstall .py files along with .pyc
Alexey Sokolov [Wed, 31 Aug 2011 19:55:13 +0000 (02:55 +0700)] 
Install .py files along with .pyc
(cherry picked from commit 5e73af632ab1f6e6112fdd983c9c8866fe1a0a9d)

12 years agofixed a null reference to pClient in hooks 'OnChanBufferStarting,OnChanBufferStarting...
Jim Hull [Tue, 13 Sep 2011 06:03:03 +0000 (23:03 -0700)] 
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 <redacted>
12 years agoDon't timeout bouncedcc connections, inactive bounced DCC chat's would be dropped...
Kyle Fuller [Wed, 31 Aug 2011 02:09:06 +0000 (02:09 +0000)] 
Don't timeout bouncedcc connections, inactive bounced DCC chat's would be dropped otherwise

12 years agoadmin: Fix getchan {inconfig,keepbuffer,detached}
Uli Schlachter [Mon, 29 Aug 2011 12:10:45 +0000 (14:10 +0200)] 
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 <redacted>
12 years agoAdd -r parameter of ZNC to man.
Alexey Sokolov [Sun, 4 Sep 2011 03:33:06 +0000 (10:33 +0700)] 
Add -r parameter of ZNC to man.

It was missing.

Thanks to flaccid for noticing that.

12 years agofix build error when compiling against uclibc(++)
Jonas Gorski [Sun, 4 Sep 2011 10:54:09 +0000 (12:54 +0200)] 
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 <redacted>
Signed-off-by: Uli Schlachter <redacted>
12 years agoautocycle: Only cycle once in 15 seconds
Uli Schlachter [Sun, 4 Sep 2011 19:00:06 +0000 (21:00 +0200)] 
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 <redacted>
12 years agoroute_replies: Improve the timeout message
Uli Schlachter [Mon, 5 Sep 2011 06:22:58 +0000 (08:22 +0200)] 
route_replies: Improve the timeout message

Fixes #57.

Signed-off-by: Uli Schlachter <redacted>
12 years agoFix CChan::TrimBuffer() (#63)
Kyle Fuller [Sun, 4 Sep 2011 19:18:26 +0000 (19:18 +0000)] 
Fix CChan::TrimBuffer() (#63)

CChan::TrimBuffer() was trying to do "m_vsBuffer.begin() + -<some number>" which would cause a segmentation fault

Fixes #63

12 years agoIncrease the version number to 0.201
Uli Schlachter [Sat, 20 Aug 2011 20:35:14 +0000 (22:35 +0200)] 
Increase the version number to 0.201

Signed-off-by: Uli Schlachter <redacted>
12 years agoIncrease the version number to 0.200 znc-0.200
Uli Schlachter [Sat, 20 Aug 2011 20:33:15 +0000 (22:33 +0200)] 
Increase the version number to 0.200

Signed-off-by: Uli Schlachter <redacted>
12 years ago[cert module] Allow \r\n to be inside a certificate when uploading with the web inter...
Kyle Fuller [Tue, 16 Aug 2011 21:19:43 +0000 (22:19 +0100)] 
[cert module] Allow \r\n to be inside a certificate when uploading with the web interface.

Thanks to Robby for reporting

12 years agoFix uploading a certificate in the web interface for the cert module
Kyle Fuller [Tue, 16 Aug 2011 19:36:32 +0000 (20:36 +0100)] 
Fix uploading a certificate in the web interface for the cert module

12 years agoFix modp{erl,ython} installation
Uli Schlachter [Sat, 6 Aug 2011 08:43:39 +0000 (10:43 +0200)] 
Fix modp{erl,ython} installation

Signed-off-by: Uli Schlachter <redacted>
12 years agoFix module data for extra/ modules for real
Kyle Fuller [Fri, 5 Aug 2011 21:16:21 +0000 (22:16 +0100)] 
Fix module data for extra/ modules for real

12 years agoFix CString::Escape_n() and add some tests for it
Uli Schlachter [Fri, 5 Aug 2011 14:05:05 +0000 (16:05 +0200)] 
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 <redacted>
12 years agoFix module data for extra/ modules
Uli Schlachter [Fri, 5 Aug 2011 13:19:09 +0000 (15:19 +0200)] 
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 <redacted>
12 years agoInclude zncconfig.h in all headers
Uli Schlachter [Fri, 5 Aug 2011 13:02:04 +0000 (15:02 +0200)] 
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 <redacted>
12 years agoStop asking for the host name in --makepem
Uli Schlachter [Wed, 3 Aug 2011 20:05:21 +0000 (22:05 +0200)] 
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 <redacted>
12 years agoMake the CUser::IsIRCConnected method check if the IRC connection is authed because...
Kyle Fuller [Fri, 29 Jul 2011 18:21:25 +0000 (19:21 +0100)] 
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.

12 years agoFix a memleak in CChan::AddNick()
Uli Schlachter [Wed, 27 Jul 2011 13:14:01 +0000 (15:14 +0200)] 
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 <redacted>
12 years agoDon't send a MODE request when JOINing
Uli Schlachter [Wed, 27 Jul 2011 13:05:40 +0000 (15:05 +0200)] 
Don't send a MODE request when JOINing

Since commit 1a1cc4c756e, 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 <redacted>
12 years agoBroadcast an error on EMFILE
Uli Schlachter [Mon, 25 Jul 2011 14:58:11 +0000 (16:58 +0200)] 
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 <redacted>
12 years agoFix verifying listener in --makeconf.
Alexey Sokolov [Tue, 19 Jul 2011 01:48:57 +0000 (08:48 +0700)] 
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.

12 years agoHide every symbol except ZNCModInfo from modules.
Alexey Sokolov [Fri, 15 Jul 2011 15:56:47 +0000 (22:56 +0700)] 
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.

12 years agoFix znc-buildmod if znc was compiled out of tree.
Alexey Sokolov [Fri, 15 Jul 2011 14:41:53 +0000 (21:41 +0700)] 
Fix znc-buildmod if znc was compiled out of tree.

12 years agoUpdate to latest Csocket
Uli Schlachter [Wed, 13 Jul 2011 18:47:56 +0000 (20:47 +0200)] 
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 <redacted>
12 years agoWebMods: Set another cookie if the IP check fails
Uli Schlachter [Wed, 13 Jul 2011 18:40:55 +0000 (20:40 +0200)] 
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 <redacted>
12 years agoznc-buildmod: Print znc's version number
Uli Schlachter [Wed, 13 Jul 2011 17:54:35 +0000 (19:54 +0200)] 
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 <redacted>
12 years agoDon't fail to load if can't find fixfreenode.
Alexey Sokolov [Sun, 10 Jul 2011 12:46:34 +0000 (19:46 +0700)] 
Don't fail to load if can't find fixfreenode.

12 years agoRemove fixfreenode module.
Alexey Sokolov [Tue, 5 Jul 2011 17:52:18 +0000 (00:52 +0700)] 
Remove fixfreenode module.

Old CAPAB method doesn't work with freenode now, and new CAP method is
handled by CAP support in the core.

12 years agoUpdate to latest Csocket
Uli Schlachter [Sun, 26 Jun 2011 10:11:40 +0000 (12:11 +0200)] 
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 <redacted>
12 years agoFix a bug in MCString::Encode()
Uli Schlachter [Mon, 13 Jun 2011 13:19:17 +0000 (15:19 +0200)] 
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 <redacted>