]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-oper.c
- new allocated connection structures will be initialized correctly now.
[ngircd-alex.git] / src / ngircd / irc-oper.c
index 2a753f3a25fe52be52a5ccfe2758a68b08f4c8aa..7e50b653cc5df09f7b06d449cc97a32de95b66c5 100644 (file)
@@ -2,21 +2,20 @@
  * 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.
+ * 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.
+ * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: irc-oper.c,v 1.9 2002/11/22 17:58:41 alex Exp $
- *
- * irc-oper.c: IRC-Operator-Befehle
+ * IRC operator commands
  */
 
 
 #include "portab.h"
 
+static char UNUSED id[] = "$Id: irc-oper.c,v 1.13 2002/12/12 12:33:14 alex Exp $";
+
 #include "imp.h"
 #include <assert.h>
 #include <string.h>
@@ -44,8 +43,6 @@ IRC_OPER( CLIENT *Client, REQUEST *Req )
        assert( Client != NULL );
        assert( Req != NULL );
 
-       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
-
        /* Falsche Anzahl Parameter? */
        if( Req->argc != 2 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
@@ -88,8 +85,6 @@ IRC_DIE( CLIENT *Client, REQUEST *Req )
        assert( Client != NULL );
        assert( Req != NULL );
 
-       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
-
        /* Falsche Anzahl Parameter? */
        if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
@@ -102,23 +97,21 @@ IRC_DIE( CLIENT *Client, REQUEST *Req )
 
 
 GLOBAL BOOLEAN
-IRC_RELOAD( CLIENT *Client, REQUEST *Req )
+IRC_REHASH( CLIENT *Client, REQUEST *Req )
 {
        assert( Client != NULL );
        assert( Req != NULL );
 
-       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
-
        /* Falsche Anzahl Parameter? */
        if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
        if(( ! Client_HasMode( Client, 'o' )) || ( ! Client_OperByMe( Client ))) return IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
 
-       Log( LOG_NOTICE|LOG_snotice, "Got RELOAD command from \"%s\", re-reading configuration ...", Client_Mask( Client ));
-       NGIRCd_Reload( );
+       Log( LOG_NOTICE|LOG_snotice, "Got REHASH command from \"%s\", re-reading configuration ...", Client_Mask( Client ));
+       NGIRCd_Rehash( );
        
        return CONNECTED;
-} /* IRC_RELOAD */
+} /* IRC_REHASH */
 
 
 GLOBAL BOOLEAN
@@ -127,8 +120,6 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req )
        assert( Client != NULL );
        assert( Req != NULL );
 
-       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
-
        /* Falsche Anzahl Parameter? */
        if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
@@ -149,8 +140,6 @@ IRC_CONNECT(CLIENT *Client, REQUEST *Req )
        assert( Client != NULL );
        assert( Req != NULL );
 
-       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
-
        /* Falsche Anzahl Parameter? */
        if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
        if(( ! Client_HasMode( Client, 'o' )) || ( ! Client_OperByMe( Client ))) return IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));