Commit Graph

73 Commits

Author SHA1 Message Date
psychon
02beef2e07 Use znc.in instead of znc.com
No cookie for that domain catcher at znc.com!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1181 726aef4b-f618-498e-8847-2d620e286838
2008-08-30 09:00:21 +00:00
psychon
d4cd78a43b Instead of (ab)using a CClient for listening, use an own class this job
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1178 726aef4b-f618-498e-8847-2d620e286838
2008-08-29 18:51:08 +00:00
psychon
ecabbd2bcd Fix some of the direct module calls in Client.cpp
OnModCTCP(), OnModCommand() and OnModNotice() are now called through a
preprocessor macro that does all the magic. This fixes a couple of bugs:
- the m_pUser member of global modules for OnModNotice() was wrong
- OnModCTCP() wasn't called for global modules
- Finally handle 'throw UNLOAD' for all of this three module calls


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1162 726aef4b-f618-498e-8847-2d620e286838
2008-08-22 12:48:56 +00:00
psychon
03e34ac6e6 Remove KeepNick
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1151 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 11:34:11 +00:00
psychon
3ec3f07523 Move CClient's UserCommand() and HelpUser() into a new file ClientCommand.cpp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1150 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 10:38:24 +00:00
psychon
13dd3996d5 Remove some unused arguments and unimplemented functions
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1146 726aef4b-f618-498e-8847-2d620e286838
2008-07-24 10:14:41 +00:00
psychon
48d53876d6 Even more weird and broken clients sending even more and broken stuff
PART :#channel... Why do IRCds even parse this correctly? :(
Oh and yeah, it's eggdrop.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1145 726aef4b-f618-498e-8847-2d620e286838
2008-07-23 15:05:35 +00:00
psychon
cd8318370a Some weird clients might send a nickmask prefix, handle this correctly
*cough* eggdrop is evil *cough*

Thanks to dare for debugging this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1144 726aef4b-f618-498e-8847-2d620e286838
2008-07-23 13:36:04 +00:00
psychon
10210e4619 Don't throw any exceptions in CModules::LoadModule() on version mismatch
This also removes all the code catching those exceptions. There was nothing
which justified these exceptions and removing them doesn't hurt.

ByeBye CException::EX_BadModVersion


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1137 726aef4b-f618-498e-8847-2d620e286838
2008-07-17 12:01:44 +00:00
psychon
3c1e610cf5 Make CClient::GetNickMask() always return a valid nickmask
The recent removal of CUser::m_bIRCConnected lead to a bug here which is now
fixed.
In addition to this, this function now also works properly for users without
a vhost.

Oh and in User.cpp: Make sure CUser::GetIRCServer() returns an empty string
when we are no longer connected to an IRCd.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1134 726aef4b-f618-498e-8847-2d620e286838
2008-07-14 10:44:37 +00:00
psychon
31feec2c9f Use CZNC::Auth() to authenticate IRC clients
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1115 726aef4b-f618-498e-8847-2d620e286838
2008-07-07 18:35:41 +00:00
psychon
5e0c652b9a Add the remote ip to the info CAuthBase got
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1112 726aef4b-f618-498e-8847-2d620e286838
2008-07-07 18:24:38 +00:00
psychon
9e6d05a0bd Remove some unneeded includes from DCCBounce.h
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1106 726aef4b-f618-498e-8847-2d620e286838
2008-06-27 09:27:34 +00:00
psychon
bcf59c56ea Add and use CZNC::GetUptime() for getting the current uptime in human readable
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1098 726aef4b-f618-498e-8847-2d620e286838
2008-06-19 08:39:10 +00:00
psychon
78f8cce2c6 Add 'Uptime' command to *znc
ToDo: Use some readable format for displaying the uptime. Seconds just
don't make it.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1095 726aef4b-f618-498e-8847-2d620e286838
2008-06-17 07:52:56 +00:00
psychon
0a7b69080a Remove an unneeded call to CString::Token()
Thanks to x-x for this patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1092 726aef4b-f618-498e-8847-2d620e286838
2008-06-11 10:06:17 +00:00
psychon
442ef47c56 Add OnUserTopic module call
Patch by SilverLeo


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1086 726aef4b-f618-498e-8847-2d620e286838
2008-06-06 14:27:57 +00:00
psychon
e1bf2d21ca Disconnect unauthed connections after a timeout of 60 secs
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1067 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:09:25 +00:00
psychon
1e64901f0e Don't disconnect unauthed clients which use something else than PASS, USER or NICK
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1066 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:08:23 +00:00
psychon
b294891993 Don't allow users with 'DenyLoadMod' set to use 'ListAvailableModules'
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1063 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:00:10 +00:00
psychon
ff7a6c231a Remove some unneedef #ifdef's
MODULECALL doesn't need to be wrapped in #ifdef _MODULES, since main.h
already does this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1049 726aef4b-f618-498e-8847-2d620e286838
2008-05-10 15:09:46 +00:00
psychon
01bc68b1cb Move ChangeDir() and MakeDir() from CUtils to CDir
Those function were not modified. Only change is the name.

