diff --git a/CREDITS b/CREDITS index d228b2a..481ec40 100644 --- a/CREDITS +++ b/CREDITS @@ -3,43 +3,53 @@ $Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $ Elemental-IRCd is a fork of the now-defunct ShadowIRCD project. The Elemental-IRCd team is listed below in nick-alphabetical order: - -Xena, Sam Dodrill - + +Xena, Christine Dodrill + Some Elemental-IRCd features are modeled after or direct ports of code from Charybdis. - -ShadowIRCd 6 was a modern restart of the old ShadowIRCd project -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 + +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 +Kabaka, Kyle Johnson +Xena, Christine Dodrill + +ShadowIRCd 6 is a modern restart of the old ShadowIRCd project +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 Charybdis team. - + The ShadowIRCd team is listed in nick-alphabetical order: - + jdhore, JD Horelick Taros, Brett Greenham - + Some ShadowIRCd 6 features such as the oper-override and remote RESTART, DIE and MOD* commands were borrowed from ircd-seven. - + ircd-seven is written by: - + spb, Stephen Bennett - + Charybdis started as an evolution from ircd-ratbox. Its development is led by a team of dedicated developers who have put a lot of time into the project, and it has seen use on a variety of different network configurations. - + The charybdis core team is listed in nick-alphabetical order: - + jilles, Jilles Tjoelker nenolod, William Pitcock spb, Stephen Bennett - + The following people have made contributions to the Charybdis releases, in nick-alphabetical order: - + AndroSyn, Aaron Sethman anfl, Lee Hardy beu, Elfyn McBratney @@ -52,6 +62,6 @@ Taros, Brett Greenham ThaPrince, Jon Christopherson twincest, River Tarnell w00t, Robin Burchell - + Visit the elemental-ircd repo at: http://www.github.com/Elemental-IRCd/elemental-ircd Visit us on IRC at: irc.yolo-swag.com #elemental-ircd diff --git a/extensions/Makefile.in b/extensions/Makefile.in index 2a3ba89..6c42435 100644 --- a/extensions/Makefile.in +++ b/extensions/Makefile.in @@ -50,6 +50,7 @@ SRCS = \ extb_ssl.c \ extb_realname.c \ extb_extgecos.c \ + extb_usermode.c \ force_user_invis.c \ hurt.c \ ip_cloaking.c \ diff --git a/extensions/extb_usermode.c b/extensions/extb_usermode.c new file mode 100644 index 0000000..eb087b3 --- /dev/null +++ b/extensions/extb_usermode.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; +} diff --git a/extensions/m_webirc.c b/extensions/m_webirc.c index 43d3c27..2fce29d 100644 --- a/extensions/m_webirc.c +++ b/extensions/m_webirc.c @@ -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]); return 0; } diff --git a/extra/services/atheme/elemental-ircd.c b/extra/services/atheme/elemental-ircd.c index d889c76..57412b8 100644 --- a/extra/services/atheme/elemental-ircd.c +++ b/extra/services/atheme/elemental-ircd.c @@ -35,7 +35,6 @@ #define CMODE_NONICKS 0x20000000 /* shadowircd +N */ #define CMODE_NOREPEAT 0x40000000 /* shadowircd +K */ #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"); diff --git a/help/opers/umode b/help/opers/umode index cdae8a9..7c8e911 100644 --- a/help/opers/umode +++ b/help/opers/umode @@ -28,3 +28,4 @@ User modes: (* designates that the umode is oper only) +I - Prevents non-opers from seeing your channel list in a whois query. +Z - Is connected via SSL (set only on connection). + +W - Is connected via a web client (set only on connection). diff --git a/help/users/umode b/help/users/umode index 519e5b1..3ed4415 100644 --- a/help/users/umode +++ b/help/users/umode @@ -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. +V - Prevents you from receiving invites. +Z - Is connected via SSL (set only on connection). + +W - Is connected via a web client (set only on connection). diff --git a/include/client.h b/include/client.h index 70fd0d1..1da2f14 100644 --- a/include/client.h +++ b/include/client.h @@ -425,6 +425,7 @@ struct ListClient { #define UMODE_OPER 0x1000 /* Operator */ #define UMODE_ADMIN 0x2000 /* Admin on server */ #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 IsOverride(x) ((x)->umodes & UMODE_OVERRIDE) diff --git a/include/numeric.h b/include/numeric.h index 123ea1f..e870916 100644 --- a/include/numeric.h +++ b/include/numeric.h @@ -330,6 +330,7 @@ extern const char *form_str(int); #define ERR_HELPNOTFOUND 524 #define RPL_WHOISSECURE 671 /* Unreal3.2 --nenolod */ +#define RPL_WHOISWEBIRC 672 /* plexus -- Xe */ #define RPL_MODLIST 702 #define RPL_ENDOFMODLIST 703 diff --git a/modules/m_whois.c b/modules/m_whois.c index eef1d4b..42dd4b8 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -313,6 +313,12 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) if(IsSSLClient(target_p)) sendto_one_numeric(source_p, RPL_WHOISSECURE, form_str(RPL_WHOISSECURE), 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)) && target_p->certfp != NULL) sendto_one_numeric(source_p, RPL_WHOISCERTFP, diff --git a/src/messages.tab b/src/messages.tab index 60ed2b4..1c3a6e8 100644 --- a/src/messages.tab +++ b/src/messages.tab @@ -693,7 +693,7 @@ static const char * replies[] = { /* 669 */ NULL, /* 670 */ NULL, /* 671 RPL_WHOISSECURE, */ "%s :is using a secure connection", -/* 672 */ NULL, +/* 672 RPL_WHOISWEBIRC, */ "%s :is using a web IRC client", /* 673 */ NULL, /* 674 */ NULL, /* 675 */ NULL, diff --git a/src/s_user.c b/src/s_user.c index 316ba2e..0862c5b 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -88,7 +88,7 @@ int user_modes[256] = { 0, /* T */ 0, /* U */ UMODE_NOINVITE, /* V */ - 0, /* W */ + UMODE_WEBCLIENT, /* W */ 0, /* X */ 0, /* Y */ UMODE_SSLCLIENT, /* Z */ @@ -1011,13 +1011,14 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char } break; - /* we may not get these, - * but they shouldnt be in default - */ + /* we may not get these, + * but they shouldnt be in default + */ - /* can only be set on burst */ + /* can only be set on burst */ case 'S': case 'Z': + case 'W': case ' ': case '\n': case '\r': @@ -1046,7 +1047,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char source_p->umodes &= ~UMODE_SERVNOTICE; break; } - /* FALLTHROUGH */ + /* FALLTHROUGH */ default: if (MyConnect(source_p) && *pm == 'Q' && !ConfigChannel.use_forward) { badflag = YES;