X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-oper.c;h=57b69bdaf508b8dc7f0b599356a9edd32c310ca3;hp=b390d080515ff21257055902703d4e16e25a5283;hb=74b120578337b6852d03a62b9913923a2cabe709;hpb=ca33cbda05902b0009058d369f88c0a7a43b1bbe diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index b390d080..57b69bda 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.2 2002/03/12 14:37:52 alex Exp $ + * $Id: irc-oper.c,v 1.5 2002/05/27 13:09:27 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; @@ -68,14 +75,15 @@ GLOBAL BOOLEAN IRC_OPER( CLIENT *Client, REQUEST *Req ) IRC_WriteStrServersPrefix( NULL, Client, "MODE %s :+o", Client_ID( Client )); } - if( ! Client_OperByMe( Client )) Log( LOG_NOTICE, "Got valid OPER from \"%s\", user is an IRC operator now.", Client_Mask( Client )); + if( ! Client_OperByMe( Client )) Log( LOG_NOTICE|LOG_snotice, "Got valid OPER from \"%s\", user is an IRC operator now.", Client_Mask( Client )); Client_SetOperByMe( Client, TRUE ); return IRC_WriteStrClient( Client, RPL_YOUREOPER_MSG, Client_ID( Client )); } /* IRC_OPER */ -GLOBAL BOOLEAN IRC_DIE( CLIENT *Client, REQUEST *Req ) +GLOBAL BOOLEAN +IRC_DIE( CLIENT *Client, REQUEST *Req ) { assert( Client != NULL ); assert( Req != NULL ); @@ -87,13 +95,14 @@ GLOBAL BOOLEAN IRC_DIE( CLIENT *Client, REQUEST *Req ) if(( ! Client_HasMode( Client, 'o' )) || ( ! Client_OperByMe( Client ))) return IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client )); - Log( LOG_NOTICE, "Got DIE command from \"%s\", going down!", Client_Mask( Client )); + Log( LOG_NOTICE|LOG_snotice, "Got DIE command from \"%s\", going down!", Client_Mask( Client )); NGIRCd_Quit = TRUE; return CONNECTED; } /* IRC_DIE */ -GLOBAL BOOLEAN IRC_RESTART( CLIENT *Client, REQUEST *Req ) +GLOBAL BOOLEAN +IRC_RESTART( CLIENT *Client, REQUEST *Req ) { assert( Client != NULL ); assert( Req != NULL ); @@ -105,7 +114,7 @@ GLOBAL BOOLEAN IRC_RESTART( CLIENT *Client, REQUEST *Req ) if(( ! Client_HasMode( Client, 'o' )) || ( ! Client_OperByMe( Client ))) return IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client )); - Log( LOG_NOTICE, "Got RESTART command from \"%s\", going down!", Client_Mask( Client )); + Log( LOG_NOTICE|LOG_snotice, "Got RESTART command from \"%s\", going down!", Client_Mask( Client )); NGIRCd_Restart = TRUE; return CONNECTED; } /* IRC_RESTART */