Anonymous avatar Anonymous committed e2b8de0

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

Comments (0)

Files changed (6)

   [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
 [ ] 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

extensions/chm_operonly_compat.c

 #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);

extensions/chm_quietunreg_compat.c

 #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);

extensions/chm_sslonly_compat.c

 #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);
+/*
+ *  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
 #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 */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.