Commit Graph

993 Commits

Author SHA1 Message Date
imaginos a89fa4618d removing connect() completely. replacing with hint to AI_ADDRCONFIG
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@998 726aef4b-f618-498e-8847-2d620e286838
2008-03-31 06:15:28 +00:00
imaginos a91f86d1c2 commenting out this test for now
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@997 726aef4b-f618-498e-8847-2d620e286838
2008-03-31 04:53:21 +00:00
imaginos 3933f807df wasn't being to smart here, not totally portable when specifying IPPROTO_IP, use the protocol pass in for best portability
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@996 726aef4b-f618-498e-8847-2d620e286838
2008-03-31 02:37:34 +00:00
imaginos fc191e4908 state bug, from previous fix broken vhost binding
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@995 726aef4b-f618-498e-8847-2d620e286838
2008-03-30 16:28:44 +00:00
imaginos 1fb0039732 reverse the order of dns lookup on bind vs dns lookup on remote host. this also does a check on each ip returned by getaddrinfo to be sure its able to connect to that host
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@994 726aef4b-f618-498e-8847-2d620e286838
2008-03-28 05:09:48 +00:00
psychon f9d12fb872 Fix a memory leak in CUser::Clone()
Clone() didn't free the list of servers, but instead just leaked it.

This introduces CUser::DelServers() for simplicity.

The reordering in the destructor is to fix some theoretical bugs (I bet
someone will hate me for this).


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@993 726aef4b-f618-498e-8847-2d620e286838
znc-0.054-rc3
2008-03-24 22:24:15 +00:00
psychon 246e71fe45 Fix a memory leak in rehashing
The fake user rehashing uses was leaked completly (BAD)

Thanks to SilverLeo for reporting and x-x for making me track this one down :P


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@992 726aef4b-f618-498e-8847-2d620e286838
2008-03-24 22:22:41 +00:00
psychon acdd2c61b9 Fix for GCC 4.3
Thanks to Kuja for reporting and testing and SilverLeo to know immediately
which file needs to be included.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@991 726aef4b-f618-498e-8847-2d620e286838
2008-03-22 20:10:39 +00:00
psychon 54867320dc Fix sf bug #1915864 (patch from x-x)
If you do /names #chan when you are not in #chan, you never got
the reply.

Thanks to Xaquseg for reporting.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@990 726aef4b-f618-498e-8847-2d620e286838
znc-0.054-rc2
2008-03-22 18:39:11 +00:00
imaginos 9c88a6aedf bug when trying to track down the right chat session
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@989 726aef4b-f618-498e-8847-2d620e286838
2008-03-18 15:14:23 +00:00
imaginos 2578384277 documented how to debug with valgrind
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@988 726aef4b-f618-498e-8847-2d620e286838
2008-03-18 03:00:03 +00:00
imaginos 20a970ae3d make sure these scalars are declared as mortals as to avoid a memleak
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@987 726aef4b-f618-498e-8847-2d620e286838
2008-03-18 02:30:42 +00:00
imaginos ed15b68684 possible memleak during onload bu pZNCSpace not being mortal
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@986 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 19:51:58 +00:00
imaginos 322483ab8e decided to restore the config checking during rehash to original state. I came to what i figure is a good compromise which is to allow global modules to have config lines that are prefixed with 'GM:', thus allowing core config checking and allowing global modules to do their own config checking
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@985 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 18:26:06 +00:00
imaginos 6f80fdd02f could be a global config line
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@984 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 15:30:28 +00:00
imaginos fd614b5555 inverted condition, woops
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@983 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 15:13:02 +00:00
imaginos 8873fbefa1 dont require .pm being in the mod name
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@982 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 14:59:06 +00:00
imaginos a0b2a8fc2b changed (un|re)?loadmod to (un|re)?loadperlmodule
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@981 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 04:22:49 +00:00
imaginos df1c36ca08 added back the ability for global modules to handle unhandled config lines
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@980 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 04:21:53 +00:00
imaginos 835e78fdec added back in global module functionality of handling config lines dynamically
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@979 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 04:20:35 +00:00
imaginos c73cb82006 added optional length to CaseCmp
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@978 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 04:19:36 +00:00
imaginos d53fa7b85d throw an warning if package definition is not found
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@977 726aef4b-f618-498e-8847-2d620e286838
2008-03-17 02:40:38 +00:00
psychon 7c56ddd603 Don't forward TOPIC changes for detached channels
Thanks to JamesOff (:P) for reporting.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@976 726aef4b-f618-498e-8847-2d620e286838
znc-0.054-rc1
2008-03-04 18:12:46 +00:00
psychon f6d86fac43 Only save a single backup of the znc config file
The ~/.znc/configs/backups/ directory quickly got quite big, so we don't do
that but instead only save on backup as ~/.znc/configs/znc.conf-backup


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@975 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 16:30:08 +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 7572c8e6a6 autoop: Add a define for the challenge length
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@973 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 09:44:09 +00:00
psychon 262c7e01ed Some ftp clients skip empty files by default, so give install.sh some content
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@972 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 09:42:40 +00:00
psychon 65c572fd38 Add --datadir to znc-config.in
Oh and also use $prefix instead of @prefix@ where possible.
This makes reading znc-config nicer IMHO.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@971 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 09:31:25 +00:00
psychon 973b41a99c Fix compilling modperl
Modperl was broken for quite some time and no one noticed...

The modperlFLAGS include the path to some static lib which will be linked in.
For this to work, we need to already have used one of its symbols.

Now, if the linker first sees this DynaLoader.a and then our object file,
there are no references to any symbol from it yet and thus he drops it.

The fix is easy: The modperlFLAGS need to be after modperl.cpp on the
command line.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@970 726aef4b-f618-498e-8847-2d620e286838
2008-03-01 09:29:26 +00:00
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 ba619d0b3f Update to latest Csocket *again*
Csocket closed the sockets before openssl could send the close alert.
This fixes that.

Why am I always finding bugs in this code? :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@968 726aef4b-f618-498e-8847-2d620e286838
2008-02-29 15:51:04 +00:00
psychon 331f8b1e3a Update to latest Csocket
This fixes a bug where Csocket would do busy reads and writes on sockets it
got from listening sockets through accept().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@967 726aef4b-f618-498e-8847-2d620e286838
2008-02-29 06:44:22 +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 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