Commit Graph

797 Commits

Author SHA1 Message Date
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
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
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
Uli Schlachter
32e89efa95 Fix some minor spelling weirdness
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-18 10:46:53 +01:00
Uli Schlachter
2dcf79cedc Move modtcl into modules/
If you did ./configure --enable-tcl, tcl wasn't actually enabled because
--enable-extra was missing, That's less than optimal.

Just moving modtcl out of modules/extra solves this problem.

Big thanks go to zynox/kylef for noticing this!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-17 17:45:46 +01:00
Uli Schlachter
b37e239328 webadmin: Allow admins to ignore MaxBufferSize
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-14 14:56:09 +01:00
flakes
65ae83fa19 Admin module: Added /msg *admin reconnect <user> and /msg *admin disconnect <user> commands. Can someone test this? :P 2011-02-13 14:19:27 +01:00
silverleo
ad9667dd3e Fix the IsAdmin checks for the SetBufferCount
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2276 726aef4b-f618-498e-8847-2d620e286838
2011-02-02 13:14:22 +00:00
darthgandalf
a284e0260a Fix a mistake in code, which unloads perl modules.
Perl API should be used properly.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2274 726aef4b-f618-498e-8847-2d620e286838
2011-01-24 18:22:43 +00:00
darthgandalf
ae82eec1ac Fix warnings "variable 'ax' set but not used [-Wunused-but-set-variable]" of modperl.
http://perldoc.perl.org/perlcall.html wants us to declare and set this variable,
but it seems that not every perl actually uses it.
So let me introduce you this small workaround which uses ax's value.

