]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- neues Modul "irc-op" begonnen.
authorAlexander Barton <alex@barton.de>
Mon, 27 May 2002 11:22:07 +0000 (11:22 +0000)
committerAlexander Barton <alex@barton.de>
Mon, 27 May 2002 11:22:07 +0000 (11:22 +0000)
src/ngircd/irc-op.c [new file with mode: 0644]
src/ngircd/irc-op.h [new file with mode: 0644]

diff --git a/src/ngircd/irc-op.c b/src/ngircd/irc-op.c
new file mode 100644 (file)
index 0000000..e5e66d8
--- /dev/null
@@ -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 <assert.h>
+#include <string.h>
+
+#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 (file)
index 0000000..106fb22
--- /dev/null
@@ -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- */