Commit Graph

144 Commits

Author SHA1 Message Date
psychon
cb066e2425 Add OnRehashDone() module call
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@969 726aef4b-f618-498e-8847-2d620e286838
2008-02-29 16:47:34 +00:00
psychon
46f6651ba1 Try to get the user's home (~) from the env ($HOME) by default
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@966 726aef4b-f618-498e-8847-2d620e286838
2008-02-21 16:40:14 +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
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
cbb0fcf881 Only read from stdin if stdin is a TTY
This fixes an endless loop on rehash.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@952 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 16:46:28 +00:00
psychon
e326f6eb35 Rehash on SIGHUP
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@951 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 16:45:18 +00:00
psychon
8e33a7370f Add rehashing
This is only stuff for core which users can't use yet!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@950 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 16:38:57 +00:00
psychon
9a1c3874bc Remove the pid file when ZNC exits
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@948 726aef4b-f618-498e-8847-2d620e286838
2008-02-08 20:52:20 +00:00
psychon
0adf4e5af3 Remove OnConfigLine() module call
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@945 726aef4b-f618-498e-8847-2d620e286838
2008-02-07 22:25:58 +00:00
psychon
64d6d0d5af Error if a channel is defined more than once
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@944 726aef4b-f618-498e-8847-2d620e286838
2008-02-07 22:23:51 +00:00
psychon
c20f8427bb Start the connect user time in ParseConfig()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@943 726aef4b-f618-498e-8847-2d620e286838
2008-02-07 22:23:14 +00:00
psychon
077b25e77d Move the check for listeners from main() to CZNC::ParseConfig()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@942 726aef4b-f618-498e-8847-2d620e286838
2008-02-07 22:22:03 +00:00
psychon
05df4919f6 Increase the connect timeout to 2 mins
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@936 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:55:17 +00:00
psychon
45dae8a109 Move user deletion to CUser::HandleUserDeletion()
This does not include any behaviour change.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@934 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:24:20 +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
47c0cb9b82 Some code clean up and change KeepBuffer and KeepNick default for --makeconf
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@924 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:11:53 +00:00
psychon
cc20744683 Small cleanup to calling of OnBoot() for user modules
There is no reason to call it indirectly and this should also
decrease the binary size a little.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@919 726aef4b-f618-498e-8847-2d620e286838
2008-01-08 19:48:45 +00:00
psychon
5210c3bfae Fix for OpenBSD and don't busy loop for file locks
I don't think there is a high change that the file lock becomes available
in the short time we did loop and retry the lock, so that code served no
real purpose.

Also, this includes unistd.h in Utils.h which is needed for OpenBSD.
Thanks to fred for testing on his openbsd/sparc box.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@918 726aef4b-f618-498e-8847-2d620e286838
2008-01-08 17:13:10 +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
55a3fa0e05 Remove OnFinishedConfig() module call
No one used it anyway


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@909 726aef4b-f618-498e-8847-2d620e286838
2008-01-03 21:00:25 +00:00
psychon
c4891c5dd8 Fix a segfault on exit
When we ran CZNC::~CZNC() we called DeleteUsers() which called
RestartConnectUser(). Since we had already deleted that timer, we called
some already deleted class.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@908 726aef4b-f618-498e-8847-2d620e286838
2008-01-03 20:01:26 +00:00
psychon
10519ae595 Change the tag CZNC::GetTag() returns to be shorter
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@906 726aef4b-f618-498e-8847-2d620e286838
2007-12-27 20:42:52 +00:00
psychon
b490b12058 Fix some gcc 4.3 warnings
These are mostly string casts, handling function's return value and some
weird warning about missing spaces on empty while loops.

These were reported by and fixed with Marcus Rueckert <darix@opensu.se>.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@904 726aef4b-f618-498e-8847-2d620e286838
2007-12-20 18:31:48 +00:00
psychon
1360effd31 This covers the code changes for the datadir move (which is now finished)
Based on darix' patch I wrote this. Modperl's changes were not tested since I
didn't find someone who could test it. Well...

Ah and btw it regenerates configure


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@902 726aef4b-f618-498e-8847-2d620e286838
2007-12-12 21:15:44 +00:00
psychon
cf41b0acd0 Switch back to a min select timeout of 500 msec
x-x noticed that ConnectDelay = 4 would break with a min timeout of 5 sec...


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@894 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 15:25:11 +00:00
psychon
b51302be13 Change the list of to-be-deleted users into a std::map
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@893 726aef4b-f618-498e-8847-2d620e286838
2007-12-02 15:16:21 +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
59c8522a96 Add some comments to make clear what this code does (yay, some comments in the source!)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@869 726aef4b-f618-498e-8847-2d620e286838
2007-11-12 21:28:07 +00:00
psychon
a213258c99 Move code for creating CIRCSocks into a CCron and use DynamicSelectLoop
DynamicSelectLoop checks when the next cron runs and sleeps until then (with an
upper and lower border).
To fix the connecting code it needed to be moved into a cron.



