chm_* declarations gone to chmode.h - this makes some modules clean

This commit is contained in:
Valery Yatsko 2008-04-08 23:39:35 +04:00
parent dbbe26fa00
commit c84557ac70
6 changed files with 72 additions and 32 deletions

5
TODO
View file

@ -18,7 +18,7 @@
[x] client-to-client ssl
[x] server-to-server ssl
[x] ssl usermode (+Z)
[ ] ssl channelmode (by module?)
[x] ssl channelmode (done by extban and chm_compat)
[ ] merge some stuff from ircd-seven directly (to be determined what)
[?] remote d:lines support?
[?] +C (noctcp) channel/usermode
@ -27,5 +27,6 @@
[ ] module engine rework
[ ] more beautiful way of adding new channel modes by module
[ ] other stuff
[ ] merge m_join.c and m_sjoin.c in one module (same functions, done in ratbox3)
[x] merge m_join.c and m_sjoin.c in one module (same functions, done in ratbox3)
[ ] merge s_gline.c and m_gline.c in one module (for pretty look, done in ratbox3)
[x] create chmode.h and put there all declarations of chm_* - this will make some modules clean

View file

@ -7,18 +7,7 @@
#include "client.h"
#include "hook.h"
#include "ircd.h"
/* XXX prototypes */
void chm_ban(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
void chm_nosuch(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
void chm_simple(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
/* end yucky prototypes */
#include "chmode.h"
static int _modinit(void);
static void _moddeinit(void);

View file

@ -8,15 +8,7 @@
#include "client.h"
#include "hook.h"
#include "ircd.h"
/* XXX prototypes */
void chm_ban(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
void chm_nosuch(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
/* end yucky prototypes */
#include "chmode.h"
static int _modinit(void);
static void _moddeinit(void);

View file

@ -7,15 +7,7 @@
#include "client.h"
#include "hook.h"
#include "ircd.h"
/* XXX prototypes */
void chm_ban(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
void chm_nosuch(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
/* end yucky prototypes */
#include "chmode.h"
static int _modinit(void);
static void _moddeinit(void);

65
include/chmode.h Normal file
View file

@ -0,0 +1,65 @@
/*
* charybdis: An advanced ircd.
* chmode.h: The ircd channel header.
*
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2004 ircd-ratbox development team
* Copyright (C) 2008 charybdis development team
*
* 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 2 of the License, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id$
*/
#ifndef INCLUDED_chmode_h
#define INCLUDED_chmode_h
extern void chm_nosuch(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_simple(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_ban(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_staff(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_forward(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_throttle(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_key(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_limit(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_regonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_op(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
extern void chm_voice(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
#endif

View file

@ -42,6 +42,7 @@
#include "s_conf.h" /* ConfigFileEntry, ConfigChannel */
#include "s_newconf.h"
#include "logger.h"
#include "chmode.h"
/* bitmasks for error returns, so we send once per call */
#define SM_ERR_NOTS 0x00000001 /* No TS on channel */