2 * IRC - Internet Relay Chat, include/h.h
3 * Copyright (C) 1996 - 1997 Carlo Wood
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef INCLUDED_numnicks_h
22 #define INCLUDED_numnicks_h
23 #ifndef INCLUDED_sys_types_h
24 #include <sys/types.h>
25 #define INCLUDED_sys_types_h
33 * used for buffer size calculations in channel.c
35 #define NUMNICKLEN 5 /* strlen("YYXXX") */
42 * Use this macro as follows: sprintf(buf, "%s%s ...", NumNick(cptr), ...);
44 #define NumNick(c) (c)->user->server->yxx, (c)->yxx
47 * Use this macro as follows: sprintf(buf, "%s ...", NumServ(cptr), ...);
49 #define NumServ(c) (c)->yxx
52 * Use this macro as follows: sprintf(buf, "%s%s ...", NumServCap(cptr), ...);
54 #define NumServCap(c) (c)->yxx, (c)->serv->nn_capacity
64 extern void SetRemoteNumNick(struct Client* cptr, const char* yxx);
65 extern int SetLocalNumNick(struct Client* cptr);
66 extern void RemoveYXXClient(struct Client* server, const char* yxx);
67 extern void SetServerYXX(struct Client* cptr,
68 struct Client* server, const char* yxx);
69 extern void ClearServerYXX(const struct Client* server);
71 extern void SetYXXCapacity(struct Client* myself, unsigned int max_clients);
72 extern void SetYXXServerName(struct Client* myself, unsigned int numeric);
74 extern int markMatchexServer(const char* cmask, int minlen);
75 extern struct Client* find_match_server(char* mask);
76 extern struct Client* findNUser(const char* yxx);
77 extern struct Client* FindNServer(const char* numeric);
79 extern unsigned int base64toint(const char* str);
80 extern const char* inttobase64(char* buf, unsigned int v, unsigned int count);
82 #endif /* INCLUDED_numnicks_h */