diff options
| author | Alexander Barton <alex@barton.de> | 2002-11-22 17:58:41 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2002-11-22 17:58:41 +0000 |
| commit | a5c92290844a8b6988948cec530da09ae4561d22 (patch) | |
| tree | b8e736b96cf5b9d17b16e9b90c3dd339d759759d | |
| parent | a0c032b2ff96c04d8a2a5215f4183b99296826c3 (diff) | |
| download | ngircd-a5c92290844a8b6988948cec530da09ae4561d22.tar.gz ngircd-a5c92290844a8b6988948cec530da09ae4561d22.zip | |
- neue Funktion IRC_RELOAD().
| -rw-r--r-- | src/ngircd/irc-oper.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 362256cf..2a753f3a 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.8 2002/09/03 23:54:59 alex Exp $ + * $Id: irc-oper.c,v 1.9 2002/11/22 17:58:41 alex Exp $ * * irc-oper.c: IRC-Operator-Befehle */ @@ -102,6 +102,26 @@ IRC_DIE( CLIENT *Client, REQUEST *Req ) GLOBAL BOOLEAN +IRC_RELOAD( 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( ); + + return CONNECTED; +} /* IRC_RELOAD */ + + +GLOBAL BOOLEAN IRC_RESTART( CLIENT *Client, REQUEST *Req ) { assert( Client != NULL ); |