From 01cebbd88e25a3513093c94a6d327eb0a1573135 Mon Sep 17 00:00:00 2001 From: jilles Date: Sat, 3 Feb 2007 17:59:38 -0800 Subject: [PATCH] [svn] Move find_umode_slot() from libcharybdis/tools.c to src/s_user.c. --- ChangeLog | 9 +++++++++ include/s_user.h | 3 ++- include/serno.h | 2 +- libcharybdis/tools.c | 24 +----------------------- libcharybdis/tools.h | 3 +-- src/s_user.c | 24 +++++++++++++++++++++++- 6 files changed, 37 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8e4af152..ba3cd941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +jilles 2007/02/01 01:44:31 UTC (20070201-3195) + Log: + DNSBL keyword substitution is available as of 2.1.3. + + + Changes: Modified: + +1 -1 trunk/doc/example.conf (File Modified) + + jilles 2007/02/01 01:07:42 UTC (20070201-3183) Log: Change two occurances like match(userinput, target_p->name) || diff --git a/include/s_user.h b/include/s_user.h index 85da2755..d1d6cfb0 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.h 1887 2006-08-29 13:42:56Z jilles $ + * $Id: s_user.h 3201 2007-02-04 01:59:38Z jilles $ */ #ifndef INCLUDED_s_user_h @@ -50,6 +50,7 @@ extern void change_nick_user_host(struct Client *target_p, const char *nick, con const char *host, int newts, char *format, ...); extern int user_modes[256]; +extern unsigned int find_umode_slot(void); extern void construct_umodebuf(void); extern int oper_up(struct Client *, struct oper_conf *); diff --git a/include/serno.h b/include/serno.h index 9bec980a..0b0a3e39 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070201-3183" +#define SERNO "20070201-3195" diff --git a/libcharybdis/tools.c b/libcharybdis/tools.c index b6e15dbe..298bfaa9 100644 --- a/libcharybdis/tools.c +++ b/libcharybdis/tools.c @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: tools.c 1110 2006-03-29 22:55:25Z nenolod $ + * $Id: tools.c 3201 2007-02-04 01:59:38Z jilles $ * * Here is the original header: * @@ -97,25 +97,3 @@ free_dlink_node(dlink_node * ptr) BlockHeapFree(dnode_heap, ptr); } - -/* - * find_umode_slot - * - * inputs - NONE - * outputs - an available umode bitmask or - * 0 if no umodes are available - * side effects - NONE - */ -unsigned int -find_umode_slot(void) -{ - unsigned int all_umodes = 0, my_umode = 0, i; - - for (i = 0; i < 128; i++) - all_umodes |= user_modes[i]; - - for (my_umode = 1; my_umode && (all_umodes & my_umode); - my_umode <<= 1); - - return my_umode; -} diff --git a/libcharybdis/tools.h b/libcharybdis/tools.h index 0d8dcdde..05b19272 100644 --- a/libcharybdis/tools.h +++ b/libcharybdis/tools.h @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: tools.h 382 2005-12-07 15:15:59Z nenolod $ + * $Id: tools.h 3201 2007-02-04 01:59:38Z jilles $ */ #ifndef __TOOLS_H__ @@ -126,7 +126,6 @@ dlink_node *dlinkFindDelete(void *data, dlink_list *list); int dlinkFindDestroy(void *data, dlink_list *list); dlink_node *dlinkFind(void *data, dlink_list *list); void dlinkMoveList(dlink_list * from, dlink_list * to); -unsigned int find_umode_slot(void); #if defined(NEED_INLINES) || defined(TOOLS_C) INLINE_FUNC void diff --git a/src/s_user.c b/src/s_user.c index 46c01909..1cc6d4c7 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.c 3161 2007-01-25 07:23:01Z nenolod $ + * $Id: s_user.c 3201 2007-02-04 01:59:38Z jilles $ */ #include "stdinc.h" @@ -1315,6 +1315,28 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) return (1); } +/* + * find_umode_slot + * + * inputs - NONE + * outputs - an available umode bitmask or + * 0 if no umodes are available + * side effects - NONE + */ +unsigned int +find_umode_slot(void) +{ + unsigned int all_umodes = 0, my_umode = 0, i; + + for (i = 0; i < 128; i++) + all_umodes |= user_modes[i]; + + for (my_umode = 1; my_umode && (all_umodes & my_umode); + my_umode <<= 1); + + return my_umode; +} + void construct_umodebuf(void) {