Thanks to nb for reporting this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2273 726aef4b-f618-498e-8847-2d620e286838
2011-01-24 18:18:42 +00:00
cflakes
ddd302fbf5 clearbuffersonmsg module in znc-extra: removed OnUserJoin and OnClientLogin hooks. This means that those events will no longer clear the buffer and thereby make the module more useful. You can now e.g. use it to get all the benefits of KeepBuffer = true, but still have the buffer cleared whenever you do something (we assume that doing something means you have read all previous messages).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2272 726aef4b-f618-498e-8847-2d620e286838
2011-01-23 21:12:12 +00:00
darthgandalf
6b396fca7f Fix for last commit.
Also remove perl magic from modperl/Makefile.inc which was used to suppress a warning.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2269 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 21:04:25 +00:00
darthgandalf
f76f1e7a25 Modpython and modperl bindings should have proper dependencies on headers in makefiles.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2268 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 20:28:25 +00:00
darthgandalf
3422d95780 Add copyright header for some files of modpython which were forgotten before.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2267 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 19:01:14 +00:00
darthgandalf
81c864d025 Only admins should be able to load email module.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2266 726aef4b-f618-498e-8847-2d620e286838
2011-01-15 17:08:57 +00:00
psychon
b9b0fd4c87 Oh, shiny... NOT
(Yes, it's that time of the year again)

Signed-off-by: Uli Schlachter <psychon@znc.in>

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2260 726aef4b-f618-498e-8847-2d620e286838
2011-01-14 17:03:24 +00:00
darthgandalf
b6c8e10633 Include zncconfig.h before any system headers in modpython and modperl bindings.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2255 726aef4b-f618-498e-8847-2d620e286838
2011-01-07 18:01:26 +00:00
psychon
3ecbf13390 Use autoheader
This commit adds a zncconfig.h to ZNC that is automatically generated by
configure. This is done because the -DPACKAGE_STRING=\"znc\ 0.097\" that
configure adds to CXXFLAGS breaks znc-buildmod.

This means that we have to include zncconfig.h as the very first header in every
C++ file that is compiled. This commit kinda cheats and instead adds this
include as the very first thing to all header files we have. This should
hopefully mean that modules don't have to include this.

Because Csocket includes defines.h too late, this commit causes znc to divert
from upstream Csocket once again. :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2250 726aef4b-f618-498e-8847-2d620e286838
2011-01-07 15:01:08 +00:00
darthgandalf
9fec8f726d Make modpython compiler to fail make on fail of compilation of a python file.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2244 726aef4b-f618-498e-8847-2d620e286838
2011-01-03 05:09:42 +00:00
darthgandalf
452e3f1824 Modpython compiler should depend on Makefile.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2243 726aef4b-f618-498e-8847-2d620e286838
2011-01-03 05:09:18 +00:00
psychon
8a1c2a4711 Include @DEFS@ into our compiler call
On most systems, this should only result in some useless defines being added to
the compiler's command line:

-DPACKAGE_NAME=\"znc\" -DPACKAGE_TARNAME=\"znc\" -DPACKAGE_VERSION=\"0.097\"
-DPACKAGE_STRING=\"znc\ 0.097\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"

However, on some weird arches like e.g. x86, this will make AC_SYS_LARGEFILE
actually work, because that macro adds "-D_FILE_OFFSET_BITS=64" to @DEPS@.

This was found by SilverLeo because modpython didn't compile for him, thanks. :)
(python has "#define _FILE_OFFSET_BITS 64" in pyconfig.h)

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2242 726aef4b-f618-498e-8847-2d620e286838
2011-01-02 17:15:21 +00:00
psychon
44d2816379 Remove some more pointless checks for sPageName.empty()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2241 726aef4b-f618-498e-8847-2d620e286838
2011-01-02 16:33:42 +00:00
psychon
eb730d72d7 notes: Remove a pointless "if"
When you load /mods/notes/ in your browser, OnWebRequest will be called with
sPageName == "index". So that variable can never actually be empty.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2240 726aef4b-f618-498e-8847-2d620e286838
2011-01-02 10:46:46 +00:00
cflakes
40d39f222b Don't use a readonly <input> in lastseen's WebadminUser stub template.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2234 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 15:22:47 +00:00
cflakes
ba183e461f Perform module:
* Be more const.
* Be more correct: only accept requests to /mods/perform/, not to all URLs starting with that.
* Be more considerate: Use "IRC server" instead of "IRCd".



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2232 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 15:09:07 +00:00
psychon
89edf703f6 Perform: Also parse stuff like "/msg foo bar" via webmods
Signed-off-by: Uli Schlachter <psychon@znc.in>

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2231 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 14:42:43 +00:00
psychon
c8910c4856 Perform: Provide a webinterface
Signed-off-by: Uli Schlachter <psychon@znc.in>

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2230 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 14:42:28 +00:00
psychon
1e0585c485 webadmin: Add all currently missing global settings
These were MaxBufferSize, ConnectDelay, ServerThrottle and AnonIPLimit.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2229 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 09:14:21 +00:00
psychon
eb263869b0 webadmin: Add a "key" inputbox to channels
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2227 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 08:40:44 +00:00
psychon
570fab6e44 webadmin: Add DCCBindHost
Before this commit, editing some user in webadmin cleared their DCCBindHost.
That's definitely not what we want.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2226 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 08:32:58 +00:00
psychon
853ddc5c2a admin: Add TimestampFormat and StatusPrefix
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2225 726aef4b-f618-498e-8847-2d620e286838
2010-12-31 08:07:39 +00:00
darthgandalf
4c6d52c904 Change a way how .pyc are generated from .py
Now Makefile does the search of .py in the source.
Also change some dependencies between other modpython stuff.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2224 726aef4b-f618-498e-8847-2d620e286838
2010-12-30 23:45:12 +00:00
darthgandalf
4be057200b Fix out-of-tree builds.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2223 726aef4b-f618-498e-8847-2d620e286838
2010-12-30 22:40:24 +00:00
darthgandalf
dc8a39db53 Add vim modelines to some files.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2222 726aef4b-f618-498e-8847-2d620e286838
2010-12-30 22:02:26 +00:00
darthgandalf
afa16df2bc Fix make clean for modperl and modpython
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2220 726aef4b-f618-498e-8847-2d620e286838
2010-12-30 19:18:24 +00:00