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
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
0dfaa1d706
Add -Wshadow to our CXX flags
...
This gives us some useful warnings, but it first needs some fixing...
(See next commit)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@963 726aef4b-f618-498e-8847-2d620e286838
2008-02-19 20:23:44 +00:00
prozacx
606f1978fa
Added some svn:ignore rules
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@962 726aef4b-f618-498e-8847-2d620e286838
2008-02-18 09:16:49 +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
3f45131e58
autoop: Don't answer on too short challenges
...
Thanks to SilverLeo for this patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@960 726aef4b-f618-498e-8847-2d620e286838
2008-02-17 12:23:26 +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
be3edeee82
Update to latest Csocket
...
This fixes some trailing whitespaces and space/tab mixups I found.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@958 726aef4b-f618-498e-8847-2d620e286838
2008-02-16 12:50:07 +00:00
psychon
5a727a3953
There is no way stdout is a TTY after we forked, so don't pretend it is
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@957 726aef4b-f618-498e-8847-2d620e286838
2008-02-15 19:15:44 +00:00
psychon
4d7256350b
x-x noticed the zncchk script doesn't exist anymore...
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@956 726aef4b-f618-498e-8847-2d620e286838
2008-02-11 21:11:05 +00:00
psychon
74623a9e5c
Fix CLockFile's fd leak
...
CLockFile::Close() only closed the fd if we didn't call
fork() or are the father. Fix this.
This also fixes rehashing for --disable-debug.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@955 726aef4b-f618-498e-8847-2d620e286838
2008-02-11 21:01:50 +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
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
bcb0306393
Don't allow users to change their user name through spoofed webadmin requests
...
Since adding and editing users is handled pretty much the same way in webadmin,
you could change your user name when you sent a POST requests with some
arbitrary user field:
echo "user=newuser&submitted=1" | \
lynx -post_data -auth=user:pass http://localhost:55455/edituser
This was spotted by SilverLeo who seems to spend quite some time trying to make
ZNC break, which is a good thing. Thanks!
Oh and btw, the last commit (delete the pid file) is from SilverLeo.
I forgot to mention him in the commit msg. Sorry.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@949 726aef4b-f618-498e-8847-2d620e286838
2008-02-10 10:18:54 +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
f035753fc3
Also write a pid file when we were compiled with --enable-debug
...
Thanks again to SilverLeo for this patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@947 726aef4b-f618-498e-8847-2d620e286838
2008-02-08 16:37:43 +00:00
psychon
f495acd110
Make CFile::Delete() return a bool (true for success)
...
The static version of CFile::Delete() already does so.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@946 726aef4b-f618-498e-8847-2d620e286838
2008-02-08 16:20: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
c6664d5ab9
Update to latest Csocket
...
This is some stuff I wrote:
- sockets are marked as close-on-exec so that child processes (e.g. from the
shell module) don't get a copy of all of our sockets.
- This adds separate functions for marking sockets as blocking / non-blocking.
- When a socket is marked for closing, we stop reading lines from it.
I don't think any of these two bugs were actually ever triggered by anyone,
but meh, so what?
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@941 726aef4b-f618-498e-8847-2d620e286838
2008-02-07 17:22:36 +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
f79fe4e878
Update config.guess and config.sub
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@939 726aef4b-f618-498e-8847-2d620e286838
2008-01-30 10:31:41 +00:00
psychon
6fea28cad0
Update simple_away's copyright date
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@938 726aef4b-f618-498e-8847-2d620e286838
2008-01-30 10:28:15 +00:00
psychon
fc172bff6e
Fix a NULL pointer dereference in the 'add user' page of webadmin
...
This was just recently introduced in rev 935 "Display user's vhost if it's
not in the global vhost list".
Thanks to icu and Kuja for reporting.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@937 726aef4b-f618-498e-8847-2d620e286838
2008-01-28 16:28:10 +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
9f19e82cf5
Webadmin: Display user's vhost too if it's not in the global vhost list
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@935 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:50:53 +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
8f59ef93f3
Mark GenerateHelp() and die() in main.cpp as static
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@933 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:20:59 +00:00
psychon
3244c81920
Make CListener clean up after itself (Remove the listing socket when destroyed)
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@932 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:20:19 +00:00
psychon
25e21ec726
Update AUTHORS file
...
This adds SilverLeo and updates Kuja's mail address
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@931 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:19:09 +00:00
psychon
e150bdda33
znc.conf: Only write StatusPrefix in the user section if needed
...
Thanks to SilverLeo for the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@930 726aef4b-f618-498e-8847-2d620e286838
2008-01-20 16:17:46 +00:00
psychon
9b91f295bc
I have no clue how, but I managed to break ZNC :( *fix*
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@929 726aef4b-f618-498e-8847-2d620e286838
2008-01-19 08:37:30 +00:00
psychon
c226c30095
Don't use <> but "" for the includes in kickrejoin
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@928 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 23:06:54 +00:00
psychon
1f9e4f9601
Save some space for --disable-modules by not compiling template and http socks
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@927 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:46:40 +00:00
psychon
74fb58cce5
Add --no-color switch and only use escape sequences if isatty() says so
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@926 726aef4b-f618-498e-8847-2d620e286838
2008-01-18 22:27:59 +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
b5e6518fdc
Again, update to latest Csocket
...
I wonder how often I did this kind of commit already...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@923 726aef4b-f618-498e-8847-2d620e286838
2008-01-17 22:44:12 +00:00
psychon
d7c51ed141
And again some makefile stuff (this time it's some new depend code)
...
We are back to the behaviour of some old version of the Makefile
If you want to compile ZNC only once, just use make.
If you want the Makefile do to dependency tracking and that fancy stuff,
run make depend which creates the .depend and modules/.depend dirs.
From then on some dependency files get written when you compile something.
(The way we did it before now was bad, because all the .cpp files depended on
the .depend dir which got its mtime updated regulary)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@922 726aef4b-f618-498e-8847-2d620e286838
2008-01-16 20:56:07 +00:00
psychon
ce6adf6941
Make znc-buildmod work for fred :)
...
On his ksh / *bsd those escape sequences where not treated as escape sequences
but printed raw. This fixes that.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@921 726aef4b-f618-498e-8847-2d620e286838
2008-01-14 21:25:29 +00:00
psychon
660eded107
Add simple_away module
...
This modules sets you away some time after the last client detaches and it sets
you back when you reattach.
You can include %s in your away reason which is replaced with the current
time when setting you away.
If you set an away reason yourself while you are attached, the module won't
change this reason.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@920 726aef4b-f618-498e-8847-2d620e286838
2008-01-09 17:39:44 +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
f497932fb2
Update my mail address in the AUTHORS file
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@917 726aef4b-f618-498e-8847-2d620e286838
2008-01-07 21:33:32 +00:00