Merge remote-tracking branch 'origin/devel'
Conflicts: CREDITS extra/services/atheme/elemental-ircd.c
This commit is contained in:
commit
203523540b
14
CREDITS
14
CREDITS
|
@ -4,12 +4,22 @@ Elemental-IRCd is a fork of the now-defunct ShadowIRCD project.
|
||||||
|
|
||||||
The Elemental-IRCd team is listed below in nick-alphabetical order:
|
The Elemental-IRCd team is listed below in nick-alphabetical order:
|
||||||
|
|
||||||
Xena, Sam Dodrill <xena -at- yolo-swag.com>
|
Xena, Christine Dodrill <xena -at- yolo-swag.com>
|
||||||
|
|
||||||
Some Elemental-IRCd features are modeled after or direct ports of
|
Some Elemental-IRCd features are modeled after or direct ports of
|
||||||
code from Charybdis.
|
code from Charybdis.
|
||||||
|
|
||||||
ShadowIRCd 6 was a modern restart of the old ShadowIRCd project
|
ponychat-ircd is a fork of the ShadowIRCD project created to meet
|
||||||
|
PonyChat's needs and keep the now-defunct ShadowIRCD project's goals
|
||||||
|
alive.
|
||||||
|
|
||||||
|
The ponychat-ircd team is listed in nick-alphabetical order:
|
||||||
|
|
||||||
|
aji, Alex Iadicico <alex -at- ajitek.net>
|
||||||
|
Kabaka, Kyle Johnson <kabaka -at- ponychat.net>
|
||||||
|
Xena, Christine Dodrill <xena -at- yolo-swag.com>
|
||||||
|
|
||||||
|
ShadowIRCd 6 is a modern restart of the old ShadowIRCd project
|
||||||
based on Charybdis with a few additional features to make it appeal
|
based on Charybdis with a few additional features to make it appeal
|
||||||
more to more users. We try to work as closely as possible with the
|
more to more users. We try to work as closely as possible with the
|
||||||
Charybdis team.
|
Charybdis team.
|
||||||
|
|
|
@ -50,6 +50,7 @@ SRCS = \
|
||||||
extb_ssl.c \
|
extb_ssl.c \
|
||||||
extb_realname.c \
|
extb_realname.c \
|
||||||
extb_extgecos.c \
|
extb_extgecos.c \
|
||||||
|
extb_usermode.c \
|
||||||
force_user_invis.c \
|
force_user_invis.c \
|
||||||
hurt.c \
|
hurt.c \
|
||||||
ip_cloaking.c \
|
ip_cloaking.c \
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
/*
|
||||||
|
* Usermode extban type: bans all users with a specific usermode
|
||||||
|
* -- nenolod
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "stdinc.h"
|
||||||
|
#include "modules.h"
|
||||||
|
#include "hook.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "ircd.h"
|
||||||
|
#include "send.h"
|
||||||
|
#include "hash.h"
|
||||||
|
#include "s_conf.h"
|
||||||
|
#include "s_user.h"
|
||||||
|
#include "s_serv.h"
|
||||||
|
#include "numeric.h"
|
||||||
|
|
||||||
|
static int _modinit(void);
|
||||||
|
static void _moddeinit(void);
|
||||||
|
static int eb_usermode(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||||
|
|
||||||
|
DECLARE_MODULE_AV1(extb_usermode, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1299 $");
|
||||||
|
|
||||||
|
static int
|
||||||
|
_modinit(void)
|
||||||
|
{
|
||||||
|
extban_table['m'] = eb_usermode;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_moddeinit(void)
|
||||||
|
{
|
||||||
|
extban_table['m'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int eb_usermode(const char *data, struct Client *client_p,
|
||||||
|
struct Channel *chptr, long mode_type)
|
||||||
|
{
|
||||||
|
int dir = MODE_ADD;
|
||||||
|
unsigned int modes_ack = 0, modes_nak = 0;
|
||||||
|
const char *p;
|
||||||
|
|
||||||
|
(void)chptr;
|
||||||
|
|
||||||
|
/* $m must have a specified mode */
|
||||||
|
if (data == NULL)
|
||||||
|
return EXTBAN_INVALID;
|
||||||
|
|
||||||
|
for (p = data; *p != '\0'; p++)
|
||||||
|
{
|
||||||
|
switch (*p)
|
||||||
|
{
|
||||||
|
case '+':
|
||||||
|
dir = MODE_ADD;
|
||||||
|
break;
|
||||||
|
case '-':
|
||||||
|
dir = MODE_DEL;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
switch (dir)
|
||||||
|
{
|
||||||
|
case MODE_DEL:
|
||||||
|
modes_nak |= user_modes[(unsigned char) *p];
|
||||||
|
break;
|
||||||
|
case MODE_ADD:
|
||||||
|
default:
|
||||||
|
modes_ack |= user_modes[(unsigned char) *p];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ((client_p->umodes & modes_ack) == modes_ack &&
|
||||||
|
!(client_p->umodes & modes_nak)) ?
|
||||||
|
EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||||
|
}
|
|
@ -130,6 +130,9 @@ mr_webirc(struct Client *client_p, struct Client *source_p, int parc, const char
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set UMODE_WEBCLIENT */
|
||||||
|
source_p->umodes = source_p->umodes | UMODE_WEBCLIENT;
|
||||||
|
|
||||||
sendto_one(source_p, "NOTICE * :CGI:IRC host/IP set to %s %s", parv[3], parv[4]);
|
sendto_one(source_p, "NOTICE * :CGI:IRC host/IP set to %s %s", parv[3], parv[4]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#define CMODE_NONICKS 0x20000000 /* shadowircd +N */
|
#define CMODE_NONICKS 0x20000000 /* shadowircd +N */
|
||||||
#define CMODE_NOREPEAT 0x40000000 /* shadowircd +K */
|
#define CMODE_NOREPEAT 0x40000000 /* shadowircd +K */
|
||||||
#define CMODE_KICKNOREJOIN 0x80000000 /* shadowircd +J */
|
#define CMODE_KICKNOREJOIN 0x80000000 /* shadowircd +J */
|
||||||
#define CMODE_HIDEBANS 0x100000000 /* elemental +u */
|
|
||||||
|
|
||||||
DECLARE_MODULE_V1("protocol/elemental-ircd", true, _modinit, NULL, PACKAGE_STRING, "Elemental-IRCd Development Team http://github.com/elemental-ircd/elemental-ircd");
|
DECLARE_MODULE_V1("protocol/elemental-ircd", true, _modinit, NULL, PACKAGE_STRING, "Elemental-IRCd Development Team http://github.com/elemental-ircd/elemental-ircd");
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,4 @@ User modes: (* designates that the umode is oper only)
|
||||||
+I - Prevents non-opers from seeing your channel list in
|
+I - Prevents non-opers from seeing your channel list in
|
||||||
a whois query.
|
a whois query.
|
||||||
+Z - Is connected via SSL (set only on connection).
|
+Z - Is connected via SSL (set only on connection).
|
||||||
|
+W - Is connected via a web client (set only on connection).
|
||||||
|
|
|
@ -22,3 +22,4 @@ User modes: (? designates that the umode is provided by an extension
|
||||||
anyone who's in a common channel with you to message you.
|
anyone who's in a common channel with you to message you.
|
||||||
+V - Prevents you from receiving invites.
|
+V - Prevents you from receiving invites.
|
||||||
+Z - Is connected via SSL (set only on connection).
|
+Z - Is connected via SSL (set only on connection).
|
||||||
|
+W - Is connected via a web client (set only on connection).
|
||||||
|
|
|
@ -425,6 +425,7 @@ struct ListClient {
|
||||||
#define UMODE_OPER 0x1000 /* Operator */
|
#define UMODE_OPER 0x1000 /* Operator */
|
||||||
#define UMODE_ADMIN 0x2000 /* Admin on server */
|
#define UMODE_ADMIN 0x2000 /* Admin on server */
|
||||||
#define UMODE_SSLCLIENT 0x4000 /* using SSL */
|
#define UMODE_SSLCLIENT 0x4000 /* using SSL */
|
||||||
|
#define UMODE_WEBCLIENT 0x100000 /* user is connected via a web client */
|
||||||
#define UMODE_OVERRIDE 0x20000 /* able to override */
|
#define UMODE_OVERRIDE 0x20000 /* able to override */
|
||||||
|
|
||||||
#define IsOverride(x) ((x)->umodes & UMODE_OVERRIDE)
|
#define IsOverride(x) ((x)->umodes & UMODE_OVERRIDE)
|
||||||
|
|
|
@ -330,6 +330,7 @@ extern const char *form_str(int);
|
||||||
#define ERR_HELPNOTFOUND 524
|
#define ERR_HELPNOTFOUND 524
|
||||||
|
|
||||||
#define RPL_WHOISSECURE 671 /* Unreal3.2 --nenolod */
|
#define RPL_WHOISSECURE 671 /* Unreal3.2 --nenolod */
|
||||||
|
#define RPL_WHOISWEBIRC 672 /* plexus -- Xe */
|
||||||
|
|
||||||
#define RPL_MODLIST 702
|
#define RPL_MODLIST 702
|
||||||
#define RPL_ENDOFMODLIST 703
|
#define RPL_ENDOFMODLIST 703
|
||||||
|
|
|
@ -313,6 +313,12 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
||||||
if(IsSSLClient(target_p))
|
if(IsSSLClient(target_p))
|
||||||
sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE),
|
sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE),
|
||||||
target_p->name);
|
target_p->name);
|
||||||
|
|
||||||
|
if(!(target_p->umodes & UMODE_WEBCLIENT)) {
|
||||||
|
sendto_one_numeric(source_p, RPL_WHOISWEBIRC, form_str(RPL_WHOISWEBIRC),
|
||||||
|
target_p->name);
|
||||||
|
}
|
||||||
|
|
||||||
if((source_p == target_p || IsOper(source_p)) &&
|
if((source_p == target_p || IsOper(source_p)) &&
|
||||||
target_p->certfp != NULL)
|
target_p->certfp != NULL)
|
||||||
sendto_one_numeric(source_p, RPL_WHOISCERTFP,
|
sendto_one_numeric(source_p, RPL_WHOISCERTFP,
|
||||||
|
|
|
@ -693,7 +693,7 @@ static const char * replies[] = {
|
||||||
/* 669 */ NULL,
|
/* 669 */ NULL,
|
||||||
/* 670 */ NULL,
|
/* 670 */ NULL,
|
||||||
/* 671 RPL_WHOISSECURE, */ "%s :is using a secure connection",
|
/* 671 RPL_WHOISSECURE, */ "%s :is using a secure connection",
|
||||||
/* 672 */ NULL,
|
/* 672 RPL_WHOISWEBIRC, */ "%s :is using a web IRC client",
|
||||||
/* 673 */ NULL,
|
/* 673 */ NULL,
|
||||||
/* 674 */ NULL,
|
/* 674 */ NULL,
|
||||||
/* 675 */ NULL,
|
/* 675 */ NULL,
|
||||||
|
|
|
@ -88,7 +88,7 @@ int user_modes[256] = {
|
||||||
0, /* T */
|
0, /* T */
|
||||||
0, /* U */
|
0, /* U */
|
||||||
UMODE_NOINVITE, /* V */
|
UMODE_NOINVITE, /* V */
|
||||||
0, /* W */
|
UMODE_WEBCLIENT, /* W */
|
||||||
0, /* X */
|
0, /* X */
|
||||||
0, /* Y */
|
0, /* Y */
|
||||||
UMODE_SSLCLIENT, /* Z */
|
UMODE_SSLCLIENT, /* Z */
|
||||||
|
@ -1018,6 +1018,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
|
||||||
/* can only be set on burst */
|
/* can only be set on burst */
|
||||||
case 'S':
|
case 'S':
|
||||||
case 'Z':
|
case 'Z':
|
||||||
|
case 'W':
|
||||||
case ' ':
|
case ' ':
|
||||||
case '\n':
|
case '\n':
|
||||||
case '\r':
|
case '\r':
|
||||||
|
|
Loading…
Reference in New Issue