Commit Graph

829 Commits

Author SHA1 Message Date
Uli Schlachter ad442f4f10 Include less headers in WebModules.h
From Client.h, only CAuthBase is needed. This is solved by moving the whole
CWebAuth class to WebModules.cpp.

The include of FileUtils.h is avoided by changing the API. GetAvailSkins() now
returns the skin names instead of a CFile for the skin's path.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-03 10:06:16 +02:00
Uli Schlachter ca36887ddf Don't include znc.h in Listener.h
znc.h pulls in most headers, Socket.h pulls in way less headers. This should
speed up compiles by 0.0000000314%.

The rest of this is compile fixes for stuff which assumed that Listener.h
includes znc.h for them. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-02 23:28:32 +02:00
Uli Schlachter f0bf7134ec Improve the handling of module load messages
Instead of doing ugly stuff to shorten the "Loaded Module [foo]" message, we now
just always generate the shorter version of that message. The code paths which
didn't do this shortening now prepend that message themselves.

The result is that every message looks the same as it did before, but the code
for generating these is a little nicer.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-02 16:52:52 +02:00
Uli Schlachter 23fb4df67a Remove config-related module hooks
This removes the following module hooks:

OnConfigLine()
OnWriteConfig()
OnWriteUserConfig()
OnWriteChanConfig()

Modules could use these hooks for writing/reading their own stuff to/from
znc.conf. However, no module (ever?) did this and IMHO no module should ever do
this either. Modules can save stuff via SetNV(), module arguments (SetArgs())
and in their GetSavePath().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 17:29:49 +02:00
Alexey Sokolov 45209eca33 modpython: Make strings to be stringable.
Now you can use str() on objects of znc.String.
The same is true for arguments which represent CString&.
2011-03-31 20:41:59 +07:00
Alexey Sokolov b8043c3aac modpython: move CPyRetString to own header.
It was defined twice: in modpython.cpp, and in modpython.i
And there is a fake CPyRetString in modpython.i

Now both places which use real CPyRetString include the file instead.
Fake CPyRetString is still in modpython.i
2011-03-31 20:13:19 +07:00
Alexey Sokolov ba915eb9c4 Use pkg-config for modpython.
python3-config fails when python is installed not system-wide.
It doesn't return -L/path/to/libs.
pkg-config resurns it.

Note that this changes meaning of optional argument to ./configure --enable-python=...
2011-03-31 20:13:19 +07:00
Kyle Fuller 51ac51a252 Create a identfile module, this replaces the old ident spoofing built into znc 2011-03-30 19:48:12 +01:00
Kyle Fuller 703f2cd5bb Remove ident spoof from znc core 2011-03-30 19:16:53 +01:00
Kyle Fuller 7162b01111 Add the OnIRCConnectionError(CIRCSock *pIRCSock) module hook 2011-03-30 19:15:42 +01:00
Uli Schlachter 0ff6cd7491 Merge branch 'notes' of https://github.com/kylef/znc 2011-03-30 10:38:07 +02:00
Kyle Fuller 4303278424 Add a option to the notes module so that you can prevent it from sending you notes when you connect 2011-03-30 01:20:29 +01:00
Kyle Fuller 71888506b8 Make the notes module use CModCommand 2011-03-30 00:57:58 +01:00
Alexey Sokolov 6db2ac8ac6 Fix modperl and modpython installations.
When modules' static data files were moved to own dir,
install_metadirs was removed from Makefile.
But modperl and modpython's makefiles still had dependance on it.
2011-03-30 01:21:05 +07:00
Kyle Fuller 016fe49a79 Update the lastseen module to use the new CModCommand API 2011-03-28 22:46:57 +01:00
Kyle Fuller f5665481fe If we have not seen a user in *lastseen say we never seen them. 2011-03-28 22:34:58 +01:00
Kyle Fuller 4f89834934 Make lastseen use CUser::IsIRCConnected() instead of CUser::GetCurrentServer() to determine if the user is connected to a server. 2011-03-28 22:23:08 +01:00
Alexey Sokolov 076929bb50 Merge branch 'modulesdata'
Conflicts:
	modules/Makefile.in
2011-03-28 17:15:00 +07:00
Uli Schlachter 64e565c96e Merge branch 'log' of https://github.com/MentalFS/znc 2011-03-28 11:43:03 +02:00
Uli Schlachter b6ea6994db Merge branch 'away' of https://github.com/kylef/znc 2011-03-28 11:41:04 +02:00
Uli Schlachter 4473146018 Remove some evil trailing whitespaces
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-28 11:40:50 +02:00
Uli Schlachter 0e2b1dcc19 Merge branch 'perform' of https://github.com/kylef/znc 2011-03-28 11:40:30 +02:00
Uli Schlachter e12c0a517e Merge branch 'attach' of https://github.com/kylef/znc 2011-03-28 11:40:08 +02:00
Uli Schlachter e0b7291b2d Merge branch 'notes' of https://github.com/kylef/znc 2011-03-28 11:39:39 +02:00
Kyle Fuller d735e9d881 Remove some pointless if statements 2011-03-27 23:35:41 +01:00
Alexey Sokolov e62ec2dc82 Remove bogus "Unable to find module" from modperl.
When a module tries to being loaded, modperl looks for module.pm file.
If there's no such file, it said "unable to find", which is bad
in case when it's non-perl module.

