Commit Graph

4514 Commits

Author SHA1 Message Date
Kyle Fuller
fc8e789b08 Don't show network modules title if we don't have any network modules 2012-02-19 18:44:54 +00:00
Kyle Fuller
11e5f7636d Add 381 to the buffer (You are now an IRC Operator) 2012-02-19 14:39:03 +00:00
Uli Schlachter
1dd8d9bf3e Block all signals in DNS threads
A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:26:19 +01:00
Uli Schlachter
252e6d7151 Threaded DNS: Handle spurious wakeups
As DarthGandalf noticed, POSIX allows spurious wakeups from pthread_cond_wait.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-19 12:13:25 +01:00
Kyle Fuller
8863d853c9 Allow disabling the use of adding networks for non admins
Closes #122
2012-02-15 16:27:47 +00:00
Kyle Fuller
b9ff3ddcb1 The connect queue shouldn't be unpaused when ZNC starts 2012-02-14 19:34:02 +00:00
Kyle Fuller
59ad967d77 Merge branch 'queue' 2012-02-14 19:32:03 +00:00
Uli Schlachter
0bdb18a427 Threaded DNS: Use a thread pool
When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.

To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.

Fixes #132.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-14 20:28:28 +01:00
Kyle Fuller
30fb68023b Pause connect queue should pause and resume a timer
So we don't cheat the connect delay
2012-02-14 19:22:50 +00:00
Kyle Fuller
a206eb7488 identfile: Pause the connection queue while we have a locked file 2012-02-14 19:22:41 +00:00
Kyle Fuller
e47f76db6c Allow the connection queue to be paused 2012-02-14 19:22:33 +00:00
Kyle Fuller
ec1202daf3 {unload,reload}mod: Don't get modinfo if the type is defined
This allows us to unload a module if we supply the type and mod info
cannot be loaded (such as if the module file has been moved).
2012-02-14 12:10:07 +00:00
Kyle Fuller
e08d53dcd5 Show network modules on the web interface menu
Closes #121
2012-02-13 23:58:32 +00:00
Alexey Sokolov
f4a80f7218 Fix/improve text in webadmin on how to connect to networks. 2012-02-13 10:16:16 +07:00
Kyle Fuller
0538140a97 webadmin: Tell the user how to connect to a network on the network page 2012-02-12 21:18:59 +00:00
Kyle Fuller
5c844cf81a Send nick changes to clients before we use call the OnNick module hook
This fixes a bug where sending anything to a client, such as with
PutModule will fail because it will refer to the new nick before the
client knows about it. The watch module did this.
2012-02-12 20:07:57 +00:00
Kyle Fuller
b450fde4f6 autoop: Check for autoops when we are opped ourself #120 2012-02-09 19:32:07 +00:00
Kyle Fuller
b1ed9c9b74 Add methods to CModule to get the web path
Add these values to the template and use them when linking to any module
2012-02-09 17:07:28 +00:00
Kyle Fuller
b1593238d5 Make the URL's for web modules include the module type (#121) 2012-02-09 14:19:26 +00:00
Kyle Fuller
2a901da465 partyline: Use the clients nickname in the channel, not PREFIX+username
This means that every reference to my own user will instead show my
clients nickname. This will prevent the client from seeing itself, and
the real nick for your client in the channel.
2012-02-07 19:24:56 +00:00
Kyle Fuller
7f21e73d3d Kick all clients who are in partyline channels when the module is unloaded 2012-02-07 19:21:30 +00:00
Kyle Fuller
89543cefc3 partyline: RemoveUser should use the clients nickmask 2012-02-07 18:14:23 +00:00
Kyle Fuller
4f1fa01306 Allow connecting to partyline without a network
Fixes #74
2012-02-07 17:52:25 +00:00
Kyle Fuller
3c803441ea Use CModCommand in partyline 2012-02-07 17:09:06 +00:00
Kyle Fuller
f706ac55c2 Display a 401 when a partyline user is not attached
Send private partyline messages to each client seperately using the
correct nickname for that client. It may differ if they are user clients
or network clients where they are not connected to an IRC server.

I have created macro's for the nickname prefix so this could easily be
changed.

Use 401 instead of 403 for user/channel not found

Fixes #21
2012-02-07 16:54:22 +00:00
Uli Schlachter
ec3317a8e5 Merge branch 'debug_timestamps' of ssh://github.com/HaleBob/znc 2012-02-05 21:18:39 +01:00
Alexey Sokolov
0da04f75d6 Remove my site from AUTHORS.
It's down anyway.
2012-02-06 01:09:18 +07:00
Alexey Sokolov
259be0c174 Fix compilation of modpython.
After previous commit compiler.cpp depends on python headers, because it
includes them. Therefore g++ tries to write a depend file about them.
If there's no such dir .depend yet, it'll fail.