git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@860 726aef4b-f618-498e-8847-2d620e286838
2007-11-03 20:04:24 +00:00
psychon
ee350ab744 Change second argument to module in OnLoad() from sErrorMsg to sMessage.
This message is always displayed when the module returns (well, screw webadmin)
and this way a module can notify the user if it loaded but something unexpected
happened.

As you might guess, no one uses this ATM :)

Proposal comes from prozac


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
2007-10-28 17:57:07 +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
8a9ddda247 Only expand the PidFile config option when writing the pid file.
This way if we rewrite the config PidFile gets the same value it had when znc
was started.
-> we don't turn it into an absolute path which is bad if data dir is changed


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@839 726aef4b-f618-498e-8847-2d620e286838
2007-09-08 16:22:10 +00:00
psychon
61ddeac102 Fix my broken indentation.
Thanks x-x for reporting this.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@828 726aef4b-f618-498e-8847-2d620e286838
2007-08-19 13:57:08 +00:00
psychon
5b1e3bf600 Merge rev 1023 from crox.
'Do not use server cert as client cert'


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@821 726aef4b-f618-498e-8847-2d620e286838
2007-08-07 20:08:09 +00:00
psychon
c0e3f3bb03 Add JoinTries config var which sets a limit for channel join tries to avoid
flood issues. This var defaults to 0 which means 'No Limit'.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@811 726aef4b-f618-498e-8847-2d620e286838
2007-07-04 20:15:10 +00:00
psychon
0a0c826043 Regenerate configure (once again) and indent CZNC::UpdateTrafficStats() with *tabs*
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@807 726aef4b-f618-498e-8847-2d620e286838
2007-05-17 19:11:30 +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
psychon
d82eb75d1c merge rev 962;965;972-975:
- increased select timeout to 0.5 secs (this should save CPU time)
- added real-life ISpoof example to the example znc.conf
- make away module ignore message from the user (fixes antiidle together with away)
- show error message when webadmin cant bind to a port (improved later)
- fix /me, it was turned into a CTCP
- remove an extra space


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@802 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:35:17 +00:00
psychon
1fa9187be6 Revs 945-948;952-953:
- add timezone offset if server is in another timezone than the client
- add prependTimestamp
- add version number to configure.in
- write connect delay back into znc.conf


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@801 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:29:39 +00:00
psychon
9b671ee976 merge rev 936, 939-943 from psychon branch:
- if a client connected before znc connected to irc and if it uses a wrong nick it
   wasnt informed of this -> fixed
- znc.cpp didnt work with --disable-modules
- some stuff which was already merged previously


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@800 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:20:10 +00:00
psychon
f601db2cd8 merge with rev 932 psychon branch:
- module call for /me's
- timestamps for playback and query buffer
- WALLOP stuff / fix
- properly join channels _after_ namesx or uhnames were set up
- dont screw up raws on reconnect when you ran /lusers
- change default quit msg and version reply to CZNC::GetTag(false)
- change CZNC::GetTag() to point to sf.net
- kind of an rewrite for partyline, added fixed channels (this doesnt work on irssi,
		did it ever work?)
- add the timestamp support to webadmin too
- add ConnectDelay config option to avoid being killed because we connected too fast
- make znc handle usermodes correctly


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@799 726aef4b-f618-498e-8847-2d620e286838
2007-05-16 22:13:17 +00:00
prozacx
0a62274975 Committing patches from crox/psychon
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@790 726aef4b-f618-498e-8847-2d620e286838
2007-03-12 06:26:54 +00:00
prozacx
70aafdee8f Moved awaynick functionality into modules/awaynick.cpp module
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@775 726aef4b-f618-498e-8847-2d620e286838
2006-09-17 22:57:28 +00:00
prozacx
f8bb245c36 Patched using fix_no_modules_support.patch by psycho
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@768 726aef4b-f618-498e-8847-2d620e286838
2006-09-16 18:26:36 +00:00
prozacx
0f85fee9e6 Patched using linenumbers.patch from x-x
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@756 726aef4b-f618-498e-8847-2d620e286838
2006-09-15 23:09:13 +00:00
prozacx
6dcacaa79e Added contact info
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@752 726aef4b-f618-498e-8847-2d620e286838
2006-09-13 07:39:48 +00:00
imaginos
18f1274913 fixed use of --encrypt-pem
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@730 726aef4b-f618-498e-8847-2d620e286838
2006-05-04 12:02:36 +00:00
prozacx
e8d176ea93 Added code to let CUser know it is being deleted, and added error return to AddUser()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@725 726aef4b-f618-498e-8847-2d620e286838
2006-04-29 19:38:56 +00:00
prozacx
b740d7cc36 Refactored module hook calling macros into one master macro
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@708 726aef4b-f618-498e-8847-2d620e286838
2006-03-22 08:02:37 +00:00