[svn] Move find_umode_slot() from libcharybdis/tools.c to src/s_user.c.

This commit is contained in:
jilles 2007-02-03 17:59:38 -08:00
parent 1e56e993e2
commit 01cebbd88e
6 changed files with 37 additions and 28 deletions

View file

@ -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) ||

View file

@ -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 *);

View file

@ -1 +1 @@
#define SERNO "20070201-3183"
#define SERNO "20070201-3195"

View file

@ -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;
}

View file

@ -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

View file

@ -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)
{