Commit Graph

2614 Commits

Author SHA1 Message Date
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
Toon Schoenmakers 23acbe42a6 Implemented a OnInvite hook
This hook will be called when the user get's invited into a channel
because we don't have a CChan of this channel yet this won't be send
through the hook. Instead a CString with the name of the channel is send.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2011-09-25 01:58:23 +02:00
Alexey Sokolov 2dcb3efcc3 Fix OnClientDisconnect() hook of network modules.
It wasn't called for them.
2011-09-25 03:50:53 +07:00
Toon Schoenmakers 232d2612fe 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 <nighteyes1993@gmail.com>
2011-09-24 22:34:45 +02:00
Toon Schoenmakers 5248987907 Added several new features to the nickserv module
This includes a feature to ghost, which simply calls the ghost feature
of the actual nickserv. Same goes for group, recover and release.
These are called by simply doing /msg *nickserv ghost <nickname> etc.
The changes made actually explain themselves when doing something like
/msg *nickserv help. This is really just so we can be lazy and execute
nickserv commands that require a password without knowing the password
ourselves.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>
2011-09-24 22:18:39 +02:00
Alexey Sokolov c5578f875d Merge branch 'master' of github.com:znc/znc 2011-09-25 02:50:45 +07:00
Alexey Sokolov ceeebf746b Fix CUser::IsUserAttached().
It honored only clients connected without any network.

Thanks to Cronus` for reporting this.
2011-09-25 02:37:00 +07:00
Alexey Sokolov afeab4a9e6 Move core .cpp files to src/ 2011-09-23 03:33:13 +07:00
Alexey Sokolov e354c24ac1 Move ZNC headers into own directory.
Yes, this breaks backwards compatibility, so what?
It's already broken with network stuff anyway.
2011-09-23 03:31:58 +07:00
Uli Schlachter 768359277b Send a MODE request when JOINing
This kind of reverts/fixes f1cb09bd9c.

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 <psychon@znc.in>
2011-09-22 20:23:42 +02:00
Kyle Fuller 4b1e7143c3 Set default TrimPrefix to ":"
Use TrimPrefix instead of if prefix then chomp, saving quite a lot of
duplicated code
2011-09-22 18:09:17 +00:00
Kyle Fuller 523deaf4e3 Clean up CClient::ReadLine 2011-09-22 18:09:09 +00:00
Uli Schlachter 4d4e6a6eb1 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 <psychon@znc.in>
2011-09-22 18:25:22 +02:00
Uli Schlachter 08cc624bcc Fork the gl_visibility macro
That macro currently was broken. It added flags to $CFLAGS but then called the
C++ compiler. The result was that ZNC didn't compile with GCC 3, because it
tried to use -fvisibility=hidden which isn't supported in that GCC version.

A list of changes done to this macro is contained in a comment.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 18:14:48 +02:00
Uli Schlachter 6f2335d529 configure.ac: Redefine AC_PROG_CC to cause errors
ZNC is written in C++ and doesn't need a C compiler. This redefine let's us
catch code which accidentally uses the C compiler.

Currently this means that we break due to gl_VISIBILITY.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-22 18:12:02 +02:00
Alexey Sokolov ca476ef558 Bump version of master to 0.203
As 0.202 is being released today
2011-09-20 23:12:12 +07:00
Kyle Fuller 9e3dc0bf4e PutModule should try sending the line to all clients connected to the same network before the user clients 2011-09-18 15:09:04 +00:00
Alexey Sokolov cd1192e01f Honor per-network nick in awaynick and keepnick. 2011-09-17 14:32:25 +07:00
Alexey Sokolov f7919bbee3 Compare floats as floats. 2011-09-16 23:43:39 +07:00
Alexey Sokolov b90bdf21dd Warn if config was saved in too new version. 2011-09-16 23:42:33 +07:00
Alexey Sokolov 689c330d51 Backup znc.conf when upgrading ZNC.
Now ZNC saves its version to znc.conf.
When ZNC tries to load znc.conf, it compares stored version with running
one. If the stored version is older, make a backup.
2011-09-16 23:37:30 +07:00
Uli Schlachter e029dded0d Fix CIRCNetwork::ExpandString()
It pretty much always returned an empty string (or rather: whatever was in the
return variable before, which is an empty string in 99% of cases).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 12:02:55 +02:00
Uli Schlachter b07f37b23d Backup znc.conf once when updating to networks
This copies znc.conf to znc.conf.backup, if that file doesn't exist yet.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 11:41:01 +02:00
Uli Schlachter f97a6a8a26 Fix network module calls
These calls really should be network module calls, so this fixed
NETWORKMODULECALL() to again silently do nothing if the network is NULL.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 11:07:36 +02:00
Uli Schlachter 57c4ccf4f2 Move log out of extra
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-16 11:07:36 +02:00