Commit Graph

196 Commits

Author SHA1 Message Date
Uli Schlachter
58a34fa5ad Improve the way that VERSION_EXTRA is calculated
Instead of doing magic with the result from version.sh so that we can add a
preprocessor macro, the script now just writes src/version.cpp with the expected
content. This should fix all the various issues that we have with quoting the
arguments and things that go wrong when not building znc from a git clone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-31 19:32:44 +02:00
Alexey Sokolov
8fdb530ee3 Fix use-after-free which may happen during shutdown
If a module, e.g. keepnick, tries to remove a timer in
OnIRCDisconnected.

Thanks to KindOne for the report.
2013-03-31 23:40:19 +07:00
Uli Schlachter
53c579b296 CJob: Add a way to do stuff on the main thread
This just moves the pipe from the socket code to the thread pool. However, now
all CJobs can use this and there is a single place for them to get deleted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15 11:58:27 +01:00
Uli Schlachter
75f2e3fa41 Add a generic threads abstraction
This should make it easier to work with threads. It provides classes for mutexes
and condition variables. Additionally, there is a special CMutexGuard that
automatically unlocks the mutex on destruction and a CThreadPool class.

This thread pool is used to replace the thread pool in the sockets code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-15 11:58:22 +01:00
KindOne
2db7307ac3 Remove unneeded headers. 2013-03-08 01:47:57 +07:00
KindOne
c9ac8f5e5e Explain that altering znc.conf by hand is a bad idea. Fixed a typo. 2013-03-08 01:46:44 +07:00
baines
82a708d6a1 Cleaned up more warnings. 2013-02-27 20:53:14 -05:00
baines
c256116d81 Catch as references 2013-02-26 22:03:15 -05:00
Alexey Sokolov
538a41cbae Show password in --makepass in new format 2013-02-01 00:17:18 +07:00
Alexey Sokolov
ad06b170d6 A bit more consistency bewteen Del* and Rem*
Thanks to Kult for reporting this
2013-01-29 20:52:20 +07:00
Alexey Sokolov
0491e55926 Fix one more case of dlerror(), if it returns NULL after error. 2013-01-27 01:48:27 +07:00
Alexey Sokolov
7312a36629 Don't lose dlerror() message.
Some weird systems seem to use dl functions while doing std::string
concatenation...

Thanks to Hoss for reporting it
2013-01-27 01:26:52 +07:00
Un1matr1x
3a34593359 The same procedure as last year, Miss sophie?
Same procedure as every year, James.
2012-12-31 12:44:31 +01:00
Alexey Sokolov
27eb957964 Don't disconnect networkless users without PINGing them first.
Thanks to Austin for reporting this issue.
2012-12-27 01:40:13 +07:00
Alexey Sokolov
390957723c Fix changing client nick when client connects.
If nicks are equal, it's not changed. The problem was that equality was
checked case-insensitively.

This makes some clients which compare nicks case-sensitively think that
JOINs which we send to them, are not related to the user, it's someone
else joining. So Konversation users which have lower case version of
their IRC nick configured in Konversation settings, didn't get their
channel opened when connecting to ZNC.

Thanks to Axanon for helping to investigate the issue.
2012-12-26 00:36:49 +07:00
Alexey Sokolov
02504626bc Merge branch 'master' of github.com:znc/znc 2012-12-25 00:29:25 +07:00
Alexey Sokolov
412bdb7869 Fix my fix which was supposed to fix #220
Thanks to KindOne for reporting the issue with that fix.

