[svn] - createoperonly: like createauthonly, but checks opered status instead of authed status
This commit is contained in:
parent
59e2698a9f
commit
45ed977779
4 changed files with 55 additions and 2 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
nenolod 2007/05/24 04:16:02 UTC (20070524-3474)
|
||||
Log:
|
||||
- sno_channeljoin: implements snomask +j and sends channel join notices there from local users
|
||||
|
||||
|
||||
Changes: Modified:
|
||||
+1 -0 trunk/doc/example.conf (File Modified)
|
||||
+3 -1 trunk/doc/reference.conf (File Modified)
|
||||
+46 -0 trunk/extensions/Makefile.in (File Modified)
|
||||
+ - trunk/extensions/sno_channeljoin.c (File Added)
|
||||
|
||||
|
||||
nenolod 2007/05/24 04:02:33 UTC (20070524-3472)
|
||||
Log:
|
||||
- update config files
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Makefile.in for ircd/contrib
|
||||
#
|
||||
# $Id: Makefile.in 3474 2007-05-24 04:16:02Z nenolod $
|
||||
# $Id: Makefile.in 3476 2007-05-24 04:28:36Z nenolod $
|
||||
#
|
||||
CC = @CC@
|
||||
RM = @RM@
|
||||
|
@ -28,6 +28,7 @@ CPPFLAGS = ${INCLUDES} @CPPFLAGS@
|
|||
|
||||
SRCS = \
|
||||
createauthonly.c \
|
||||
createoperonly.c \
|
||||
extb_account.c \
|
||||
extb_canjoin.c \
|
||||
extb_channel.c \
|
||||
|
|
40
extensions/createoperonly.c
Normal file
40
extensions/createoperonly.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* This module restricts channel creation to opered up users
|
||||
* only. This module could be useful for running private chat
|
||||
* systems, or if a network gets droneflood problems. It will
|
||||
* return ERR_NEEDREGGEDNICK on failure.
|
||||
* -- nenolod
|
||||
*
|
||||
* $Id: createoperonly.c 3476 2007-05-24 04:28:36Z nenolod $
|
||||
*/
|
||||
|
||||
#include "stdinc.h"
|
||||
#include "modules.h"
|
||||
#include "client.h"
|
||||
#include "hook.h"
|
||||
#include "ircd.h"
|
||||
#include "send.h"
|
||||
#include "s_conf.h"
|
||||
#include "snomask.h"
|
||||
#include "numeric.h"
|
||||
|
||||
static void h_can_create_channel_authenticated(hook_data_client_approval *);
|
||||
|
||||
mapi_hfn_list_av1 restrict_hfnlist[] = {
|
||||
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
DECLARE_MODULE_AV1(createoperonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 3476 $");
|
||||
|
||||
static void
|
||||
h_can_create_channel_authenticated(hook_data_client_approval *data)
|
||||
{
|
||||
struct Client *source_p = data->client;
|
||||
|
||||
if (!IsOper(source_p))
|
||||
{
|
||||
sendto_one_notice(source_p, ":*** Channel creation is restricted to network staff only.");
|
||||
data->approved = ERR_NEEDREGGEDNICK;
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070524-3472"
|
||||
#define SERNO "20070524-3474"
|
||||
|
|
Loading…
Reference in a new issue