Commit Graph

1099 Commits

Author SHA1 Message Date
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 2f495e1fd3 Fix some Doxygen comments
We don't have much comments and even fewer doxygen comments, but those that
we have should at least be correct.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1105 726aef4b-f618-498e-8847-2d620e286838
2008-06-27 09:26:16 +00:00
psychon 8293e346b7 Indent is tabs, not spaces
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1104 726aef4b-f618-498e-8847-2d620e286838
2008-06-26 08:59:45 +00:00
psychon 29c26643e3 The last commit broke with --disable-openssl *fix*
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1103 726aef4b-f618-498e-8847-2d620e286838
2008-06-24 08:43:51 +00:00
psychon 1a7895cbd4 Don't allow running ZNC as root
That is, unless --allow-root is given. In this case we print a big fat warning.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1102 726aef4b-f618-498e-8847-2d620e286838
2008-06-23 17:59:57 +00:00
psychon b6d03b6c36 Add some ExpandString() 'vars'
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1101 726aef4b-f618-498e-8847-2d620e286838
2008-06-22 14:41:51 +00:00
psychon bea3d85e8c autoattach: Don't allow adding the same entry twice
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1100 726aef4b-f618-498e-8847-2d620e286838
2008-06-22 14:06:01 +00:00
psychon f88c7384b6 Clean up some includes
We no longer include Csocket.h in main.h because only few files actually need
it. (Only HTTPSock.h and Timers.h)

We also clean up some includes in Timers.h. It didn't actually include
the file it needed.

