mirror of
https://github.com/pissnet/angiosperm.git
synced 2025-05-16 04:15:04 +01:00
[svn] - the new plan:
+ branches/release-2.1 -> 2.2 base + 3.0 -> branches/cxxconversion + backport some immediate 3.0 functionality for 2.2 + other stuff
This commit is contained in:
commit
212380e3f4
430 changed files with 122424 additions and 0 deletions
extensions
59
extensions/extb_extgecos.c
Normal file
59
extensions/extb_extgecos.c
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Extended extban type: bans all users with matching nick!user@host#gecos.
|
||||
* Requested by Lockwood.
|
||||
* - nenolod
|
||||
*
|
||||
* $Id: extb_realname.c 1339 2006-05-17 00:45:40Z nenolod $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
#include "modules.h"
|
||||
#include "client.h"
|
||||
#include "ircd.h"
|
||||
|
||||
static int _modinit(void);
|
||||
static void _moddeinit(void);
|
||||
static int eb_extended(const char *data, struct Client *client_p, struct Channel *chptr, long mode_type);
|
||||
|
||||
DECLARE_MODULE_AV1(extb_extended, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision: 1339 $");
|
||||
|
||||
static int
|
||||
_modinit(void)
|
||||
{
|
||||
extban_table['x'] = eb_extended;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_moddeinit(void)
|
||||
{
|
||||
extban_table['x'] = NULL;
|
||||
}
|
||||
|
||||
static int eb_extended(const char *data, struct Client *client_p,
|
||||
struct Channel *chptr, long mode_type)
|
||||
{
|
||||
char buf[BUFSIZE];
|
||||
int ret;
|
||||
|
||||
(void)chptr;
|
||||
|
||||
if (data == NULL)
|
||||
return EXTBAN_INVALID;
|
||||
|
||||
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
|
||||
client_p->name, client_p->username, client_p->host, client_p->info);
|
||||
|
||||
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||
|
||||
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p))
|
||||
{
|
||||
ircsnprintf(buf, BUFSIZE, "%s!%s@%s#%s",
|
||||
client_p->name, client_p->username, client_p->orighost, client_p->info);
|
||||
|
||||
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue