]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/irc-op.c
- neues Modul "irc-op" begonnen.
[ngircd-alex.git] / src / ngircd / irc-op.c
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4  *
5  * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6  * der GNU General Public License (GPL), wie von der Free Software Foundation
7  * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8  * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
11  *
12  * $Id: irc-op.c,v 1.1 2002/05/27 11:22:07 alex Exp $
13  *
14  * irc-op.c: Befehle zur Channel-Verwaltung
15  */
16
17
18 #include "portab.h"
19
20 #include "imp.h"
21 #include <assert.h>
22 #include <string.h>
23
24 #include "conn.h"
25 #include "client.h"
26 #include "channel.h"
27 #include "defines.h"
28 #include "irc-write.h"
29 #include "log.h"
30 #include "messages.h"
31 #include "parse.h"
32
33 #include "exp.h"
34 #include "irc-op.h"
35
36
37 GLOBAL BOOLEAN
38 IRC_KICK( CLIENT *Client, REQUEST *Req )
39 {
40         assert( Client != NULL );
41         assert( Req != NULL );
42
43         /* Valider Client? */
44         if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
45
46         /* Keine Parameter? */
47         if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
48
49         return CONNECTED;
50 } /* IRC_KICK */        
51
52
53 GLOBAL BOOLEAN
54 IRC_BAN( CLIENT *Client, REQUEST *Req )
55 {
56         assert( Client != NULL );
57         assert( Req != NULL );
58
59         /* Valider Client? */
60         if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
61
62         /* Keine Parameter? */
63         if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
64
65         return CONNECTED;
66 } /* IRC_BAN */ 
67
68
69 GLOBAL BOOLEAN
70 IRC_INVITE( CLIENT *Client, REQUEST *Req )
71 {
72         assert( Client != NULL );
73         assert( Req != NULL );
74
75         /* Valider Client? */
76         if(( Client_Type( Client ) != CLIENT_USER ) && ( Client_Type( Client ) != CLIENT_SERVER )) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
77
78         /* Keine Parameter? */
79         if( Req->argc < 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
80
81         return CONNECTED;
82 } /* IRC_INVITE */
83
84
85 /* -eof- */