Oh and this also adds a warning to main.h if PATH_MAX is undefined. If this
happens, it is most likely a bug that needs to be addressed. (some missing
includes, I'd guess)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1099 726aef4b-f618-498e-8847-2d620e286838
2008-06-21 11:20:30 +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 d397cb8ad2 Add CZNC::GetVersion()
CZNC::GetVersion() returns something like '0.057-r1234'.

This also cleans up CZNC::GetTag() a little. A theoretical buffer overflow
less and some higher speed is the result.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1097 726aef4b-f618-498e-8847-2d620e286838
2008-06-17 08:25:04 +00:00
psychon 0f3f305a87 Use ExpandString() for CTCPReply
You can now use 'wildcards' like %nick%, %user%, etc in CTCPReply


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1096 726aef4b-f618-498e-8847-2d620e286838
2008-06-17 08:22:27 +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 acc39c9351 modules/Makefile.in: $LIBS is unused and should not be used
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1094 726aef4b-f618-498e-8847-2d620e286838
2008-06-16 19:17:05 +00:00
psychon b475f5d69e Make --makeconf more clear
This rephrases one of the questions asked and adds a section to the README that
explains two unclear questions.

This patch is based on a patch from Patrick Matthaei from debian.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1093 726aef4b-f618-498e-8847-2d620e286838
2008-06-14 16:17:46 +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 f59b712293 Add man pages for everything installed to <prefix>/bin
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1091 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 17:09:58 +00:00
psychon d2aa281735 Fix the chmod of the perl modules
perl modules (.pm) don't need executable bits...

Thanks to Patrick Mathhaei from debian for this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1090 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 09:50:50 +00:00
psychon 91eefcf87b Fix a bug introduced by SilverLeo :P
If a topic was unset, this wasn't forwarded to the client the way it should be.

Thanks to SilverLeo for the patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1089 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 09:43:21 +00:00
psychon 80a947100a crypt: Fix bug where a usermsg was not forwarded to other clients
Thanks to SilverLeo for this patch.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1088 726aef4b-f618-498e-8847-2d620e286838
2008-06-08 09:34:21 +00:00
imaginos 4059f8c3ed missing paren in test
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1087 726aef4b-f618-498e-8847-2d620e286838
2008-06-07 23:35:43 +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 d701809ac1 Allow the OnTopic module call to modify the topic
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1085 726aef4b-f618-498e-8847-2d620e286838
2008-06-06 14:26:04 +00:00
psychon 8e3f1ef77d Module query (like *shell) now uses the module name as prefix, not 'znc'
This hopefully avoids some ugly stuff. Namely, irssi pretending *status changed
its nick to *shell etc because they have the same ident and host and are in no
common channel.

This patch is based on a patch from SilverLeo. If this breaks it's his fault!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1084 726aef4b-f618-498e-8847-2d620e286838
2008-06-03 12:07:49 +00:00
psychon 291d498bf8 Use the SA_RESETHAND flag to sigaction()
Instead of resetting the signal handler back to SIG_DFL on our own, this is
now done automatically for us by the kernel!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1083 726aef4b-f618-498e-8847-2d620e286838
2008-06-03 09:15:11 +00:00
psychon 2583b7e9ff Handle channel CTCP the same way we do for private CTCPs
This patch doesn't actually change anything for private CTCPs, it's
only the indentation level that changes! (Well, and that this code gets
its own function...)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1082 726aef4b-f618-498e-8847-2d620e286838
2008-06-03 07:15:52 +00:00
psychon e08cb72646 Also use /etc/passwd if $HOME is set but empty
Before this, we used ./.znc as datadir in this case. Not good.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1081 726aef4b-f618-498e-8847-2d620e286838
2008-06-03 06:32:18 +00:00
psychon 5e5842333f Remove the 'znc-static' make target
Statically linking ZNC doesn't work anyway here and only leads
to problems...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1080 726aef4b-f618-498e-8847-2d620e286838
2008-06-03 06:24:40 +00:00
psychon 1bb1206472 Webadmin: Add support for timezone offset
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1079 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 14:09:41 +00:00
psychon 0df0e9c234 Remove the *.de webadmin skins
I bet many people will kill me for this...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1078 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 14:07:29 +00:00
psychon 709d822157 Perform: Require an argument for the 'add' command
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1077 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 13:59:01 +00:00
psychon 8aa85fd12e Nickserv: Work on freenode (which uses lower case 'identify' notice)
Thanks to SilverLeo for the patch


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1076 726aef4b-f618-498e-8847-2d620e286838
2008-05-30 10:54:44 +00:00
psychon e8d4323c2e Show the version number on startup because JamesOff wants it
This patch is from SilverLeo. (The commit msg is basically, too)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1075 726aef4b-f618-498e-8847-2d620e286838
2008-05-28 14:48:31 +00:00
psychon 13ddd325f9 Webadmin: Don't reset all channel settings submitting a user page
In r1058 the behaviour of CUser::Clone() was changed. It now also handles the
channel settings. This change breaks webadmin, because it doesn't properly
set up the channels it feeds to CUser::Clone()

This commit 'fixes' this by adding an extra parameter to CUser::Clone() which
makes it revert to the old behaviour. Webadmin uses this parameter.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1074 726aef4b-f618-498e-8847-2d620e286838
2008-05-26 15:02:09 +00:00
psychon 5c39502342 Fix restarting of the connect user timer during rehashing
Rehashing didn't always properly restart the connect user timer.
This happened e.g. if rehashing fails because the config file doesn't exist.

To fix this, we restart this timer now in the CZNC::RehashConfig() where it
will *always* happen.

This commit fixes a crash bug! (using an invalid iterator)


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1073 726aef4b-f618-498e-8847-2d620e286838
2008-05-26 14:59:41 +00:00
psychon d0f33f8b1c The instructions at the end of makeconf showed a wrong port
This was broken since r964 from Feb 2008.

Thanks to fred for finding this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1072 726aef4b-f618-498e-8847-2d620e286838
2008-05-26 14:56:23 +00:00
psychon 803b34c6dc Simplify this a little by using the new-and-improved (tm) CZNC::Broadcast()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1071 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 21:13:36 +00:00
psychon a773c13f69 Add bAdminOnly and pSkipClient arguments to CZNC::Broadcast
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1070 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 21:12:53 +00:00
psychon 4fd07208ab DCC bouncing: Throttle the receiving side if we can't bounce the data fast enough
It could happen that ZNC was killed by the OOM killer. This was caused by
DCC bouncing receiving as fast as possible and caching everything in memory.

This throttles the receiving side via PauseRead() and UnPauseRead().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1069 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:16:29 +00:00
psychon d265fc85ae De-bashify znc-buildmod by removing colors
This commit should make someone at debian really happy...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1068 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:12:55 +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 daef16a3eb Replace CString::Token() with a rewritten version
In my testing this saves between 29% and 97% (!) of CPU usage. Biggest speedup
happens with long tokens being returned.
This is because the old version uses std::string::operator+(char) to construct
the returned string, while the new one uses std::string::substr() only once.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1065 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:05:07 +00:00
psychon ce5dae0f2b Cleanup autoop a little
This removes unused module hooks and some unused code.

It also gives some comments there own line.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1064 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 17:02:14 +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 edb56b1660 Make it possible to add extra strings to the version number
This will be used for the nightly tarballs (perhabs).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1062 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 15:29:52 +00:00
psychon 40b7fdc471 Increase the version number to 0.057
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1061 726aef4b-f618-498e-8847-2d620e286838
2008-05-24 15:23:01 +00:00
psychon 2081f9f3df Increase the version number to 0.056
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1059 726aef4b-f618-498e-8847-2d620e286838
znc-0.056
2008-05-24 15:20:58 +00:00
psychon 3ee049bc5a Teach CUser::Clone() to also handle channel settings
Now rehashing can finally change channel settings, too.

One part of this patch worries me: Detaching / Attaching channels
via rehash. Let's see what happens...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1058 726aef4b-f618-498e-8847-2d620e286838
2008-05-21 14:22:20 +00:00
psychon 2f1b5347c9 configure: Fix dlopen() detection
The 'appendLib -ldl' is the important part, autoconf doesn't do that
automatically if you give it an argument.

This bug only triggered with --disable-debug (libssl pulled in libdl).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1057 726aef4b-f618-498e-8847-2d620e286838
2008-05-16 15:01:41 +00:00
psychon 8ed7d8a2be make distclean: Also remove znc-buildmod
configure now generates znc-buildmod, so distclean has to remove it.

Thanks to SilverLeo for pointing this out.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1056 726aef4b-f618-498e-8847-2d620e286838
2008-05-15 10:51:58 +00:00