Loader of C++ modules clears sRetMsg string, so the message wasn't seen before
(except debug and ZNC startup). But modpython does nothing with it
(if python module doesn't set it itself), so in result we get stuff like
"Loaded module [xxx] [Unable to find module [xxx]] [/home/user/.znc/modules/xxx.py]"
which is pretty confusing.

So now if perl version of the module isn't found, we just pass control to next
available module loader without any error messages.

Thanks to macmaN for reporting this.
2011-03-21 11:38:34 +06:00
Kyle Fuller 0537a6cbae Add a "Get" command to the notes module which allows you to lookup a note via the key 2011-03-12 19:19:58 +00:00
Alexey Sokolov 9506d7e32b Fix copying modules data directories.
This fixes out-of-tree builds.
2011-03-06 20:50:22 +06:00
Alexey Sokolov 3a838d1493 Move module data files to own dir. 2011-03-06 12:32:14 +06:00
Kyle Fuller c9f5fc4ecf Make the autoattach module use the new CModCommand API 2011-03-03 19:03:44 +00:00
Kyle Fuller 3c030c8d2b Use a CTable to list all the commands to be performed in the perform module 2011-03-01 23:49:01 +00:00
Kyle Fuller 211bab0f00 Update the perform command to use CModCommand 2011-03-01 23:22:52 +00:00
Kyle Fuller 075136175c Upgrade the away module to the new CModCommand interface 2011-03-01 19:14:06 +00:00
Alexey Sokolov 3d3235743d Fix permissions for modules's static data.
With cp -Rp, the files's permissions were just copied from source.
But 4c7808c5c broke that behaviour, so after copying we set permissions for new installed files.

Why "install" doesn't support installing directories? :(
2011-02-28 23:49:53 +06:00
Daniel Holbert 4c7808c5cb Remove unnecessary "-p" parameter from cp command in Makefiles, to fix checkinstall failure 2011-02-28 14:25:22 +13:00
MentalFS 563bce5987 Load parameter for log module's path 2011-02-26 12:21:57 +01:00
Uli Schlachter d44e590336 Make CUser::m_sUserName constant
Changing the user name for a CUser instance is a really, really bad idea. There
are lots of paths that depend on the user name and only few of them are fixed up
when the user name changes.

This fixes a problem where admin's "CloneUser from to" caused problems with
modules, because all modules where loaded under the old user name and thus they
read/write NV data from the wrong directory in ~/.znc/users.

Thanks to un1matr1x for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-24 19:13:06 +01:00
Alexey Sokolov 0f2265cff3 Fix install of py modules if there're no of them. 2011-02-23 10:58:30 +06:00
Alexey Sokolov b7700fe264 Install python modules properly.
There was a bug, because of which you needed to run make install twice to get .pyc files installed.
Now just make install works.
2011-02-23 10:48:27 +06:00
Uli Schlachter 8419964165 watch: Use empty() instead of !size()
Yay for useless micro-optimizations. ;-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-22 23:38:10 +01:00
Uli Schlachter 8eda266bae Fix shell module
shell didn't compile since 6bc36d1708 because it used the
three-argument-version of CModule::PutModule(). This commit replaced that with a
call to CModule::PutUser().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-22 23:36:54 +01:00
Uli Schlachter 9da852a07f Merge remote branch 'github-kylef/nick' 2011-02-22 23:15:50 +01:00
Kyle Fuller c48f0fde3c Don't specify the ident to use for away module in PutModule 2011-02-22 20:53:50 +00:00
Uli Schlachter 4acadb3cdf Evil trailing whitespace is evil!
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-22 21:03:45 +01:00
Kyle Fuller a93a586f53 Show a list of users in the send_raw web interface 2011-02-22 16:06:43 +00:00
Kyle Fuller d8b181718c send_raw: Add a web interface 2011-02-22 15:14:34 +00:00
Uli Schlachter 31bbffa579 Convert admin to the new CModCommand interface
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-21 15:34:28 +01:00
Alexey Sokolov 080bf674e0 Add perl module perleval.
It allows you to evaluate perl code you /msg to it.
2011-02-19 21:37:03 +06:00
Uli Schlachter 4faad67f81 admin: Allow omitting of the user name with some commands
This changes admin to assume that an "empty username" was specified if some
arguments is empty which shouldn't be empty. This empty username is then
interpreted as meaning the current user.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00
Uli Schlachter 3f0e200073 Admin: Add functions for listing/adding/removing CTCP replies
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 14:50:12 +01:00