Thanks to SilverLeo for noticing this.
2012-02-05 23:50:49 +07:00
silverleo
bb666b0ab7 Fix an Unrecoverable config error issue when reading from an old config.
Default this boolean to true incase there are no networks to loop over. This
will silently drop any network modules for the user, but since there are no
networks anyway it doesn't really matter.
2012-02-05 16:45:00 +02:00
Alexey Sokolov
47c427c39d Merge branch 'master' of github.com:znc/znc 2012-02-05 17:44:31 +07:00
Alexey Sokolov
94f785948b Check that modules are in place on start.
There're many people who forget to run "make install" and then wonder
why they can't load any module.

This should fix it, hopefully.
2012-02-05 17:41:40 +07:00
Alexey Sokolov
be81853b24 Depend on changes of headers too, not only sources. 2012-02-05 17:24:14 +07:00
Uli Schlachter
95d6041018 Fix a busy loop with the connection queue
If connecting to a server failed without needing any time for DNS, the connect
timer would busy loop over the networks, because a network re-inserted itself
into the queue and the timer would try the network again.

Fix this by moving the connection queue to a separate instance of std::list when
the timer fires. From then on, we just iterate through that list while networks
which want to try again add themselves to the "real" connection queue instead.

We only have to make sure that any networks that are left in the old connection
queue after the timer is done get prepended to the "real" connection queue.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 19:53:03 +01:00
Uli Schlachter
4d1e97ed47 Fix AX_PTHREAD to actually work
At first the test was failing with the following error due to my CXXFLAGS:

conftest.cpp:20:37: error: parameter 'a' set but not used
[-Werror=unused-but-set-parameter]

Then it figured out that -lpthread works, but I wondered why the test for
"-pthread" still fails. This is where I realized that it is testing with C++
compiler, but puts its stuff in $CFLAGS which is just ignored. So a little
search-and-replace later, this now uses $CXXFLAGS.

At this point the results of the tests looked good, but znc failed to link,
because it didn't use -pthread when linking. One little "PTHREAD_LIBS=" later,
that problem was also gone and I can finally commit this. Yay.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 16:08:45 +01:00
Uli Schlachter
1d16d1ce7d Fix a stupid bug in CUser::~CUser()
A CIRCNetwork's destructor removes the network from its associated user's list
of networks. Now that you know this, stare at the diff until you figure out the
problem. Yeah, "ouch".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:16:54 +01:00
Uli Schlachter
233897b3a8 threaded DNS: Remove an unneeded function
This inlines the function into its only caller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:15:52 +01:00
Uli Schlachter
94c7b04245 Threaded DNS: Remove TDNS mutex
POSIX actually guarantees for us that this white is atomic and thus a partial
write is not allowed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-04 14:15:52 +01:00
Alexey Sokolov
ae68a5a608 Mods are network mods by default.
Network modules are the simplest ones.
2012-02-04 00:29:58 +07:00
Alexey Sokolov
b966204456 Fix help of admin module.
DCCBindHost is string, not boolean.
2012-02-03 21:51:33 +07:00
Alexey Sokolov
6b2029fa16 Show error from bootstrap.sh if pkg-config not found.
It generated broken configure script without pkg-config installed.
2012-02-03 08:44:24 +07:00
Alexey Sokolov
140d83eb30 Merge branch 'master' of github.com:znc/znc 2012-01-30 00:40:06 +07:00
Alexey Sokolov
b811ea83d5 Describe how to use networks. 2012-01-30 00:38:51 +07:00
Kyle Fuller
991e7f2fac README: Explain that we need to run ./autogen.sh if compiling from git
Closes #70
2012-01-27 23:51:02 +00:00
Alexey Sokolov
fa287ef791 Make networks a bit less confusing.
If user is connected without network, try "default" network first, if it
exists. If not, try "user" network. If it doesn't exist too, just use
the first one.

Also configs converted from old configs have "default" network instead
of "user" one.
2012-01-27 22:51:09 +07:00
Alexey Sokolov
e0f4fad2ff Identfile: don't crash when ZNC is shutting down.
Thanks to Domin for reporting this.
2012-01-27 06:37:41 +07:00
Alexey Sokolov
ea6993ec68 Hide new compilation warnings of modperl...
They appeared with yesterdays patch, which fixes few return values.
2012-01-23 19:13:23 +07:00
Alexey Sokolov
7b213ef462 Fix compilation of modperl...
It's dependency order was broken since I separated linking of modules
from compilation.
2012-01-23 19:09:24 +07:00
Alexey Sokolov
897806a84b Don't rebuild modules during make install. 2012-01-23 04:10:02 +07:00
Alexey Sokolov
00e26c8dbc Perl: fix several methods to return perl stuff instead of pointers. 2012-01-23 04:09:24 +07:00
Uli Schlachter
29564f1c7e CFile: Make sure errno is always set correctly
This fixes weird problems were strerror() made us print garbage.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-22 18:51:01 +01:00