363 numeric was sent twice to the client for attached channels.
2012-12-25 00:28:10 +07:00
Kyle Fuller
6a55c3a0ee Make /znc detach case insensitive
Closes #213
2012-12-22 17:41:24 +00:00
Kyle Fuller
9e7110175a 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.
2012-12-22 17:16:57 +00:00
Alexey Sokolov
369f93cbbe Merge branch 'detached-fix' 2012-12-20 22:13:04 +07:00
Alexey Sokolov
ebf9aebf51 Fix detached 363 too 2012-12-20 22:12:21 +07:00
Alexey Sokolov
c216c94696 Fix renaming away to awaystore for user modules.
When it was renamed, it already was a network module, and IRCNetwork got
a check for away module.
But users of 0.206 and earlier have this module loaded as user module,
they even can't have networks at all, so the renaming didn't go smooth
for them :(

It's broken in 1.0 already anyway, but users who skip 1.0 and upgrade
from older version to 1.2+ directly will be happier.

Thanks to Ammler (Marcel Gmür) for reporting it.
2012-12-20 21:41:24 +07:00
Alexey Sokolov
deb38b060e Check detachedness of chans. Fix #220 2012-12-08 23:22:02 +07:00
Uli Schlachter
8ffab186b4 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 <psychon@znc.in>
2012-12-06 17:28:05 +01:00
Alexey Sokolov
1c8485cebe Update server-time to new specs with ISO 8601 2012-11-24 01:45:36 +07:00
Alexey Sokolov
4036114975 Add CModule::ExpandString()
It chooses which ExpandString() to call, of user or of network.
2012-11-23 21:40:30 +07:00
Alexey Sokolov
978e3b7832 Fix a typo and user modes.
Thanks to KindOne for noticing it.
2012-11-22 01:32:58 +07:00
Alexey Sokolov
94cce5ae38 Update Csocket, fix #254 2012-11-21 00:53:39 +07:00
Alexey Sokolov
f54d4d443f Merge commit 'refs/pull/206/head' of github.com:znc/znc 2012-11-07 21:40:37 +07:00
Alexey Sokolov
73b2daf24d Increase the version number to 1.0 2012-11-06 22:41:24 +07:00
Alexey Sokolov
a0e9977264 Rename control back to controlpanel...
I shouldn't do this during beta.
2012-10-19 22:51:33 +07:00
Alexey Sokolov
4f1fd1f6db Rename controlpanel to control, fix #240
It's just a shorter name, and hopefully still not as confusing as old
"admin".

Also unrelated change: fix case of few output lines during startup.
2012-10-19 22:14:25 +07:00
Alexey Sokolov
ed83ac632d Hide current impl of server-time to znc.in/ namespace
The specs are going to change to support leap seconds properly,
so ZNC implementation will need to be updated.
But it would be too big change now, when 1.0-beta is out.

So support for this capability is delayed for 1.2
2012-10-16 19:50:16 +07:00
Alexey Sokolov
a85735a641 Add a command for listing all users' networks.
Fix #224
2012-10-02 19:59:07 +07:00
Alexey Sokolov
0577894d26 Warn if mod dir of old network contains files when moving. 2012-09-30 20:44:24 +07:00
Alexey Sokolov
b5102355cb Add a way to move networks between users.
It should help for migrating old multiuser setup to new multinetwork
one.

Fix #217
2012-09-30 16:23:50 +07:00
Alexey Sokolov
d9ec39d818 Clarify in --makeconf how network name should look like. 2012-09-26 01:45:38 +07:00
Alexey Sokolov
9b2898f603 Implement setting "Max number of networks" for user.
Fix #226
2012-09-20 01:24:47 +07:00
Alexey Sokolov
9edcc716d5 *admin was renamed to controlpanel.
But znc --makeconf and config writer didn't know that.
2012-09-16 18:26:32 +07:00
Alexey Sokolov
38ff2a9400 Add space before AppendTimestamp for colorless lines.
Thanks to fred for reporting it.
2012-09-07 20:22:12 +07:00
Alexey Sokolov
19d5c8a7f0 Fix Config parsing.
Wtf did that mean?

P.S. clang's warnings are awesome.
2012-09-03 03:01:26 +07:00
Alexey Sokolov
c3f3dddddc Show loading of networks during startup.
Only modules and servers were shown, without explanation which networks
do they belong to.
2012-08-27 23:08:08 +07:00
Alexey Sokolov
ee8f0b0958 Fix fred's build. 2012-08-22 23:39:30 +07:00
Kyle Fuller
3347390cfc CString: Don't repeat ourselves 2012-08-19 23:06:28 +07:00
Alexey Sokolov
da336049b3 Fix linkage on cygwin.
ZNC_NO_NEED_TO_DO_ANYTHING_ON_MODULE_CALL_EXITER is required in
libznc.dll, but it was defined in main.cpp

Again thanks to Lizzy Eilson
2012-08-19 16:30:47 +07:00
Alexey Sokolov
6851242a5d Revert "Fix also Buffer.cpp to use struct timeval"
This reverts commit d3840bba19.
2012-08-19 16:10:28 +07:00
Alexey Sokolov
d3840bba19 Fix also Buffer.cpp to use struct timeval 2012-08-19 15:28:39 +07:00
Alexey Sokolov
b2fa3a7f61 Fix #197 and more warnings in ZNCString.cpp 2012-08-18 22:40:30 +07:00
Alexey Sokolov
892727ba2c Fix more warnings and #197 2012-08-17 01:16:34 +07:00
Alexey Sokolov
395ae4fc9f Oh, I forgot to add a back-compatibility crap. 2012-08-16 21:29:07 +07:00