repo: ngircd
action: commit
revision: 
path_from: 
revision_from: ea9b72ef79a3d15178f191f28b858d1f73b0fb6f:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit ea9b72ef79a3d15178f191f28b858d1f73b0fb6f
Author: Alexander Barton 
Date:   Mon May 27 11:22:07 2002 +0000

    - neues Modul "irc-op" begonnen.

diff --git a/src/ngircd/irc-op.c b/src/ngircd/irc-op.c
new file mode 100644
index 0000000000000000000000000000000000000000..e5e66d81a7cebf15518e6632ab3cd5374a7daf33
--- /dev/null
+++ b/src/ngircd/irc-op.c
@@ -0,0 +1,85 @@
+/*
+ * ngIRCd -- The Next Generation IRC Daemon
+ * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ *
+ * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
+ * der GNU General Public License (GPL), wie von der Free Software Foundation
+ * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
+ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
+ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
+ * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
+ *
+ * $Id: irc-op.c,v 1.1 2002/05/27 11:22:07 alex Exp $
+ *
+ * irc-op.c: Befehle zur Channel-Verwaltung
+ */
+
+
+#include "portab.h"
+
+#include "imp.h"
+#include 
+#include 
+
+#include "conn.h"
+#include "client.h"
+#include "channel.h"
+#include "defines.h"
+#include "irc-write.h"
+#include "log.h"
+#include "messages.h"
+#include "parse.h"
+
+#include "exp.h"
+#include "irc-op.h"
+
+
+GLOBAL BOOLEAN
+IRC_KICK( CLIENT *Client, REQUEST *Req )
+{
+	assert( Client != NULL );
+	assert( Req != NULL );
+
+	/* Valider Client? */
+	if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
+
+	/* Keine Parameter? */
+	if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+	return CONNECTED;
+} /* IRC_KICK */	
+
+
+GLOBAL BOOLEAN
+IRC_BAN( CLIENT *Client, REQUEST *Req )
+{
+	assert( Client != NULL );
+	assert( Req != NULL );
+
+	/* Valider Client? */
+	if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
+
+	/* Keine Parameter? */
+	if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+	return CONNECTED;
+} /* IRC_BAN */	
+
+
+GLOBAL BOOLEAN
+IRC_INVITE( CLIENT *Client, REQUEST *Req )
+{
+	assert( Client != NULL );
+	assert( Req != NULL );
+
+	/* Valider Client? */
+	if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
+
+	/* Keine Parameter? */
+	if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+	return CONNECTED;
+} /* IRC_INVITE */
+
+
+/* -eof- */
diff --git a/src/ngircd/irc-op.h b/src/ngircd/irc-op.h
new file mode 100644
index 0000000000000000000000000000000000000000..106fb22d169cf01c811068722d531eb9e9659fe4
--- /dev/null
+++ b/src/ngircd/irc-op.h
@@ -0,0 +1,30 @@
+/*
+ * ngIRCd -- The Next Generation IRC Daemon
+ * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ *
+ * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
+ * der GNU General Public License (GPL), wie von der Free Software Foundation
+ * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
+ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
+ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
+ * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
+ *
+ * $Id: irc-op.h,v 1.1 2002/05/27 11:22:07 alex Exp $
+ *
+ * irc-op.h: Befehle zur Channel-Verwaltung (Header)
+ */
+
+
+#ifndef __irc_op_h__
+#define __irc_op_h__
+
+
+GLOBAL BOOLEAN IRC_KICK PARAMS(( CLIENT *Client, REQUEST *Req ));
+GLOBAL BOOLEAN IRC_BAN PARAMS(( CLIENT *Client, REQUEST *Req ));
+GLOBAL BOOLEAN IRC_INVITE PARAMS(( CLIENT *Client, REQUEST *Req ));
+
+
+#endif
+
+
+/* -eof- */

-----END OF PAGE-----