mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 20:23:13 +02:00
- Changed umode +I behavoiur to you have to be loading invisibility.so to ha
the +I functionality. Code is still in IRCd, but isn't used until module is loaded. Loading of this will cause an R to be added to /version flags. Hopefully this will satisify some people's thoughts about a so called spy tool being enabled by default. Also added flag_add(char *) and flag_del(char) for modules to add to flags string. -Sts - Removed -win32 postfix for wircds, look in /version for W instead - Removed ircnetwork part of /version
This commit is contained in:
@@ -1141,3 +1141,11 @@ v- Fixed some bugreport stuff
|
||||
- Added except tkl to allow exceptions from tklines, tzlines, shuns, glines, and gzlines, suggested by
|
||||
funraiser [still need to design a way to report in /stats] (#0000044)
|
||||
- Documented link::cipher and except tkl in doc/conf.doc
|
||||
- Changed umode +I behavoiur to you have to be loading invisibility.so to have
|
||||
the +I functionality. Code is still in IRCd, but isn't used until module
|
||||
is loaded. Loading of this will cause an "R" to be added to /version
|
||||
flags. Hopefully this will satisify some people's thoughts about a so
|
||||
called spy tool being enabled by default. Also added flag_add(char *)
|
||||
and flag_del(char) for modules to add to flags string. -Sts
|
||||
- Removed -win32 postfix for wircds, look in /version for "W" instead
|
||||
- Removed ircnetwork part of /version
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef NO_FDLIST
|
||||
#include "fdlist.h"
|
||||
#endif
|
||||
extern char *extraflags;
|
||||
|
||||
/* for the new s_err.c */
|
||||
extern char *getreply(int);
|
||||
|
||||
@@ -36,11 +36,7 @@
|
||||
#define PATCH6 ""
|
||||
#define PATCH7 ""
|
||||
#define PATCH8 COMPILEINFO
|
||||
#ifdef _WIN32
|
||||
#define PATCH9 "+win32"
|
||||
#else
|
||||
#define PATCH9 ""
|
||||
#endif
|
||||
/* release header */
|
||||
#define Rh BASE_VERSION
|
||||
#define VERSIONONLY PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7
|
||||
|
||||
+7
-1
@@ -959,7 +959,13 @@ int InitwIRCD(argc, argv)
|
||||
struct IN_ADDR bah;
|
||||
int bit;
|
||||
parse_netmask("255.255.255.255/8", &bah, &bit);
|
||||
printf("%s - %d",Inet_ia2p(&bah), bit);
|
||||
printf("%s - %d\n",Inet_ia2p(&bah), bit);
|
||||
flag_add("m");
|
||||
flag_del('m');
|
||||
flag_add("n");
|
||||
flag_add("m");
|
||||
flag_del('m');
|
||||
printf("%s\n", extraflags);
|
||||
exit(0);
|
||||
}
|
||||
case 'C':
|
||||
|
||||
@@ -32,7 +32,7 @@ R_MODULES=m_sethost.so m_chghost.so m_chgident.so m_setname.so \
|
||||
m_kline.so m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \
|
||||
m_quit.so m_rakill.so m_rping.so m_sendumode.so m_sqline.so \
|
||||
m_tsctl.so m_unkline.so m_unsqline.so m_unzline.so m_whois.so \
|
||||
m_zline.so m_tkl.so\
|
||||
m_zline.so m_tkl.so invisibility.so \
|
||||
scan.so scan_socks.so scan_http.so web/httpd.so
|
||||
|
||||
COMMANDS=m_sethost.c m_chghost.c m_chgident.c m_setname.c m_setident.c \
|
||||
@@ -60,6 +60,11 @@ m_adminchat.so: m_adminchat.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
||||
-o m_adminchat.so m_adminchat.c
|
||||
|
||||
invisibility.so: invisibility.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
||||
-o invisibility.so invisibility.c
|
||||
|
||||
|
||||
m_akill.so: m_akill.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
|
||||
-o m_akill.so m_akill.c
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* IRC - Internet Relay Chat, Invisiblitity (+I)
|
||||
* (C) 2002 The UnrealIRCd Team
|
||||
*
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "h.h"
|
||||
#ifdef STRIPBADWORDS
|
||||
#include "badwords.h"
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include "version.h"
|
||||
#endif
|
||||
extern long UMODE_HIDING;
|
||||
#ifndef DYNAMIC_LINKING
|
||||
ModuleHeader invisibility_Header
|
||||
#else
|
||||
#define invisibility_Header Mod_Header
|
||||
ModuleHeader Mod_Header
|
||||
#endif
|
||||
= {
|
||||
"invisibility",
|
||||
"$Id$",
|
||||
"+I mode",
|
||||
"3.2-b5",
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Init(int module_load)
|
||||
#else
|
||||
int invisibility_Init(int module_load)
|
||||
#endif
|
||||
{
|
||||
UMODE_HIDING = get_umode('I');
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Load(int module_load)
|
||||
#else
|
||||
int invisibility_Load(int module_load)
|
||||
#endif
|
||||
{
|
||||
UMODE_HIDING = get_umode('I');
|
||||
flag_add("R");
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
DLLFUNC int Mod_Unload(int module_unload)
|
||||
#else
|
||||
int invisibility_Unload(int module_unload)
|
||||
#endif
|
||||
{
|
||||
umode_delete('I', UMODE_HIDING);
|
||||
flag_del('R');
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
+37
-6
@@ -69,9 +69,6 @@ char serveropts[] = {
|
||||
#ifdef VALLOC
|
||||
'V',
|
||||
#endif
|
||||
#ifdef REMOVE_ADVERTISING
|
||||
'R',
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
'W',
|
||||
#endif
|
||||
@@ -96,12 +93,11 @@ char serveropts[] = {
|
||||
#ifdef USE_SSL
|
||||
'e',
|
||||
#endif
|
||||
/* we are a stable ircd */
|
||||
'S',
|
||||
's',
|
||||
'\0'
|
||||
};
|
||||
|
||||
char *extraflags = NULL;
|
||||
|
||||
#include "numeric.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
@@ -146,6 +142,41 @@ char serveropts[] = {
|
||||
#define ssize_t unsigned int
|
||||
#endif
|
||||
|
||||
void flag_add(char *ch)
|
||||
{
|
||||
char *newextra;
|
||||
if (extraflags)
|
||||
{
|
||||
newextra = (char *)MyMalloc(strlen(extraflags) + 1 + strlen(ch));
|
||||
strcpy(newextra, extraflags);
|
||||
strcat(newextra, ch);
|
||||
MyFree(extraflags);
|
||||
extraflags = newextra;
|
||||
}
|
||||
else
|
||||
extraflags = strdup(ch);
|
||||
}
|
||||
|
||||
void flag_del(char ch)
|
||||
{
|
||||
int newsz;
|
||||
char *p, *op;
|
||||
char *newflags;
|
||||
newsz = 0;
|
||||
p = extraflags;
|
||||
for (newsz = 0, p = extraflags; *p; p++)
|
||||
if (*p != ch)
|
||||
newsz++;
|
||||
newflags = MyMalloc(newsz + 1);
|
||||
for (p = newflags, op = extraflags; (*op) && (newsz); newsz--, op++)
|
||||
if (*op != ch)
|
||||
*p++ = *op;
|
||||
*p = '\0';
|
||||
MyFree(extraflags);
|
||||
extraflags = newflags;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUGMODE
|
||||
#ifndef _WIN32
|
||||
|
||||
+1
-1
@@ -388,7 +388,7 @@ static char *replies[] = {
|
||||
/* 348 RPL_EXLIST */ ":%s 348 %s %s %s %s %lu",
|
||||
/* 349 RPL_ENDOFEXLIST */ ":%s 349 %s %s :End of Channel Exception List",
|
||||
/* 350 */ NULL,
|
||||
/* 351 RPL_VERSION */ ":%s 351 %s %s(%s).%s %s :%s [%s=%li]",
|
||||
/* 351 RPL_VERSION */ ":%s 351 %s %s.%s %s :%s%s [%s=%li]",
|
||||
/* 352 RPL_WHOREPLY */ ":%s 352 %s %s %s %s %s %s %s :%d %s",
|
||||
/* 353 RPL_NAMREPLY */ ":%s 353 %s %s",
|
||||
/* 354 */ NULL, /* Reserved for Undernet */
|
||||
|
||||
+2
-2
@@ -137,8 +137,8 @@ int m_version(cptr, sptr, parc, parv)
|
||||
parv) == HUNTED_ISME)
|
||||
{
|
||||
sendto_one(sptr, rpl_str(RPL_VERSION), me.name,
|
||||
parv[0], version, ircnetwork, debugmode, me.name,
|
||||
serveropts,
|
||||
parv[0], version, debugmode, me.name,
|
||||
serveropts, extraflags,
|
||||
(IsAnOper(sptr) ? MYOSNAME : "*"), UnrealProtocol);
|
||||
if (MyClient(sptr))
|
||||
sendto_one(sptr, rpl_str(RPL_PROTOCTL), me.name,
|
||||
|
||||
@@ -108,7 +108,6 @@ void umode_init(void)
|
||||
UMODE_KIX = umode_get('q'); /* 0x200000 usermode +q */
|
||||
UMODE_BOT = umode_get('B'); /* 0x400000 User is a bot */
|
||||
UMODE_SECURE = umode_get('z'); /* 0x800000 User is a secure connect */
|
||||
UMODE_HIDING = umode_get('I'); /* 0x2000000 Totally invisible .. */
|
||||
UMODE_VICTIM = umode_get('v'); /* 0x8000000 Intentional Victim */
|
||||
UMODE_DEAF = umode_get('d'); /* 0x10000000 Deaf */
|
||||
UMODE_HIDEOPER = umode_get('H'); /* 0x20000000 Hide oper mode */
|
||||
|
||||
Reference in New Issue
Block a user