File: misc.h

package info (click to toggle)
hybserv 1.9.2-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 2,848 kB
  • ctags: 1,854
  • sloc: ansic: 37,037; sh: 3,167; makefile: 337
file content (67 lines) | stat: -rw-r--r-- 1,630 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
 * misc.h
 * Hybserv2 Services by Hybserv2 team
 *
 * $Id: misc.h 1350 2005-11-29 11:40:00Z kreator $
 */

#ifndef INCLUDED_misc_h
#define INCLUDED_misc_h

#include "stdinc.h"
#include "config.h"

#define   NODCC     (-1)
#define   DCCALL    (-2)
#define   DCCOPS    (-3)

struct Luser;

struct Command
{
	char *cmd;       /* holds command */
	void (*func)(); /* corresponding function */

	/* LVL_NONE if anyone can execute it
	 * LVL_IDENT if nick needs to have IDENTIFY'd before using 'cmd'
	 * LVL_ADMIN if nick needs to match an admin line */
	int level;
};

struct aService
{
	char **name;         /* nickname of service bot */
	char **ident;        /* ident of service bot */
	char **desc;         /* description of service bot */
	struct Luser **lptr; /* pointer to service bot */
};

void debug(char *, ...);
void fatal(int, char *, ...);
void notice(char *, char *, char *, ...);
void DoShutdown(char *, char *);
struct Command *GetCommand(struct Command *, char *);
int pwmatch(char *, char *);
int operpwmatch(char *, char *);
struct Luser *GetService(char *);
struct Luser *FindService(struct Luser *);
int IsInNickArray(int, char **, char *);
int IsNum(char *);
char *HostToMask(char *, char *);
char *Substitute(char *, char *, int);
char* stripformatsymbols(char *);
int checkforproc(char *);

#ifdef CRYPT_PASSWORDS
char *hybcrypt(char *, char *);
char *make_des_salt(void);
char *make_md5_salt(void);
char *make_md5_salt_oldpasswd(char *);
#endif /* CRYPT_PASSWORDS */

extern struct aService ServiceBots[];
#ifdef CRYPT_PASSWORDS
extern int UseMD5;
#endif /* CRYPT_PASSWORDS */

#endif /* INCLUDED_misc_h */