mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 16:54:46 +02:00
+- Made except socks become except scan, and made it actually WORK, and some
+ bugreport fixes
This commit is contained in:
+57
-7
@@ -1,3 +1,58 @@
|
||||
#
|
||||
# UnrealIRCd Bug Reporting Script
|
||||
# Copyright (c) 2001, The UnrealIRCd Team
|
||||
# All rights reserved
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification, are permitted
|
||||
# provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this list of conditions
|
||||
# and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
# and the following disclaimer in the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# * Neither the name of the The UnrealIRCd Team nor the names of its contributors may be used
|
||||
# to endorse or promote products derived from this software without specific prior written permission.
|
||||
# * The source code may not be redistributed for a fee or in closed source
|
||||
# programs, without expressed oral consent by the UnrealIRCd Team, however
|
||||
# for operating systems where binary distribution is required, if URL
|
||||
# is passed with the package to get the full source
|
||||
# * No warranty is given unless stated so by the The UnrealIRCd Team
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# First we define some nice settings and some nice functions
|
||||
set print pretty on
|
||||
|
||||
# dumplist <linked list> <structure format>
|
||||
define dumplist
|
||||
echo Dumping linked list $arg0 in format $arg1\n
|
||||
set $p = $arg0
|
||||
while $p
|
||||
print *($arg1 *) $p
|
||||
set $p = $p->next
|
||||
end
|
||||
end
|
||||
|
||||
# dumparray <name> <size>
|
||||
define dumparray
|
||||
echo Dumping array $arg0 size $arg1\n
|
||||
set $p = 0
|
||||
while $p < $arg1
|
||||
if $arg0[$p]
|
||||
print *$arg0[$p]
|
||||
end
|
||||
set $p = $p + 1
|
||||
end
|
||||
end
|
||||
|
||||
echo Full backtrace:\n
|
||||
echo ---------------\n
|
||||
echo \n
|
||||
@@ -18,10 +73,5 @@ print IRCstats
|
||||
echo \n
|
||||
echo Modules:\n
|
||||
echo ----------------------\n
|
||||
set $i = 0
|
||||
while $i < 50
|
||||
if Modules[$i++]
|
||||
p *Modules[$i - 1]
|
||||
end
|
||||
end
|
||||
quit
|
||||
dumparray Modules 50
|
||||
quit
|
||||
@@ -830,3 +830,6 @@ seen. gmtime warning still there
|
||||
- Added a bug reporting tool (still alpha)
|
||||
- Removed some win32 debug code that was left, reported by TheEggMan
|
||||
- Win32 cleanup
|
||||
- Made except socks become except scan, and made it actually WORK, and some
|
||||
bugreport fixes
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ echo "Operating system:" >> $BUGREPORT
|
||||
ls -l *core* >> $BUGREPORT
|
||||
uname -a >> $BUGREPORT
|
||||
gdb -x .bugreport.gdb src/ircd *core* >> $BUGREPORT 2>&1
|
||||
|
||||
more $BUGREPORT
|
||||
cat |sendmail -t << __EOF__&
|
||||
To: bugs-unreal@tspre.org
|
||||
From: autobugreport@unrealircd.com
|
||||
|
||||
+7
-7
@@ -178,7 +178,7 @@ allow channel {
|
||||
C coadmin
|
||||
u get_umodec
|
||||
f get_umodef
|
||||
z can_zline
|
||||
z can_zline
|
||||
W get_umodew
|
||||
^ can_stealth
|
||||
H get_host
|
||||
@@ -569,13 +569,13 @@ except ban {
|
||||
/*
|
||||
* NEW: except socks {}
|
||||
* OLD: e:Line
|
||||
* Makes it so ircd doesn't check you for
|
||||
* socks syntax:
|
||||
* except socks { mask (ip number/hostmask); }; r
|
||||
* repeat except socks {} for each ip to except.
|
||||
* Makes it so scan.so doesn't scan you.
|
||||
*
|
||||
* except scan { mask (ip number/hostmask); };
|
||||
* repeat except scan {} for each ip to except.
|
||||
*/
|
||||
|
||||
except socks {
|
||||
except scan {
|
||||
mask 216.73.27.177;
|
||||
};
|
||||
/*
|
||||
@@ -642,7 +642,7 @@ vhost {
|
||||
* Cloak-keys must be > 10000, and random. MUST be the same all over the
|
||||
* network
|
||||
*
|
||||
* cloak-keys { 9999; 9998; 9997; }; for example
|
||||
* cloak-keys { 39999; 99398; 99397; }; for example
|
||||
*/
|
||||
|
||||
/* Network configuration */
|
||||
|
||||
+13
-9
@@ -355,23 +355,27 @@ DLLFUNC int h_scan_connect(aClient *sptr)
|
||||
vFP *vfp;
|
||||
THREAD thread;
|
||||
THREAD_ATTR thread_attr;
|
||||
#ifdef INET6
|
||||
char addrbuf[1024];
|
||||
|
||||
#ifndef INET6
|
||||
strcpy(addrbuf, (char *)inet_ntoa(sptr->ip));
|
||||
#else
|
||||
inet_ntop(AFINET, (void *)&sptr->ip,
|
||||
addrbuf, sizeof(addrbuf));
|
||||
#endif
|
||||
|
||||
if (Find_except(addrbuf, 0))
|
||||
return 0;
|
||||
|
||||
IRCMutexLock(HSlock);
|
||||
HS_Cleanup((void *)1);
|
||||
if (HS_Find((char *)inet_ntoa(sptr->ip)))
|
||||
if (HS_Find(addrbuf))
|
||||
{
|
||||
/* Not gonna scan, already scanning */
|
||||
IRCMutexUnlock(HSlock);
|
||||
return 0;
|
||||
}
|
||||
#ifndef INET6
|
||||
if (h = HS_Add((char *)inet_ntoa(sptr->ip)))
|
||||
#else
|
||||
if (h = HS_Add((char *) inet_ntop(AFINET, (void *)&sptr->ip,
|
||||
addrbuf, sizeof(addrbuf))))
|
||||
#endif
|
||||
if (h = HS_Add(addrbuf))
|
||||
{
|
||||
/* Run scanning threads, refcnt++ for each thread that uses the struct */
|
||||
/* Use hooks, making it easy, remember to convert to vFP */
|
||||
@@ -390,7 +394,7 @@ DLLFUNC int h_scan_connect(aClient *sptr)
|
||||
And run h_scan_connect again?. Is this too loopy?
|
||||
*/
|
||||
sendto_realops("Problem: We ran out of Host slots. Cannot scan %s. increase SCAN_AT_ONCE",
|
||||
sptr->sockhost);
|
||||
addrbuf);
|
||||
IRCMutexUnlock(HSlock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1953,14 +1953,14 @@ int _conf_except(ConfigFile *conf, ConfigEntry *ce)
|
||||
ca->flag.type = 1;
|
||||
add_ConfigItem((ConfigItem *)ca, (ConfigItem **) &conf_except);
|
||||
}
|
||||
else if (!strcmp(ce->ce_vardata, "socks")) {
|
||||
else if (!strcmp(ce->ce_vardata, "scan")) {
|
||||
for (cep = ce->ce_entries; cep; cep = cep->ce_next)
|
||||
{
|
||||
if (!strcmp(cep->ce_varname, "mask")) {
|
||||
ca->mask = strdup(cep->ce_vardata);
|
||||
}
|
||||
else {
|
||||
config_status("%s:%i: unknown directive except::socks::%s",
|
||||
config_status("%s:%i: unknown directive except::scan::%s",
|
||||
ce->ce_fileptr->cf_filename, ce->ce_varlinenum,
|
||||
cep->ce_varname);
|
||||
}
|
||||
@@ -3740,7 +3740,7 @@ ConfigItem_ulines *Find_uline(char *host) {
|
||||
ConfigItem_except *Find_except(char *host, short type) {
|
||||
ConfigItem_except *excepts;
|
||||
|
||||
if (!host || !type)
|
||||
if (!host)
|
||||
return NULL;
|
||||
|
||||
for(excepts = conf_except; excepts; excepts =(ConfigItem_except *) excepts->next) {
|
||||
|
||||
Reference in New Issue
Block a user