Commit Graph

2638 Commits

Author SHA1 Message Date
Uli Schlachter
a08ec52dbf 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 <psychon@znc.in>
2011-11-03 09:01:13 +01:00
Alexey Sokolov
73b980bb83 Merge branch 'master' of github.com:znc/znc 2011-11-03 10:51:22 +07:00
Alexey Sokolov
7ac4609408 Check for /usr/bin/swig2.0 too.
SWIG 2 is named that way on Debian-based systems...
2011-11-03 10:49:14 +07:00
Uli Schlachter
a66721eacb webadmin: Add a "Disabled" checkbox for channels
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:44:36 +01:00
Uli Schlachter
9140a0dbd5 CZNC::WriteConfig(): Better --debug output
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:42:36 +01:00
Uli Schlachter
a97abc53f7 Just some small comment explaing some craziness
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:39:34 +01:00
Uli Schlachter
962c10795d Disable some more warnings on mod{perl,python}
It seems to me like swig is trying to trigger every warning that exists...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-30 13:37:11 +01:00
Alexey Sokolov
c00ad1a2ff Ups, forgot to change message for python compiler. 2011-10-30 02:21:11 +07:00
Alexey Sokolov
f4097e6fd5 Separate compilation and linking for modules.
To gain more benefits from distcc.
2011-10-30 02:15:26 +07:00
Alexey Sokolov
cf49449dde Be able to remove servers using webadmin.
Thanks for appel for reporting this.
2011-10-30 00:47:11 +07:00
Stéphan Kochen
355f196bbe Working savebuff saving and loading.
It's even backwards compatible!
2011-10-27 19:54:23 +02:00
Stéphan Kochen
c36480c8a1 Store and format time in CBufLine.
Buflines need to know which part of text to wrap with the timestamp. The
second parameter to `AddLine` (and shorthands) is that text, which after
wrapping is added as the `text` parameter to `NamedFormat`.

Timestamps are formatted at the moment buffers are flushed to the
client. The client parameter to `GetLine` provides access to the User
and the new server-time capability.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
c3d677a4d8 Slight refactor of CBuffer & CBufLine.
This is in preparation of adding more attributes to a CBufLine. Going
forward, at least savebuf will need access to all of these to properly
serialize buffers.

Basically, instead of relying on `GetLine()` to return `false`, the
caller is now expected to check bounds himself using `Size()`.
2011-10-27 18:25:25 +02:00
Stéphan Kochen
cb4131e320 Unify channel buffers and CBuffer. 2011-10-27 18:25:25 +02:00
Stéphan Kochen
948ae2510c Rewrite Buffer to store a format string.
Will use this to allow more parameters to be inserted at the time the
buffers are flushed to the client.
2011-10-27 18:25:24 +02:00
Stéphan Kochen
2fdf54d43d Add string formatting function with named params.
In addition to the formatting function, a matching Escape type is added.
2011-10-27 18:25:24 +02:00
Stéphan Kochen
f7e5b41ab1 Add server time CAP and Client flag. 2011-10-27 18:25:24 +02:00
Kyle Fuller
a25316710d Respond to 670 from the server by switching to TLS
If a client sends STARTTLS to the IRC server, once the IRC server responds
with a 670 then it will expect all future communications to happen over
TLS.
2011-10-21 01:44:42 +00:00
Kyle Fuller
200940756b Update Csocket to d7206c6aa88bd7988f 2011-10-21 01:40:36 +00:00
Kyle Fuller
131a06594c Macro NETWORKMODULECALL to IRCSOCKMODULECALL inside CIRCSock
This saves a lot of repetitive lines (m_pNetwork->GetUser, m_pNetwork,
NULL)
2011-10-21 00:48:00 +00:00
Kyle Fuller
7a754f4ffd Its .co.uk not .co.u in the authors list 2011-10-21 00:25:29 +00:00
Kyle Fuller
b8c2da95f1 Make the OnInvite hook return EModRet so we can ignore invites 2011-10-21 00:20:58 +00:00
Kyle Fuller
e11d338040 Pass the nick who send an invite with the OnInvite hook 2011-10-20 23:44:03 +00:00
Kyle Fuller
8cce595fbe antiidle: Don't SIGABRT when receiving a line with less than 2 words
This was introduced in 232d2612fe which
tries to split a line by spaces and then tries splitted[1] and
splitted[2] which will cause a SIGABRT if the line isn't actually that
long.

