Instead of using sed to strip away the source dir this now uses make's notdir.
$(notdir this/is/an/example) results in example.
This also moved the generated dependency files from .depend/extra into .depend/
Since we need the extra/ path prefix for the modules from modules/extra, that
one is added back via addprefix.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1610 726aef4b-f618-498e-8847-2d620e286838
The configure and Makefile stuff was taken from there, too. By default modtcl is
disabled, use --enable-extra --enable-tcl to get it.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1609 726aef4b-f618-498e-8847-2d620e286838
This commits adds the necessary build system fun for extra modules in
modules/extra which can be enabled with --enable-extra.
This is a preparation for the import of znc-extra.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1605 726aef4b-f618-498e-8847-2d620e286838
/lusers can cause a 250 "Highest connection count" reply, but sadly some IRC
daemons don't send this numeric. Since there is no easy way to handle this, we
will just assume that 266 is the last numeric reply to /lusers.
*If* there is a 250 reply, it will be broadcasted to all connected clients. This
is still better than the "This module hit a timeout" we generate on some ircds
currently.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1600 726aef4b-f618-498e-8847-2d620e286838
This teaches route_replies how to parse 461 numerics to find out which command
caused them. This way we don't have to add this numeric to all the requests we
route by hand.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1598 726aef4b-f618-498e-8847-2d620e286838
This module logs events like failed and successful logins and IRC disconnects to
a log file and/or syslog.
Original module author is SilverLeo, thanks.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1595 726aef4b-f618-498e-8847-2d620e286838
This module fixes some issues if multiple clients are connected to the same ZNC
user. ZNC itself would send replies to e.g. /who to all connected clients and
this modules makes the reply go to the client which sent the request.
Thanks to SilverLeo, tomaw and Vadtec for finding missing numerics.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1594 726aef4b-f618-498e-8847-2d620e286838
This module automatically replies to queries and private notices if no user is
connected to ZNC.
Svedrin submitted an initial version of this module, but due to my own
stupidness I later rewrote it.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1593 726aef4b-f618-498e-8847-2d620e286838
This module adds topic changes, nick changes, parts, joins, quits, kicks and
mode changes to the buffer playback.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1592 726aef4b-f618-498e-8847-2d620e286838
The directory prefix checking which prevents path traversal exploits had a logic
error that made it always fail.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1574 726aef4b-f618-498e-8847-2d620e286838
A common pattern for checking directories in ZNC is the following:
sAbsolutePath = CDir::ChangeDir(sAllowedPath, sFile);
if (sAbsolutePath.Left(sAllowedPath.length()) != sAllowedPath)
Error;
But there is a problem: If sAllowedPath doesn't end with a slash, we are
vulnerable to an attack. If e.g. sAllowedPath = "/foo/bar", then
sFile = "../bartender" would result in sAbsolutePath = "/foo/bartender". Since
this path does begin with sAllowedPath, the code allowed it.
There shouldn't be any places where this can be exploited currently, but it is
still a security bug (path traversal).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1569 726aef4b-f618-498e-8847-2d620e286838
Classes derived from Csock* can be casted implicitly to their base class, this
explicit casts are rather pointless.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1548 726aef4b-f618-498e-8847-2d620e286838
Changes include...
- CString -
Addition of LCString typedef to list<CString>
Added four more args to CString::Token()...
bool bAllowEmpty = false <-- This default of false is NOT backward compatible but seems way more intuitive
const CString& sLeft = ""
const CString& sRight = ""
bool bTrimQuotes = true
Added CString::OptionSplit()
Added CString::QuoteSplit()
Added two new args to CString::Split()...
bool bTrimQuotes = true,
bool bTrimWhiteSpace = false
- CTemplate -
Added new class CTemplateTagHandler to provide capability to add custom tags and vars
Added var name pointer dereferencing in the form of <? VAR Name=*other_var ?> (use ** to start with a literal star)
Added a list of paths that can be used to look for a given filename in multiple locations
Added CTemplate::PrependPath()
Added CTemplate::AppendPath()
Added CTemplate::RemovePath()
Added CTemplate::ClearPath()
Added CTemplate::PrintString() for filling a CString& instead of a stream
Added <? LT ?> which outputs a literal "<?"
Added <? GT ?> which outputs a literal "?>"
Added <? SETBLOCK ?> and <? ENDSETBLOCK ?> for setting a variable's value to the contents between the tags
Added <? EXPAND ?> for expanding a filename to a path using the settable list of paths
Added <? BREAK ?> and <? CONTINUE ?> inner loop tags
Added <? EXIT ?> tag to stop processing
Added <? DEBUG ?> tag for printing to DEBUG()
Added REVERSE keyword to the <? LOOP ?> tag
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1537 726aef4b-f618-498e-8847-2d620e286838
If you now load stickychan with "#chan1,#chan2 bla" as its argument, both
channels are stuck where "bla" is the channel key for #chan2.
Thanks to FB-eYe for the suggestion.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1534 726aef4b-f618-498e-8847-2d620e286838
r1481 moved the /img/ subdir into /data/, but forgot to fix the path which
is used for the favicon, which meant we generated a 404 for the favicon.
Fix this by using the correct path and everyone is happy again.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1524 726aef4b-f618-498e-8847-2d620e286838
When you are already in #znc and you did 'stick znc' (# prefix missing!),
stickychan caused segfaults or different weird behavior. This happened because
stickychan didn't handle errors from CUser::AddChan(). AddChan() can only error
out if the channel already exists, but since stickychan already checked this,
were does the error come from?
CChan's constructor does some sanity checks on the channel name. It
automatically adds the proper channel prefix (most likely #) if it's missing.
This means when stickychan checked for the channel "znc" it correctly didn't
find one. When it then tried to add "znc", it really tried adding "#znc" which
could fail if the channel was already added.
Thanks to DM8Mydog for finding this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1500 726aef4b-f618-498e-8847-2d620e286838
Now ZNC compiles with -Wmissing-declarations :)
(BTW I hate the perl headers, could some fix them app so that they cause
less warnings?)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1499 726aef4b-f618-498e-8847-2d620e286838
This adds a new, second argument to fail2ban which is the number of failed
logins one is allowed before being banned. Each login attempt resets the
timeout. This value defaults to 2.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1489 726aef4b-f618-498e-8847-2d620e286838
Before this, the KICK message was missing a target which was kicked.
Now the user kicks himself. :)
Thanks to JoeK for reporting this bug.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1486 726aef4b-f618-498e-8847-2d620e286838
This moves all static webadmin files (images, css) to the data/ subdirectory
of the skin dir. The webadmin module is changed to redirect requests to
/<skin name>/ to that data directory. The skins are changed to use the
new URL when linking to their stuff. (I only needed to change the path to
the main.css file in each Header.tmpl. Since the .css and the images are now
in the same directory, relative URLs work just fine).
This means that we now generate different URLs after changing the webadmin
skins and the browser cache can do its thing.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1481 726aef4b-f618-498e-8847-2d620e286838
The new CloneUser command allows one to create a user with a space in
its name and the code for reading znc.conf allows spaces too. So now
one can even get rid of this users again...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1478 726aef4b-f618-498e-8847-2d620e286838
That false/true thing makes no sense and pUser was passed in to a bool
argument which means it was always true... weird...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1472 726aef4b-f618-498e-8847-2d620e286838
Use ToUInt to convert the string, since we're actually using an
unsigned integer. And use ToBool for consistency.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1440 726aef4b-f618-498e-8847-2d620e286838