/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2005 by Alexander Barton (alex@barton.de)
*
* 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
#include "portab.h"
-static char UNUSED id[] = "$Id: irc-op.c,v 1.14 2005/03/19 18:43:48 fw Exp $";
+static char UNUSED id[] = "$Id: irc-op.c,v 1.17 2006/12/07 17:57:20 fw Exp $";
#include "imp.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
+#include "defines.h"
#include "conn.h"
#include "client.h"
#include "channel.h"
-#include "defines.h"
#include "irc-write.h"
#include "lists.h"
#include "log.h"
if( Channel_IsMemberOf( chan, target )) return IRC_WriteStrClient( from, ERR_USERONCHANNEL_MSG, Client_ID( from ), Req->argv[0], Req->argv[1] );
/* If the target user is banned on that channel: remember invite */
- if( Lists_CheckBanned( target, chan )) remember = true;
+ if( Lists_Check(Channel_GetListBans(chan), target )) remember = true;
- if( remember )
- {
- /* We must memember this invite */
- if( ! Lists_AddInvited( Client_Mask( target ), chan, true)) return CONNECTED;
+ if (remember) {
+ /* We must remember this invite */
+ if( ! Channel_AddInvite(chan, Client_Mask( target ), true))
+ return CONNECTED;
}
}
- Log( LOG_DEBUG, "User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask( from ), Req->argv[0], Req->argv[1] );
-
+ LogDebug("User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask(from), Req->argv[0], Req->argv[1]);
+
/* Inform target client */
IRC_WriteStrClientPrefix( target, from, "INVITE %s %s", Req->argv[0], Req->argv[1] );