This also uses the 4th argument to the 301 line to determine if this
message is because we sent a message to ourselfs. Previously the 3rd
option was used, which is always our own nick. This was resulting in any
301 line being halted.
2011-10-20 23:33:13 +00:00
Kyle Fuller
71636d2dd7 Move me to the top of authors 2011-10-19 11:24:39 +00:00
Kyle Fuller
7e5144df04 Make sure a IRCSock is authed before we use the nick
This fixes a bug where an unauthed IRC connection will cause your
clients nick to be the default nick. But this is before we update
the client to use this nick. If a client tried another nick when
connecting then they are still expecting this nick.
2011-10-19 11:24:39 +00:00
Kyle Fuller
8659d7224a Make UpdateModule reload the module for every module type
UpdateModule has been moved to CZNC because it doesn't really fit into
CUser. The new UpdateModule will reload the module for global modules,
user modules and network modules.

Fixes #69
2011-10-19 10:47:55 +00:00
Kyle Fuller
3a7d0150cf Don't include Modules.h from User.h 2011-10-19 09:56:21 +00:00
Kyle Fuller
483c8ed0d1 autoreply: check if the network is attached instead of the user
This fixes a bug where the autoreply message wasn't being sent if you
were attached to another network

Also allow loading this module as a network module
2011-10-19 09:59:35 +01:00
Kyle Fuller
a8cb7697cf simple_away: check if the network is attached instead of the user
Also make simple_away a network module, so that when the timer fires we
have a network to send the AWAY lines

Fixes #77
2011-10-19 09:58:45 +01:00
Kyle Fuller
9c86f08b82 Only save a buffer in buffextras if no clients are "away" 2011-10-18 22:12:43 +00:00
Kyle Fuller
0a56a0281b zncconfig.h has moved to include/znc
__pycache__ is now used on python3.2 for cache files
2011-10-18 19:26:45 +00:00
Kyle Fuller
bce4e60c08 Allow a client to become "away"
The result of CIRCNetwork::IsUserOnline() will only show clients which
do not have the away state set. This value is not set from the IRC
command AWAY, but a future module could use this behaviour.

Some CIRCNetwork::IsUserAttached() checks are now moved into of
CIRCNetwork::IsUserOnline() checks.

This allows "away" clients to store buffer even if KeepBuffer is false.
2011-10-18 19:26:37 +00:00
Kyle Fuller
6ae491ca66 bouncedcc should use PutUser() and not m_pUser->PutUser() 2011-10-16 23:28:54 +00:00
Kyle Fuller
eb1abb50e8 Fix the OnUserCTCP() module hook
This was broken when CClient was made network aware with ef2b2cf601
2011-10-16 23:27:10 +00:00
Kyle Fuller
af24f7b9a7 Fix the "Connecting user/network" message
This debug line was printing the network twice instead of the username
2011-10-09 19:09:25 +00:00
Kyle Fuller
edaa20e59e identfile: Improve the debug messages
The new debug messages allow us to see when the identfile is unlocked
2011-10-07 11:30:31 +01:00
Alexey Sokolov
3c0e209363 Merge branch 'master' of github.com:znc/znc 2011-10-06 21:49:48 +07:00
Alexey Sokolov
f483053687 Improve admin module description. 2011-10-06 21:47:52 +07:00
Kyle Fuller
c7d171bfa1 Don't connect to SSLed IRC servers when ZNC is not compiled with SSL 2011-10-04 15:59:33 +00:00
Kyle Fuller
a4aedc90d3 Create a connection queue including all the networks we need to connect 2011-10-04 15:59:28 +00:00
Alexey Sokolov
0f0591b648 Fscking perl... This fixes modperl's compilation. 2011-10-04 10:29:55 +07:00
Alexey Sokolov
c86a61239e Trim spaces from end of commands to autoattach. 2011-10-04 00:30:40 +07:00
Alexey Sokolov
c6464797e6 Fix shell module. It didn't send anything to user.
When the socket fires the Read event, CModule's m_pNetwork isn't set
anymore.
2011-10-04 00:00:11 +07:00
Alexey Sokolov
59c62150d4 Tell users to use user/network:pass in --makeconf 2011-09-28 21:20:21 +07:00
Alexey Sokolov
2c1ca45353 Merge branch 'headers' 2011-09-28 20:15:20 +07:00
Alexey Sokolov
187a05db40 Nick in 301 can start with : - it's IRC after all... 2011-09-25 22:19:09 +07:00
Uli Schlachter
7f6a4fb472 Update to latest Csocket
Lots of interesting stuff in here, if you want details, ask Csocket's git
history. :-P

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-25 14:08:08 +02:00
Uli Schlachter
c0907f2e58 Fix visibility support
I definitely fixed this problem already when I ported the macro, so I wonder why
the fix got lost...

config.log says:

conftest.cpp: In function 'void dummyfunc()':
conftest.cpp:13:15: error: no previous declaration for 'void dummyfunc()'
[-Werror=missing-declarations]

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-25 10:24:36 +02:00
Uli Schlachter
0acf0de204 Merge pull request #71 from schoentoon/master
A few new nickserv commands, little annoyance fix and a new hook
2011-09-25 01:20:14 -07:00