Those *Dir() functions really made no sense in CUtils when there is FileUtils
stuff. They really fit much better into here. I'll bet they'll make new friends
fast. I mean, why shouldn't they?
Uhm... sorry ;)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1044 726aef4b-f618-498e-8847-2d620e286838
2008-05-08 16:58:32 +00:00
psychon
6857394d71 Remove CString::ToKBytes()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1039 726aef4b-f618-498e-8847-2d620e286838
2008-05-05 21:39:09 +00:00
psychon
4ada00f542 Format traffic stats to not show bytes, but stuff like KiB and MiB etc
This adds CString::ToByteStr() for such jobs!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1038 726aef4b-f618-498e-8847-2d620e286838
2008-05-05 21:33:34 +00:00
psychon
c4f1eb3da3 Print a warning if a msg / notice gets lost because we are not connected to IRC
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1032 726aef4b-f618-498e-8847-2d620e286838
2008-04-25 16:30:11 +00:00
psychon
c64d7bc108 Force a space between if, for, while and (
This was done via:
   sed -ir 's/if(/if (/g; s/for(/for (/g; s/while(/while (/g' \
        *.h *.cpp modules/*.cpp



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1030 726aef4b-f618-498e-8847-2d620e286838
2008-04-20 13:08:44 +00:00
psychon
654a55a507 Send PONGs for client's PINGs if we are not connected to a server
Thanks to SilverLeo for the patch (I changed those spaces into tabs and added
some *huge* comment on top).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1016 726aef4b-f618-498e-8847-2d620e286838
2008-04-04 14:12:16 +00:00
psychon
e7bb3e5daa Remove an unused var from CClient
If CClient::m_bAuthed was false, CClient::m_pUser was NULL as well and
if it was true, m_pUser wasn't NULL, too. So why not take that var for
this job?


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1003 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:49:33 +00:00
psychon
e0cfd7958e Add some currently missing commands to /msg *status help
Thanks to SilverLeo for this patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@974 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 16:22:28 +00:00
psychon
3c5802271f One of last commits added some warnings due to -Wshadow which weren't fixed yet
This fixes those warnings.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@965 726aef4b-f618-498e-8847-2d620e286838
2008-02-19 20:30:24 +00:00
psychon
8f22dcc60d Fix all those warnings from -Wshadow
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@964 726aef4b-f618-498e-8847-2d620e286838
2008-02-19 20:25:21 +00:00
psychon
0edf201efd Add /msg *status listavailmods
Thanks to SilverLeo for this patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@961 726aef4b-f618-498e-8847-2d620e286838
2008-02-17 20:06:24 +00:00
psychon
f74ab87e19 And fix a shitload of trailing whitespaces and space / tab mixups in ZNC
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@959 726aef4b-f618-498e-8847-2d620e286838
2008-02-16 12:52:11 +00:00
psychon
8581b34778 Make /msg *status Jump / connect a no-op if the user has no server
This patch is from SilverLeo once again.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@954 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 17:50:37 +00:00
psychon
ef9018da7b Add a Rehash command to /msg *status
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@953 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 16:48:04 +00:00
psychon
0b90409018 Add ClearVHost command (patch from SilverLeo, thanks)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@940 726aef4b-f618-498e-8847-2d620e286838
2008-02-01 14:30:14 +00:00
psychon
5370a54012 Add DenySetVHost patch from Veit Wahlich aka cru
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@925 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:18:36 +00:00
psychon
e72c445694 Clean up includes
All the headers are now self-contained (g++ Header.h -o /dev/null).

Some system headers where moved to the .cpp they are actually needed in,
some of our own headers are includes less. (Especially MD5.h)

Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h
is the first file included.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:31:16 +00:00
psychon
eeec633e30 Update copyright header for 2008
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@910 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:13:07 +00:00
psychon
db9694836e Commit patches from x-x which split up long lines
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@903 726aef4b-f618-498e-8847-2d620e286838
2007-12-19 20:53:03 +00:00
psychon
64cd0ae1d5 Again a patch which can be called 'by crox'
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@896 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 16:10:08 +00:00
psychon
953bfcbbf4 Add ClearAllChannelBuffers command to *status (ClearBuffer for all channels)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@892 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 15:14:17 +00:00
psychon
f74f501d5a Handle CTCP to *status
We only answer to PING and VERSION.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@890 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 09:25:19 +00:00
psychon
d0a4831205 Always print a error message to the user if the connection is closed
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@875 726aef4b-f618-498e-8847-2d620e286838
2007-11-17 22:41:26 +00:00
psychon
d78369fee0 Main part is: Add disconnect and connect to *status
Other stuff included here:
- Always send the quit message when disconnecting from IRC
- Partly rewrite CConnectUserTimer::RunJob() for some de-uglification


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@874 726aef4b-f618-498e-8847-2d620e286838
2007-11-16 22:37:27 +00:00
psychon
a09a7e79f6 Switch to the copyright headers the GPLv2 wants us to have
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@843 726aef4b-f618-498e-8847-2d620e286838
2007-09-21 18:55:33 +00:00
psychon
64f70a7910 Fix compile error reported by N0S.
I guess I should test before committing -.-


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@842 726aef4b-f618-498e-8847-2d620e286838
2007-09-21 11:50:40 +00:00
psychon
7f1feb3cb7 Don't handle USER lines at all when the client is already logged in.
Fix bug 1797023 from sf.net bug tracker. Thanks to Zigara.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@840 726aef4b-f618-498e-8847-2d620e286838
2007-09-18 14:39:54 +00:00
psychon
fd8570454e This fixes sf.net bug 1765573 which is a NULL pointer dereference.
Patch was written/tested by x-x and I did the indentation.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@817 726aef4b-f618-498e-8847-2d620e286838
2007-08-05 19:43:25 +00:00
psychon
b772e2664e Merged rev 838,888,890,894,899,900,902-904,926,934,963,984-989 from crox's branch:
- Changes to specfile
- define PATH_MAX and RTLD_LOCAL if not defines
- compile fixes
- SetFileName should not set m_iFD
- check for cygwin and do not use -fPIC
- replaced if ... elif with case in configure.in
- handle 437 reply code
- allow disabled channels
- use strerror() in CIRCSock::SockError()
- added GetUser() to CClient and CIRCSock
- added support for traffic accounting
- added names to timers


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@806 726aef4b-f618-498e-8847-2d620e286838
2007-05-17 19:09:17 +00:00