Anope IRC Services  Version 1.8
ns_set.c
Go to the documentation of this file.
1 /* NickServ core functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
13 /*************************************************************************/
14 
15 #include "module.h"
16 #include "encrypt.h"
17 
18 static int do_set(User * u);
19 static int do_set_display(User * u, NickCore * nc, char *param);
20 static int do_set_password(User * u, NickCore * nc, char *param);
21 static int do_set_language(User * u, NickCore * nc, char *param);
22 static int do_set_url(User * u, NickCore * nc, char *param);
23 static int do_set_email(User * u, NickCore * nc, char *param);
24 static int do_set_greet(User * u, NickCore * nc, char *param);
25 static int do_set_icq(User * u, NickCore * nc, char *param);
26 static int do_set_kill(User * u, NickCore * nc, char *param);
27 static int do_set_secure(User * u, NickCore * nc, char *param);
28 static int do_set_private(User * u, NickCore * nc, char *param);
29 static int do_set_msg(User * u, NickCore * nc, char *param);
30 static int do_set_hide(User * u, NickCore * nc, char *param);
31 static int do_set_autoop(User *u, NickCore *nc, char *param);
32 static void myNickServHelp(User * u);
33 
40 int AnopeInit(int argc, char **argv)
41 {
42  Command *c;
43 
44  moduleAddAuthor("Anope");
45  moduleAddVersion(VERSION_STRING);
47 
48  c = createCommand("SET", do_set, NULL, NICK_HELP_SET, -1, -1, -1, -1);
50  c = createCommand("SET DISPLAY", NULL, NULL, NICK_HELP_SET_DISPLAY, -1,
51  -1, -1, -1);
53  c = createCommand("SET PASSWORD", NULL, NULL, NICK_HELP_SET_PASSWORD,
54  -1, -1, -1, -1);
56  c = createCommand("SET URL", NULL, NULL, NICK_HELP_SET_URL, -1, -1, -1,
57  -1);
59  c = createCommand("SET EMAIL", NULL, NULL, NICK_HELP_SET_EMAIL, -1, -1,
60  -1, -1);
62  c = createCommand("SET ICQ", NULL, NULL, NICK_HELP_SET_ICQ, -1, -1, -1,
63  -1);
65  c = createCommand("SET GREET", NULL, NULL, NICK_HELP_SET_GREET, -1, -1,
66  -1, -1);
68  c = createCommand("SET KILL", NULL, NULL, NICK_HELP_SET_KILL, -1, -1,
69  -1, -1);
71  c = createCommand("SET SECURE", NULL, NULL, NICK_HELP_SET_SECURE, -1,
72  -1, -1, -1);
74  c = createCommand("SET PRIVATE", NULL, NULL, NICK_HELP_SET_PRIVATE, -1,
75  -1, -1, -1);
77  c = createCommand("SET MSG", NULL, NULL, NICK_HELP_SET_MSG, -1, -1, -1,
78  -1);
80  c = createCommand("SET HIDE", NULL, NULL, NICK_HELP_SET_HIDE, -1, -1,
81  -1, -1);
83  c = createCommand("SET AUTOOP", NULL, NULL, NICK_HELP_SET_AUTOOP, -1, -1,
84  -1, -1);
86 
88 
89  return MOD_CONT;
90 }
91 
95 void AnopeFini(void)
96 {
97 
98 }
99 
100 
101 
106 static void myNickServHelp(User * u)
107 {
108  notice_lang(s_NickServ, u, NICK_HELP_CMD_SET);
109 }
110 
116 static int do_set(User * u)
117 {
118  char *cmd = strtok(NULL, " ");
119  char *param = strtok(NULL, " ");
120  NickAlias *na = u->na;
121 
122  if (readonly) {
123  notice_lang(s_NickServ, u, NICK_SET_DISABLED);
124  return MOD_CONT;
125  }
126 
127  if (!param
128  && (!cmd
129  || (stricmp(cmd, "URL") != 0 && stricmp(cmd, "EMAIL") != 0
130  && stricmp(cmd, "GREET") != 0
131  && stricmp(cmd, "ICQ") != 0))) {
132  syntax_error(s_NickServ, u, "SET", NICK_SET_SYNTAX);
133  } else if (!na) {
134  notice_lang(s_NickServ, u, NICK_NOT_REGISTERED);
135  } else if (na->status & NS_VERBOTEN) {
136  notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
137  } else if (na->nc->flags & NI_SUSPENDED) {
138  notice_lang(s_NickServ, u, NICK_X_SUSPENDED, na->nick);
139  } else if (!nick_identified(u)) {
140  notice_lang(s_NickServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ);
141  } else if (stricmp(cmd, "DISPLAY") == 0) {
142  do_set_display(u, na->nc, param);
143  } else if (stricmp(cmd, "PASSWORD") == 0) {
144  do_set_password(u, na->nc, param);
145  } else if (stricmp(cmd, "LANGUAGE") == 0) {
146  do_set_language(u, na->nc, param);
147  } else if (stricmp(cmd, "URL") == 0) {
148  do_set_url(u, na->nc, param);
149  } else if (stricmp(cmd, "EMAIL") == 0) {
150  do_set_email(u, na->nc, param);
151  } else if (stricmp(cmd, "ICQ") == 0) {
152  do_set_icq(u, na->nc, param);
153  } else if (stricmp(cmd, "GREET") == 0) {
154  do_set_greet(u, na->nc, param);
155  } else if (stricmp(cmd, "KILL") == 0) {
156  do_set_kill(u, na->nc, param);
157  } else if (stricmp(cmd, "SECURE") == 0) {
158  do_set_secure(u, na->nc, param);
159  } else if (stricmp(cmd, "PRIVATE") == 0) {
160  do_set_private(u, na->nc, param);
161  } else if (stricmp(cmd, "MSG") == 0) {
162  do_set_msg(u, na->nc, param);
163  } else if (stricmp(cmd, "HIDE") == 0) {
164  do_set_hide(u, na->nc, param);
165  } else if (stricmp(cmd, "AUTOOP") == 0) {
166  do_set_autoop(u, na->nc, param);
167  } else {
168  notice_lang(s_NickServ, u, NICK_SET_UNKNOWN_OPTION, cmd);
169  }
170  return MOD_CONT;
171 }
172 
173 static int do_set_display(User * u, NickCore * nc, char *param)
174 {
175  int i;
176  NickAlias *na;
177 
178  /* First check whether param is a valid nick of the group */
179  for (i = 0; i < nc->aliases.count; i++) {
180  na = nc->aliases.list[i];
181  if (!stricmp(na->nick, param)) {
182  param = na->nick; /* Because case may differ */
183  break;
184  }
185  }
186 
187  if (i == nc->aliases.count) {
188  notice_lang(s_NickServ, u, NICK_SET_DISPLAY_INVALID);
189  return MOD_CONT;
190  }
191 
192  change_core_display(nc, param);
193  alog("%s: %s!%s@%s set their display nick to %s",
194  s_NickServ, u->nick, u->username, u->host, nc->display);
195  notice_lang(s_NickServ, u, NICK_SET_DISPLAY_CHANGED, nc->display);
196 
197  /* Enable nick tracking if enabled */
198  if (NSNickTracking)
200 
201  return MOD_CONT;
202 }
203 
204 static int do_set_password(User * u, NickCore * nc, char *param)
205 {
206  int len = strlen(param);
207  char tmp_pass[PASSMAX];
208 
209  if (stricmp(nc->display, param) == 0 || (StrictPasswords && len < 5)) {
210  notice_lang(s_NickServ, u, MORE_OBSCURE_PASSWORD);
211  return MOD_CONT;
212  } else if (enc_encrypt_check_len(len ,PASSMAX - 1)) {
213  notice_lang(s_NickServ, u, PASSWORD_TOO_LONG);
214  return MOD_CONT;
215  }
216 
217  if (enc_encrypt(param, len, nc->pass, PASSMAX - 1) < 0) {
218  memset(param, 0, len);
219  alog("%s: Failed to encrypt password for %s (set)", s_NickServ,
220  nc->display);
221  notice_lang(s_NickServ, u, NICK_SET_PASSWORD_FAILED);
222  return MOD_CONT;
223  }
224  memset(param, 0, len);
225 
226  if(enc_decrypt(nc->pass,tmp_pass,PASSMAX - 1)==1) {
227  notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED_TO, tmp_pass);
228  } else {
229  notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED);
230  }
231 
232  alog("%s: %s!%s@%s (e-mail: %s) changed its password.", s_NickServ,
233  u->nick, u->username, u->host, (nc->email ? nc->email : "none"));
234 
235  return MOD_CONT;
236 }
237 
238 static int do_set_language(User * u, NickCore * nc, char *param)
239 {
240  int langnum;
241 
242  if (param[strspn(param, "0123456789")] != 0) { /* i.e. not a number */
243  syntax_error(s_NickServ, u, "SET LANGUAGE",
244  NICK_SET_LANGUAGE_SYNTAX);
245  return MOD_CONT;
246  }
247  langnum = atoi(param) - 1;
248  if (langnum < 0 || langnum >= NUM_LANGS || langlist[langnum] < 0) {
249  notice_lang(s_NickServ, u, NICK_SET_LANGUAGE_UNKNOWN, langnum + 1,
250  s_NickServ);
251  return MOD_CONT;
252  }
253  nc->language = langlist[langnum];
254  alog("%s: %s!%s@%s set their language to %s",
255  s_NickServ, u->nick, u->username, u->host, getstring2(nc, LANG_NAME));
256  notice_lang(s_NickServ, u, NICK_SET_LANGUAGE_CHANGED);
257  return MOD_CONT;
258 }
259 
260 static int do_set_url(User * u, NickCore * nc, char *param)
261 {
262  if (nc->url)
263  free(nc->url);
264 
265  if (param) {
266  nc->url = sstrdup(param);
267  alog("%s: %s!%s@%s set their url to %s",
268  s_NickServ, u->nick, u->username, u->host, nc->url);
269  notice_lang(s_NickServ, u, NICK_SET_URL_CHANGED, param);
270  } else {
271  nc->url = NULL;
272  alog("%s: %s!%s@%s unset their url",
273  s_NickServ, u->nick, u->username, u->host);
274  notice_lang(s_NickServ, u, NICK_SET_URL_UNSET);
275  }
276  return MOD_CONT;
277 }
278 
279 static int do_set_email(User * u, NickCore * nc, char *param)
280 {
281  if (!param && NSForceEmail) {
282  notice_lang(s_NickServ, u, NICK_SET_EMAIL_UNSET_IMPOSSIBLE);
283  return MOD_CONT;
284  } else if (param && !MailValidate(param)) {
285  notice_lang(s_NickServ, u, MAIL_X_INVALID, param);
286  return MOD_CONT;
287  }
288 
289  alog("%s: %s!%s@%s (e-mail: %s) changed its e-mail to %s.",
290  s_NickServ, u->nick, u->username, u->host,
291  (nc->email ? nc->email : "none"), (param ? param : "none"));
292 
293  if (nc->email)
294  free(nc->email);
295 
296  if (param) {
297  nc->email = sstrdup(param);
298  notice_lang(s_NickServ, u, NICK_SET_EMAIL_CHANGED, param);
299  } else {
300  nc->email = NULL;
301  notice_lang(s_NickServ, u, NICK_SET_EMAIL_UNSET);
302  }
303  return MOD_CONT;
304 }
305 
306 static int do_set_icq(User * u, NickCore * nc, char *param)
307 {
308  if (param) {
309  int32 tmp = atol(param);
310  if (!tmp) {
311  notice_lang(s_NickServ, u, NICK_SET_ICQ_INVALID, param);
312  } else {
313  nc->icq = tmp;
314  alog("%s: %s!%s@%s set their icq to %d",
315  s_NickServ, u->nick, u->username, u->host, nc->icq);
316  notice_lang(s_NickServ, u, NICK_SET_ICQ_CHANGED, param);
317  }
318  } else {
319  nc->icq = 0;
320  alog("%s: %s!%s@%s unset their icq",
321  s_NickServ, u->nick, u->username, u->host);
322  notice_lang(s_NickServ, u, NICK_SET_ICQ_UNSET);
323  }
324  return MOD_CONT;
325 }
326 
327 static int do_set_greet(User * u, NickCore * nc, char *param)
328 {
329  if (nc->greet)
330  free(nc->greet);
331 
332  if (param) {
333  char buf[BUFSIZE];
334  char *end = strtok(NULL, "");
335 
336  snprintf(buf, sizeof(buf), "%s%s%s", param, (end ? " " : ""),
337  (end ? end : ""));
338 
339  nc->greet = sstrdup(buf);
340  alog("%s: %s!%s@%s set their greet to %s",
341  s_NickServ, u->nick, u->username, u->host, nc->greet);
342  notice_lang(s_NickServ, u, NICK_SET_GREET_CHANGED, buf);
343  } else {
344  nc->greet = NULL;
345  notice_lang(s_NickServ, u, NICK_SET_GREET_UNSET);
346  }
347  return MOD_CONT;
348 }
349 
350 static int do_set_kill(User * u, NickCore * nc, char *param)
351 {
352  if (stricmp(param, "ON") == 0) {
353  nc->flags |= NI_KILLPROTECT;
354  nc->flags &= ~(NI_KILL_QUICK | NI_KILL_IMMED);
355  alog("%s: %s!%s@%s set kill ON",
356  s_NickServ, u->nick, u->username, u->host);
357  notice_lang(s_NickServ, u, NICK_SET_KILL_ON);
358  } else if (stricmp(param, "QUICK") == 0) {
360  nc->flags &= ~NI_KILL_IMMED;
361  alog("%s: %s!%s@%s set kill QUICK",
362  s_NickServ, u->nick, u->username, u->host);
363  notice_lang(s_NickServ, u, NICK_SET_KILL_QUICK);
364  } else if (stricmp(param, "IMMED") == 0) {
365  if (NSAllowKillImmed) {
367  nc->flags &= ~NI_KILL_QUICK;
368  alog("%s: %s!%s@%s set kill IMMED",
369  s_NickServ, u->nick, u->username, u->host);
370  notice_lang(s_NickServ, u, NICK_SET_KILL_IMMED);
371  } else {
372  notice_lang(s_NickServ, u, NICK_SET_KILL_IMMED_DISABLED);
373  }
374  } else if (stricmp(param, "OFF") == 0) {
376  alog("%s: %s!%s@%s set kill OFF",
377  s_NickServ, u->nick, u->username, u->host);
378  notice_lang(s_NickServ, u, NICK_SET_KILL_OFF);
379  } else {
380  syntax_error(s_NickServ, u, "SET KILL",
381  NSAllowKillImmed ? NICK_SET_KILL_IMMED_SYNTAX :
382  NICK_SET_KILL_SYNTAX);
383  }
384  return MOD_CONT;
385 }
386 
387 static int do_set_secure(User * u, NickCore * nc, char *param)
388 {
389  if (stricmp(param, "ON") == 0) {
390  nc->flags |= NI_SECURE;
391  alog("%s: %s!%s@%s set secure ON",
392  s_NickServ, u->nick, u->username, u->host);
393  notice_lang(s_NickServ, u, NICK_SET_SECURE_ON);
394  } else if (stricmp(param, "OFF") == 0) {
395  nc->flags &= ~NI_SECURE;
396  alog("%s: %s!%s@%s set secure OFF",
397  s_NickServ, u->nick, u->username, u->host);
398  notice_lang(s_NickServ, u, NICK_SET_SECURE_OFF);
399  } else {
400  syntax_error(s_NickServ, u, "SET SECURE", NICK_SET_SECURE_SYNTAX);
401  }
402  return MOD_CONT;
403 }
404 
405 static int do_set_private(User * u, NickCore * nc, char *param)
406 {
407  if (stricmp(param, "ON") == 0) {
408  nc->flags |= NI_PRIVATE;
409  alog("%s: %s!%s@%s set private ON",
410  s_NickServ, u->nick, u->username, u->host);
411  notice_lang(s_NickServ, u, NICK_SET_PRIVATE_ON);
412  } else if (stricmp(param, "OFF") == 0) {
413  nc->flags &= ~NI_PRIVATE;
414  alog("%s: %s!%s@%s set private OFF",
415  s_NickServ, u->nick, u->username, u->host);
416  notice_lang(s_NickServ, u, NICK_SET_PRIVATE_OFF);
417  } else {
418  syntax_error(s_NickServ, u, "SET PRIVATE",
419  NICK_SET_PRIVATE_SYNTAX);
420  }
421  return MOD_CONT;
422 }
423 
424 static int do_set_msg(User * u, NickCore * nc, char *param)
425 {
426  if (!UsePrivmsg) {
427  notice_lang(s_NickServ, u, NICK_SET_OPTION_DISABLED, "MSG");
428  return MOD_CONT;
429  }
430 
431  if (stricmp(param, "ON") == 0) {
432  nc->flags |= NI_MSG;
433  alog("%s: %s!%s@%s set msg ON",
434  s_NickServ, u->nick, u->username, u->host);
435  notice_lang(s_NickServ, u, NICK_SET_MSG_ON);
436  } else if (stricmp(param, "OFF") == 0) {
437  nc->flags &= ~NI_MSG;
438  alog("%s: %s!%s@%s set msg OFF",
439  s_NickServ, u->nick, u->username, u->host);
440  notice_lang(s_NickServ, u, NICK_SET_MSG_OFF);
441  } else {
442  syntax_error(s_NickServ, u, "SET MSG", NICK_SET_MSG_SYNTAX);
443  }
444  return MOD_CONT;
445 }
446 
447 static int do_set_hide(User * u, NickCore * nc, char *param)
448 {
449  int flag, onmsg, offmsg;
450  char *param2;
451 
452  if (stricmp(param, "EMAIL") == 0) {
453  flag = NI_HIDE_EMAIL;
454  onmsg = NICK_SET_HIDE_EMAIL_ON;
455  offmsg = NICK_SET_HIDE_EMAIL_OFF;
456  } else if (stricmp(param, "USERMASK") == 0) {
457  flag = NI_HIDE_MASK;
458  onmsg = NICK_SET_HIDE_MASK_ON;
459  offmsg = NICK_SET_HIDE_MASK_OFF;
460  } else if (stricmp(param, "STATUS") == 0) {
461  flag = NI_HIDE_STATUS;
462  onmsg = NICK_SET_HIDE_STATUS_ON;
463  offmsg = NICK_SET_HIDE_STATUS_OFF;
464  } else if (stricmp(param, "QUIT") == 0) {
465  flag = NI_HIDE_QUIT;
466  onmsg = NICK_SET_HIDE_QUIT_ON;
467  offmsg = NICK_SET_HIDE_QUIT_OFF;
468  } else {
469  syntax_error(s_NickServ, u, "SET HIDE", NICK_SET_HIDE_SYNTAX);
470  return MOD_CONT;
471  }
472 
473  param2 = strtok(NULL, " ");
474  if (!param2) {
475  syntax_error(s_NickServ, u, "SET HIDE", NICK_SET_HIDE_SYNTAX);
476  } else if (stricmp(param2, "ON") == 0) {
477  nc->flags |= flag;
478  alog("%s: %s!%s@%s set hide %s ON",
479  s_NickServ, u->nick, u->username, u->host, param);
480  notice_lang(s_NickServ, u, onmsg, s_NickServ);
481  } else if (stricmp(param2, "OFF") == 0) {
482  nc->flags &= ~flag;
483  alog("%s: %s!%s@%s set hide %s OFF",
484  s_NickServ, u->nick, u->username, u->host, param);
485  notice_lang(s_NickServ, u, offmsg, s_NickServ);
486  } else {
487  syntax_error(s_NickServ, u, "SET HIDE", NICK_SET_HIDE_SYNTAX);
488  }
489 
490  return MOD_CONT;
491 }
492 
493 static int do_set_autoop(User *u, NickCore *nc, char *param) {
494 
500  if (stricmp(param, "ON") == 0) {
501  nc->flags &= ~NI_AUTOOP;
502  alog("%s: %s!%s@%s set autoop ON",
503  s_NickServ, u->nick, u->username, u->host);
504  notice_lang(s_NickServ, u, NICK_SET_AUTOOP_ON);
505  } else if (stricmp(param, "OFF") == 0) {
506  nc->flags |= NI_AUTOOP;
507  alog("%s: %s!%s@%s set autoop OFF",
508  s_NickServ, u->nick, u->username, u->host);
509  notice_lang(s_NickServ, u, NICK_SET_AUTOOP_OFF);
510  } else {
511  syntax_error(s_NickServ, u, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
512  }
513 
514  return MOD_CONT;
515 }
516 
517 
518 /* EOF */
E size_t strspn(const char *s, const char *accept)
Definition: compat.c:106
static int do_set_greet(User *u, NickCore *nc, char *param)
Definition: ns_set.c:327
#define NI_KILL_IMMED
Definition: services.h:1301
E int readonly
Definition: extern.h:776
char nick[NICKMAX]
Definition: services.h:875
E int snprintf(char *buf, size_t size, const char *fmt,...)
Definition: compat.c:37
char * url
Definition: services.h:547
#define NI_SUSPENDED
Definition: services.h:1308
E int nick_identified(User *u)
Definition: nickserv.c:1111
static int do_set_autoop(User *u, NickCore *nc, char *param)
Definition: ns_set.c:493
E int NSNickTracking
Definition: extern.h:399
E int stricmp(const char *s1, const char *s2)
Definition: compat.c:58
static int do_set_display(User *u, NickCore *nc, char *param)
Definition: ns_set.c:173
static int do_set_kill(User *u, NickCore *nc, char *param)
Definition: ns_set.c:350
#define NS_VERBOTEN
Definition: services.h:1273
uint16 language
Definition: services.h:549
char * host
Definition: services.h:878
void AnopeFini(void)
Definition: ns_set.c:95
E int langlist[NUM_LANGS]
Definition: extern.h:728
#define getstring2(nc, index)
Definition: extern.h:733
static int do_set_hide(User *u, NickCore *nc, char *param)
Definition: ns_set.c:447
#define NI_HIDE_QUIT
Definition: services.h:1299
#define NI_KILLPROTECT
Definition: services.h:1290
#define NUM_LANGS
Definition: services.h:1333
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void syntax_error(char *service, User *u, const char *command, int msgnum)
Definition: language.c:295
E void notice_lang(char *source, User *dest, int message,...)
Definition: send.c:169
MDE void moduleSetType(MODType type)
Definition: modules.c:818
#define NI_PRIVATE
Definition: services.h:1296
static int do_set_url(User *u, NickCore *nc, char *param)
Definition: ns_set.c:260
E char * sstrdup(const char *s)
Definition: memory.c:105
NickCore * nc
Definition: services.h:533
char * display
Definition: services.h:542
static int do_set(User *u)
Definition: ns_set.c:116
#define NI_HIDE_EMAIL
Definition: services.h:1297
void ** list
Definition: slist.h:21
E int enc_encrypt(const char *src, int len, char *dest, int size)
Definition: encrypt.c:50
int16 count
Definition: slist.h:23
#define NI_HIDE_STATUS
Definition: services.h:1307
#define PASSMAX
Definition: config.h:65
int32_t int32
Definition: db-merger.c:122
uint16 status
Definition: services.h:532
#define NI_HIDE_MASK
Definition: services.h:1298
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
static int do_set_msg(User *u, NickCore *nc, char *param)
Definition: ns_set.c:424
Command * c
Definition: ns_recover.c:17
E void alog(const char *fmt,...) FORMAT(printf
#define MOD_CONT
Definition: modules.h:54
#define NI_MSG
Definition: services.h:1292
E int enc_encrypt_check_len(int passlen, int bufsize)
Definition: encrypt.c:66
#define NI_AUTOOP
Definition: services.h:1309
char * nick
Definition: services.h:526
char * username
Definition: services.h:877
int AnopeInit(int argc, char **argv)
Definition: ns_set.c:40
static int do_set_icq(User *u, NickCore *nc, char *param)
Definition: ns_set.c:306
static int do_set_email(User *u, NickCore *nc, char *param)
Definition: ns_set.c:279
#define NI_SECURE
Definition: services.h:1291
MDE void moduleSetNickHelp(void(*func)(User *u))
Definition: modules.c:2078
static void myNickServHelp(User *u)
Definition: ns_set.c:106
static int do_set_password(User *u, NickCore *nc, char *param)
Definition: ns_set.c:204
E int NSAllowKillImmed
Definition: extern.h:389
Definition: modules.h:99
MDE Command * createCommand(const char *name, int(*func)(User *u), int(*has_priv)(User *u), int help_all, int help_reg, int help_oper, int help_admin, int help_root)
Definition: modules.c:987
char pass[PASSMAX]
Definition: services.h:543
E int StrictPasswords
Definition: extern.h:341
SList aliases
Definition: services.h:559
static int do_set_secure(User *u, NickCore *nc, char *param)
Definition: ns_set.c:387
uint32 flags
Definition: services.h:548
E int enc_decrypt(const char *src, char *dest, int size)
Definition: encrypt.c:80
E void change_core_display(NickCore *nc, char *newdisplay)
Definition: nickserv.c:1416
static int do_set_private(User *u, NickCore *nc, char *param)
Definition: ns_set.c:405
char * greet
Definition: services.h:545
E char * s_NickServ
Definition: extern.h:284
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1082
E int NSForceEmail
Definition: extern.h:383
uint32 icq
Definition: services.h:546
static int do_set_language(User *u, NickCore *nc, char *param)
Definition: ns_set.c:238
E int UsePrivmsg
Definition: extern.h:352
E int MailValidate(const char *email)
Definition: mail.c:296
#define BUFSIZE
Definition: config.h:47
#define NI_KILL_QUICK
Definition: services.h:1300
#define NICKSERV
Definition: modules.h:59
NickAlias * na
Definition: services.h:892
#define MOD_UNIQUE
Definition: module.h:11
char * email
Definition: services.h:544
E void nsStartNickTracking(User *u)
Definition: nickserv.c:1962