These are unused functions that are only used for generating warning messages
due to -Woverloaded-virtual. These were introduced in 2008. I think nothing
needs this any more, so let's just remove these for good. Bye, bye.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2047 726aef4b-f618-498e-8847-2d620e286838
At the beginning of lines, one uses tabs for indenting. In the middle of the
line, you use spaces. If you want two different lines to line up with each
other, you start them with the same number of tabs and use spaces for the rest
of the indenting in the "other" line.
Really, that's how one does it!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1963 726aef4b-f618-498e-8847-2d620e286838
This new class waits for the first line from the client and checks if it's an
HTTP request and then passes the connection on to the irc or http code.
Before this, the IRC parser handled this as a special case which wasn't as
nice-looking as this is. :)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1925 726aef4b-f618-498e-8847-2d620e286838
It's only called for stuff defined in that user's section. The stuff outside of
a user section still can only be caught by global modules.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1849 726aef4b-f618-498e-8847-2d620e286838
That way, user modules can write stuff to the user section, too.
OnWriteConfig() is still a global module call. A later commit will have to make
OnConfigLine() a user module hook...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1848 726aef4b-f618-498e-8847-2d620e286838
This one is partly due to cppcheck, too, because it warned that one of CModule's
constructors didn't initialize m_bGlobal.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1765 726aef4b-f618-498e-8847-2d620e286838
This call works exactly as it did before (well, it no longer creates a
temporary CNick instance), but it's documentation now also describes its current
behavior.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1737 726aef4b-f618-498e-8847-2d620e286838
Now these two module hooks are called in the same order as OnPrivAction() and
OnPrivCTCP().
Additionally, one can now properly block channel action's from reaching the
channel buffer via return HALTCORE; in OnChanAction.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1730 726aef4b-f618-498e-8847-2d620e286838
CModule has two vectors: A list of timers and a list of sockets for this
module. Since one shouldn't be able to add items multiple times it makes sense
to use a set here instead.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1643 726aef4b-f618-498e-8847-2d620e286838
A queue is a FIFO while a stack is a LIFO. The code which added paths to the
list of available paths expected them to be checked in the order they were
added, but instead they were checked in reverse order. This meant that one could
no longer replace "system modules" with a .so in ~/.znc/modules.
Thanks to DarthGandalf for noticing and reporting this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1629 726aef4b-f618-498e-8847-2d620e286838
This function works like GetModInfo(), but takes the full path to the module,
too.
This is used to speed up GetAvailableMods(). Before it created a list of module
paths, extracted the names and then called GetModInfo() on those module names
which looked up the path for the modules again. This extra step is now skipped
and the module's path is used directly.
To make this work, the call to FindModPath() was moved from OpenModule() into
its two callers LoadModule() and GetModInfo().
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1613 726aef4b-f618-498e-8847-2d620e286838
This function returns a list of <module dir, data dir> pairs which lists all
places in which modules should be looked for.
FindModPath() and GetAvailableMods() are changed to use this new function.
The list of places to look at is the same that was used before, but this now
also adds ./modules/extra so that modules enabled via --enable-extra are found
before 'make install'.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1612 726aef4b-f618-498e-8847-2d620e286838
Ever since r1505 our error messages when loading modules all were the same:
"Unable to find modinfo"
Improve this by giving the user all the information we offered before again. The
most useful one here is most likely the result from dlerror(). This is done by
adding a helper function CModules::OpenModule(). Most of its code is from
CModules::LoadModule() and this function and CModules::GetModInfo() now both use
this helper function for generating error messages.
This commit adds a "#warning", don't worry I'm working on it.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1596 726aef4b-f618-498e-8847-2d620e286838
Everything which isn't a CClient with a successful login counts as an
unidentified connection in this context. Modules who don't want this kind of
limit on their listening sockets can override CSocket::ConnectionFrom(), but
their sockets will still count towards this limit.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1561 726aef4b-f618-498e-8847-2d620e286838
This was found via partyline and notify_connect. notify_connect calls
CZNC::Broadcast() in OnClientLogin() which calls the OnBroadcast() module call.
When returning from this module calls, m_pUser and m_pClient was reset to NULL
and all the following modules got their OnClientLogin() called with m_pUser and
m_pClient set to NULL.
This patch fixes this by resetting those vars to their old values instead to
NULL when returning from a module call.
This patch also fixes the bug that m_pUser and m_pClient in modules were reset
to NULL after they caused a module call which called back into the current
module. The fix looks similar to the other one (this one is the Modules.h part).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1438 726aef4b-f618-498e-8847-2d620e286838
Some of them (eg. GetVersion) where so generic that we even had symbol
clashes (well, on no real worls OS (only windows), but still that's not nice).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1358 726aef4b-f618-498e-8847-2d620e286838
This makes it clearer what this variable is and it makes porting to windows
easier, because we can just change the typedef to HMODULE.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1344 726aef4b-f618-498e-8847-2d620e286838
Now every module that uses CSocket automatically gets its generated traffic
counted. Those which use Csock directly should be shot and burried anyway ;)
This adds CModule::IsGlobal().
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1283 726aef4b-f618-498e-8847-2d620e286838
OnUserAttached is renamed to OnClientLogin and
OnUserDetached to OnClientDisconnect.
This adds some new function with different arguments for the old names to cause
warnings from -Woverloaded-virtual while compiling.
This patch also adds OnClientConnect() which is called when the low-level
raw connection is established. (No SSL-handshake was done at this point yet!)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1266 726aef4b-f618-498e-8847-2d620e286838