ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/services.h
Revision: 1.1
Committed: Thu Jul 19 08:24:50 2007 UTC (16 years, 10 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Log Message:
initial import. the most important changes since Atheme are:
- fixed many memory leaks
- fixed many bugs
- converted to C++ and use more STL containers
- added a (not very enhanced yet) perl module
- greatly improved XML-RPC speed
- added a JSON-RPC module with code from json-cpp
- added a valgrind memcheck module to operserv
- added a more object oriented base64 implementation
- added a specialised unit test framework
- improved stability
- use gettimeofday() if available
- reworked adding/removing commands
- MemoServ IGNORE DEL can now remove indices

File Contents

# Content
1 /*
2 * Copyright © 2005 William Pitcock, et al.
3 * Rights to this code are as documented in doc/LICENSE.
4 *
5 * Data structures related to services psuedo-clients.
6 *
7 * $Id: services.h 8417 2007-06-08 00:48:04Z nenolod $
8 */
9
10 #ifndef SERVICES_H
11 #define SERVICES_H
12
13 /* core services */
14 struct chansvs_t
15 {
16 char *nick; /* the IRC client's nickname */
17 char *user; /* the IRC client's username */
18 char *host; /* the IRC client's hostname */
19 char *real; /* the IRC client's realname */
20 char *disp; /* the IRC client's dispname */
21
22 bool fantasy; /* enable fantasy commands */
23
24 unsigned int ca_vop; /* xop access levels */
25 unsigned int ca_hop;
26 unsigned int ca_aop;
27 unsigned int ca_sop;
28
29 char *trigger; /* trigger, e.g. !, ` or . */
30
31 bool changets; /* use TS to better deop people */
32
33 service_t *me; /* our user_t struct */
34
35 time_t expiry; /* expiry time */
36
37 unsigned int maxchanacs; /* max entries in chanacs list */
38 };
39
40 struct globsvs_t
41 {
42 char *nick;
43 char *user;
44 char *host;
45 char *real;
46 char *disp; /* the IRC client's dispname */
47
48 service_t *me;
49 };
50
51 struct opersvs_t
52 {
53 char *nick;
54 char *user;
55 char *host;
56 char *real;
57 char *disp; /* the IRC client's dispname */
58
59 service_t *me;
60 };
61
62 struct memosvs_t
63 {
64 char *nick;
65 char *user;
66 char *host;
67 char *real;
68 char *disp;
69
70 service_t *me;
71 };
72
73 /* authentication services */
74 struct nicksvs_t
75 {
76 bool spam;
77 bool no_nick_ownership;
78
79 char *nick;
80 char *user;
81 char *host;
82 char *real;
83 char *disp; /* the IRC client's dispname */
84
85 service_t *me;
86
87 time_t expiry; /* expiry time */
88 };
89
90 struct saslsvs_t
91 {
92 char *nick;
93 char *user;
94 char *host;
95 char *real;
96 char *disp; /* the IRC client's dispname */
97
98 service_t *me;
99 };
100
101 struct gamesvs_t
102 {
103 char *nick;
104 char *user;
105 char *host;
106 char *real;
107 char *disp; /* the IRC client's dispname */
108
109 service_t *me;
110 };
111
112 /* help us keep consistent messages */
113 #define STR_INSUFFICIENT_PARAMS _("Insufficient parameters for \2%s\2.")
114 #define STR_INVALID_PARAMS _("Invalid parameters for \2%s\2.")
115
116 /* atheme.c */
117 E chansvs_t chansvs;
118 E globsvs_t globsvs;
119 E opersvs_t opersvs;
120 E memosvs_t memosvs;
121 E nicksvs_t nicksvs;
122 E saslsvs_t saslsvs;
123 E gamesvs_t gamesvs;
124
125 /* servtree.c */
126 E service_t *fcmd_agent;
127
128 /* services.c */
129 E int authservice_loaded;
130 E int use_myuser_access;
131 E int use_svsignore;
132
133 E int ban (user_t *source, channel_t *chan, user_t *target);
134 E int remove_banlike (user_t *source, channel_t *chan, int type, user_t *target);
135 E int remove_ban_exceptions (user_t *source, channel_t *chan, user_t *target);
136 E void join (char *chan, char *nick);
137 E void joinall (char *name);
138 E void part (char *chan, char *nick);
139 E void partall (char *name);
140 E void verbose (mychan_t *mychan, char *fmt, ...);
141 E void snoop (char *fmt, ...);
142 E void notice (char *from, char *to, char *message, ...);
143 E void command_fail (sourceinfo_t *si, faultcode_t code, const char *fmt, ...);
144 E void command_success_nodata (sourceinfo_t *si, const char *fmt, ...);
145 E void command_success_string (sourceinfo_t *si, const char *result, const char *fmt, ...);
146 E void command_success_table (sourceinfo_t *si, table_t * table);
147 E const char *get_source_name (sourceinfo_t *si);
148 E const char *get_source_mask (sourceinfo_t *si);
149 E const char *get_oper_name (sourceinfo_t *si);
150 E void wallops (char *, ...);
151 E void verbose_wallops (char *, ...);
152
153 /* ptasks.c */
154 E void handle_topic (channel_t *, char *, time_t, char *);
155 E int floodcheck (user_t *, user_t *);
156
157 /* ctcp-common.c */
158 E void common_ctcp_init (void);
159 E unsigned int handle_ctcp_common (sourceinfo_t *si, char *, char *);
160
161 #endif