/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
*
* 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
* User class management.
*/
-#include "imp.h"
#include <assert.h>
+#include <stdio.h>
#include <string.h>
-#include "defines.h"
-#include "array.h"
#include "conn.h"
-#include "client.h"
#include "lists.h"
-#include "match.h"
-#include "stdio.h"
-#include "exp.h"
#include "class.h"
struct list_head My_Classes[CLASS_COUNT];
GLOBAL bool
Class_GetMemberReason(const int Class, CLIENT *Client, char *reason, size_t len)
{
- char str[COMMAND_LEN] = "listed";
+ char str[COMMAND_LEN];
assert(Class < CLASS_COUNT);
assert(Client != NULL);
+ strlcpy(str, "listed", sizeof(str));
+
if (!Lists_CheckReason(&My_Classes[Class], Client, str, sizeof(str)))
return false;
Lists_MakeMask(Pattern, mask, sizeof(mask));
return Lists_Add(&My_Classes[Class], mask,
- ValidUntil, Reason);
+ ValidUntil, Reason, false);
}
GLOBAL void