* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: irc-mode.c,v 1.1 2002/02/27 23:26:21 alex Exp $
+ * $Id: irc-mode.c,v 1.3 2002/03/12 14:37:52 alex Exp $
*
* irc-mode.c: IRC-Befehle zur Mode-Aenderung (MODE, AWAY, ...)
- *
- * $Log: irc-mode.c,v $
- * Revision 1.1 2002/02/27 23:26:21 alex
- * - Modul aus irc.c bzw. irc.h ausgegliedert.
- *
*/
-#include <portab.h>
-#include "global.h"
+#include "portab.h"
-#include <imp.h>
+#include "imp.h"
#include <assert.h>
#include <string.h>
#include "channel.h"
+#include "defines.h"
#include "irc-write.h"
#include "log.h"
#include "messages.h"
-#include <exp.h>
+#include "exp.h"
#include "irc-mode.h"
/* Befehl kommt von einem Server, daher
* trauen wir ihm "unbesehen" ... */
x[0] = *mode_ptr;
-
- if(( cl ) && ( x[0] == 'a' ))
- {
- /* away */
- if( set ) Client_SetAway( cl, "Away" );
- else Client_SetAway( cl, NULL );
- }
-
}
else
{
{
/* Mode setzen. Wenn der Client ihn noch nicht hatte: merken */
if( Client_ModeAdd( cl, x[0] )) strcat( the_modes, x );
+
}
else
{
/* Modes geloescht. Wenn der Client ihn hatte: merken */
if( Client_ModeDel( cl, x[0] )) strcat( the_modes, x );
}
+
+ /* "nachbearbeiten" */
+ if( x[0] == 'a' )
+ {
+ /* away */
+ if( set ) Client_SetAway( cl, DEFAULT_AWAY_MSG );
+ else Client_SetAway( cl, NULL );
+ }
}
if( chan )
{