psychon
52f755f0fd
Reuse the FD for locking the config for reading it
...
This saves us one whole open() :P
Honestly, this fixes some (stupid) locking problems with cygwin and shouldn't
hurt much otherwise (And no, cygwin still isn't supported yet).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1020 726aef4b-f618-498e-8847-2d620e286838
2008-04-08 18:53:05 +00:00
psychon
0afd0cf5dd
Support channels other than #chan or &chan
...
Without this e.g. +chans are changed to #+chans in CChan::CChan()
because IsChan() pretends it's sure that this can't be a channel.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1019 726aef4b-f618-498e-8847-2d620e286838
2008-04-08 08:21:40 +00:00
psychon
5590307909
chansaver: Add all channels to the config when this module is loaded
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1018 726aef4b-f618-498e-8847-2d620e286838
2008-04-07 20:19:17 +00:00
psychon
e24fdab787
Mark znc-config.in as executable, that way znc-config gets that too
...
This fixes something which long annoyed me :P
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1017 726aef4b-f618-498e-8847-2d620e286838
2008-04-05 17:09:30 +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
imaginos
1f4963c452
extra line breaking shit, its not supposed to be there :P
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1015 726aef4b-f618-498e-8847-2d620e286838
2008-04-03 15:43:52 +00:00
psychon
f642a493a7
Fix configure on FreeBSD (It didn't find dlopen)
...
I guess I broke configure recently :(
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1014 726aef4b-f618-498e-8847-2d620e286838
2008-04-02 19:02:23 +00:00
imaginos
3583b4b5de
fix state bug when connecting to a remote host thats ssl, results from a hostname that resolves to multiple ip's
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1013 726aef4b-f618-498e-8847-2d620e286838
2008-04-02 16:15:24 +00:00
psychon
6d957ed93c
Use MODFLAGS instead of CXXFLAGS for the modules
...
This also removes the duplicate check for dlopen() in configure.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1012 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 09:09:23 +00:00
psychon
0a5d3013d2
Add OnTopic() module call
...
Thanks to SilverLeo, again.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1011 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 09:03:17 +00:00
psychon
3be33dd6c8
Don't create empty .registry files for module data
...
This command showed a *lot* of empty files in ZNC's data dir
find ~/.znc -iname ".registry" -size 0|wc -l
Thanks to SilverLeo
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1010 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 09:01:55 +00:00
psychon
58a6a8f0e8
The disconnected warning you get on-connect should *not* be broadcasted *fix*
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1009 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 09:00:21 +00:00
psychon
ffe31fccd2
Shell module: Also read incomplete lines (no trailing newline) and display them
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1008 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:59:13 +00:00
psychon
617e732f66
Only allow admins to load the shell module
...
The exception to this is if ZNC is compiled with -DMOD_SHELL_ALLOW_EVERYONE
x-x wanted this.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1007 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:57:21 +00:00
psychon
cbdfaf0ed3
Make CModule::DelNV() return false if it didn't remove anything
...
This fixes e.g. <*crypt> Target [543534532] deleted
Thanks to SilverLeo for the patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1006 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:55:44 +00:00
psychon
9b757c6f6a
CUser::Clone() didn't handle the JoinTries and TimezoneOffset options *fix*
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1005 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:53:57 +00:00
psychon
73d8456dff
Mark all FDs as close-on-exec
...
This marks all FDs which are valid after the function creating them returns
as close-on-exec, so that processes started from ZNC (e.g. through the shell
module) don't inherit a copy of all of our FDs.
Csocket already does this for its FDs.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1004 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 08:52:13 +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
74447ee1d1
Increase the version number to 0.055
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1002 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 06:24:38 +00:00
psychon
66711fd746
Increase the version number to 0.054
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1000 726aef4b-f618-498e-8847-2d620e286838
znc-0.054
2008-04-01 06:17:59 +00:00
imaginos
493d515490
this should fix all the ipv4/ipv6 issues, tested it on fbsd and linux
...
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@999 726aef4b-f618-498e-8847-2d620e286838
2008-04-01 00:22:43 +00:00
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