X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Firc-oper.c;h=362256cf857850e27f464ffb6b028b6bbaf821ed;hb=7058a8c006bf51974f4d19aa370c97dbcd6041aa;hp=965015943d068c02046cb4795899f930d4a47f2f;hpb=6b58ab84272c53b13cdd6d40fb2cf21c734897bc;p=ngircd-alex.git diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 96501594..362256cf 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -9,7 +9,7 @@ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: irc-oper.c,v 1.3 2002/03/27 20:52:58 alex Exp $ + * $Id: irc-oper.c,v 1.8 2002/09/03 23:54:59 alex Exp $ * * irc-oper.c: IRC-Operator-Befehle */ @@ -19,18 +19,25 @@ #include "imp.h" #include +#include #include "ngircd.h" +#include "resolve.h" #include "conf.h" +#include "conn.h" +#include "client.h" +#include "channel.h" #include "irc-write.h" #include "log.h" #include "messages.h" +#include "parse.h" #include #include "irc-oper.h" -GLOBAL BOOLEAN IRC_OPER( CLIENT *Client, REQUEST *Req ) +GLOBAL BOOLEAN +IRC_OPER( CLIENT *Client, REQUEST *Req ) { INT i; @@ -75,7 +82,8 @@ GLOBAL BOOLEAN IRC_OPER( CLIENT *Client, REQUEST *Req ) } /* IRC_OPER */ -GLOBAL BOOLEAN IRC_DIE( CLIENT *Client, REQUEST *Req ) +GLOBAL BOOLEAN +IRC_DIE( CLIENT *Client, REQUEST *Req ) { assert( Client != NULL ); assert( Req != NULL ); @@ -93,7 +101,8 @@ GLOBAL BOOLEAN IRC_DIE( CLIENT *Client, REQUEST *Req ) } /* IRC_DIE */ -GLOBAL BOOLEAN IRC_RESTART( CLIENT *Client, REQUEST *Req ) +GLOBAL BOOLEAN +IRC_RESTART( CLIENT *Client, REQUEST *Req ) { assert( Client != NULL ); assert( Req != NULL ); @@ -111,4 +120,25 @@ GLOBAL BOOLEAN IRC_RESTART( CLIENT *Client, REQUEST *Req ) } /* IRC_RESTART */ +GLOBAL BOOLEAN +IRC_CONNECT(CLIENT *Client, REQUEST *Req ) +{ + /* Vorlaeufige Version zu Debug-Zwecken: es wird einfach + * der "passive mode" aufgehoben, mehr passiert nicht ... */ + + 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 CONNECT command from \"%s\".", Client_Mask( Client )); + NGIRCd_Passive = FALSE; + return CONNECTED; +} /* IRC_CONNECT */ + + /* -eof- */