Anope IRC Services  Version 1.8
unreal32.c
Go to the documentation of this file.
1 /* Unreal IRCD 3.2.x 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 
16 #include "services.h"
17 #include "pseudo.h"
18 #include "unreal32.h"
19 #include "version.h"
20 
22  {"UnrealIRCd 3.2.x", /* ircd name */
23  "+oS", /* nickserv mode */
24  "+oS", /* chanserv mode */
25  "+oS", /* memoserv mode */
26  "+oS", /* hostserv mode */
27  "+ioS", /* operserv mode */
28  "+oS", /* botserv mode */
29  "+oS", /* helpserv mode */
30  "+ioHS", /* Dev/Null mode */
31  "+ioS", /* Global mode */
32  "+oS", /* nickserv alias mode */
33  "+oS", /* chanserv alias mode */
34  "+oS", /* memoserv alias mode */
35  "+ioS", /* hostserv alias mode */
36  "+ioS", /* operserv alias mode */
37  "+oS", /* botserv alias mode */
38  "+oS", /* helpserv alias mode */
39  "+ioHS", /* Dev/Null alias mode */
40  "+ioS", /* Global alias mode */
41  "+oqHS", /* Used by BotServ Bots */
42  5, /* Chan Max Symbols */
43  "-cijlmnpstuzACGKMNOQRSTV", /* Modes to Remove */
44  "+ao", /* Channel Umode used by Botserv bots */
45  1, /* SVSNICK */
46  1, /* Vhost */
47  1, /* Has Owner */
48  "+q", /* Mode to set for an owner */
49  "-q", /* Mode to unset for an owner */
50  "+a", /* Mode to set for channel admin */
51  "-a", /* Mode to unset for channel admin */
52  "+rd", /* Mode On Reg */
53  NULL, /* Mode on ID for Roots */
54  NULL, /* Mode on ID for Admins */
55  NULL, /* Mode on ID for Opers */
56  "-r+d", /* Mode on UnReg */
57  "-r+d", /* Mode on Nick Change */
58  1, /* Supports SGlines */
59  1, /* Supports SQlines */
60  1, /* Supports SZlines */
61  1, /* Supports Halfop +h */
62  3, /* Number of server args */
63  0, /* Join 2 Set */
64  0, /* Join 2 Message */
65  1, /* Has exceptions +e */
66  1, /* TS Topic Forward */
67  0, /* TS Topci Backward */
68  UMODE_S, /* Protected Umode */
69  0, /* Has Admin */
70  0, /* Chan SQlines */
71  0, /* Quit on Kill */
72  1, /* SVSMODE unban */
73  1, /* Has Protect */
74  1, /* Reverse */
75  1, /* Chan Reg */
76  CMODE_r, /* Channel Mode */
77  1, /* vidents */
78  1, /* svshold */
79  1, /* time stamp on mode */
80  1, /* NICKIP */
81  1, /* O:LINE */
82  1, /* UMODE */
83  1, /* VHOST ON NICK */
84  1, /* Change RealName */
85  CMODE_K, /* No Knock */
86  CMODE_A, /* Admin Only */
87  DEFAULT_MLOCK, /* Default MLOCK */
88  UMODE_x, /* Vhost Mode */
89  1, /* +f */
90  1, /* +L */
91  CMODE_f, /* +f Mode */
92  CMODE_L, /* +L Mode */
93  0, /* On nick change check if they could be identified */
94  1, /* No Knock requires +i */
95  NULL, /* CAPAB Chan Modes */
96  1, /* We support Unreal TOKENS */
97  0, /* TOKENS are CASE Sensitive */
98  1, /* TIME STAMPS are BASE64 */
99  1, /* +I support */
100  '&', /* SJOIN ban char */
101  '\"', /* SJOIN except char */
102  '\'', /* SJOIN invite char */
103  1, /* Can remove User Channel Modes with SVSMODE */
104  0, /* Sglines are not enforced until user reconnects */
105  "x", /* vhost char */
106  0, /* ts6 */
107  1, /* support helper umode */
108  0, /* p10 */
109  NULL, /* character set */
110  1, /* reports sync state */
111  0, /* CIDR channelbans */
112  1, /* +j */
113  CMODE_j, /* +j Mode */
114  0, /* Use delayed client introduction. */
115  }
116  ,
117  {NULL}
118 };
119 
121  {
122  CAPAB_NOQUIT, /* NOQUIT */
123  0, /* TSMODE */
124  0, /* UNCONNECT */
125  CAPAB_NICKIP, /* NICKIP */
126  0, /* SJOIN */
127  CAPAB_ZIP, /* ZIP */
128  0, /* BURST */
129  0, /* TS5 */
130  0, /* TS3 */
131  0, /* DKEY */
132  0, /* PT4 */
133  0, /* SCS */
134  0, /* QS */
135  0, /* UID */
136  0, /* KNOCK */
137  0, /* CLIENT */
138  0, /* IPV6 */
139  0, /* SSJ5 */
140  0, /* SN2 */
141  CAPAB_TOKEN, /* TOKEN */
142  0, /* VHOST */
143  CAPAB_SSJ3, /* SSJ3 */
144  CAPAB_NICK2, /* NICK2 */
145  CAPAB_UMODE2, /* UMODE2 */
146  CAPAB_VL, /* VL */
147  CAPAB_TLKEXT, /* TLKEXT */
148  0, /* DODKEY */
149  0, /* DOZIP */
150  CAPAB_CHANMODE, /* CHANMODE */
151  CAPAB_SJB64,
153  }
154 };
155 
156 
157 unsigned long umodes[128] = {
158  0, 0, 0, /* Unused */
159  0, 0, 0, /* Unused */
160  0, 0, 0, /* Unused, Unused, Horzontal Tab */
161  0, 0, 0, /* Line Feed, Unused, Unused */
162  0, 0, 0, /* Carriage Return, Unused, Unused */
163  0, 0, 0, /* Unused */
164  0, 0, 0, /* Unused */
165  0, 0, 0, /* Unused */
166  0, 0, 0, /* Unused */
167  0, 0, 0, /* Unused */
168  0, 0, 0, /* Unused, Unused, Space */
169  0, 0, 0, /* ! " # */
170  0, 0, 0, /* $ % & */
171  0, 0, 0, /* ! ( ) */
172  0, 0, 0, /* * + , */
173  0, 0, 0, /* - . / */
174  0, 0, /* 0 1 */
175  0, 0, /* 2 3 */
176  0, 0, /* 4 5 */
177  0, 0, /* 6 7 */
178  0, 0, /* 8 9 */
179  0, 0, /* : ; */
180  0, 0, 0, /* < = > */
181  0, 0, /* ? @ */
182  UMODE_A, UMODE_B, UMODE_C, /* A B C */
183  0, 0, 0, /* D E F */
184  UMODE_G, UMODE_H, 0, /* G H I */
185  0, 0, 0, /* J K L */
186  0, UMODE_N, UMODE_O, /* M N O */
187  0, 0, UMODE_R, /* P Q R */
188  UMODE_S, UMODE_T, 0, /* S T U */
189  UMODE_V, UMODE_W, 0, /* V W X */
190  0, /* Y */
191  0, /* Z */
192  0, 0, 0, /* [ \ ] */
193  0, 0, 0, /* ^ _ ` */
194  UMODE_a, 0, 0, /* a b c */
195  UMODE_d, 0, 0, /* d e f */
196  UMODE_g, UMODE_h, UMODE_i, /* g h i */
197  0, 0, 0, /* j k l */
198  0, 0, UMODE_o, /* m n o */
199  UMODE_p, UMODE_q, UMODE_r, /* p q r */
200  UMODE_s, UMODE_t, 0, /* s t u */
201  UMODE_v, UMODE_w, UMODE_x, /* v w x */
202  0, /* y */
203  UMODE_z, /* z */
204  0, 0, 0, /* { | } */
205  0, 0 /* ~ � */
206 };
207 
208 char myCsmodes[128] = {
209  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
211 
212  0,
213  0,
214  0, 0, 0,
215  'h', /* (37) % Channel halfops */
216  'b', /* (38) & bans */
217  0, 0, 0,
218  'q',
219 
220  'v', 0, 0, 0, 0,
221  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
222 
223  'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
224  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
225 
226  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'a', 0
228 };
229 
231  {NULL}, {NULL}, {NULL},
232  {NULL}, {NULL}, {NULL},
233  {NULL}, {NULL}, {NULL},
234  {NULL}, {NULL}, {NULL},
235  {NULL}, {NULL}, {NULL},
236  {NULL}, {NULL}, {NULL},
237  {NULL}, {NULL}, {NULL},
238  {NULL}, {NULL}, {NULL},
239  {NULL}, {NULL}, {NULL},
240  {NULL}, {NULL}, {NULL},
241  {NULL}, {NULL}, {NULL},
242  {NULL}, {NULL}, {NULL},
243  {NULL}, {NULL}, {NULL},
244  {NULL}, {NULL}, {NULL},
245  {NULL}, {NULL}, {NULL},
246  {NULL}, {NULL}, {NULL},
247  {NULL}, {NULL}, {NULL},
248  {NULL}, {NULL}, {NULL},
249  {NULL}, {NULL}, {NULL},
250  {NULL}, {NULL}, {NULL},
251  {NULL}, {NULL}, {NULL},
252  {NULL}, {NULL}, {NULL},
253  {NULL}, {NULL}, {NULL}, /* BCD */
254  {NULL}, {NULL}, {NULL}, /* EFG */
255  {NULL}, /* H */
256  {add_invite, del_invite}, /* I */
257  {NULL}, /* J */
258  {NULL}, {NULL}, {NULL}, /* KLM */
259  {NULL}, {NULL}, {NULL}, /* NOP */
260  {NULL}, {NULL}, {NULL}, /* QRS */
261  {NULL}, {NULL}, {NULL}, /* TUV */
262  {NULL}, {NULL}, {NULL}, /* WXY */
263  {NULL}, /* Z */
264  {NULL}, {NULL}, /* (char 91 - 92) */
265  {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */
266  {NULL}, /* ` (char 96) */
267  {NULL}, /* a (char 97) */
268  {add_ban, del_ban}, /* b */
269  {NULL}, {NULL}, /* cd */
271  {NULL}, {NULL},
272  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
273  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
274  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
275 };
276 
278  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
279  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
280  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
281  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
282  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
283  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
284  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
285  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
286  {0},
287  {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL},
288  {0}, /* B */
289  {CMODE_C, 0, NULL, NULL}, /* C */
290  {0}, /* D */
291  {0}, /* E */
292  {0}, /* F */
293  {CMODE_G, 0, NULL, NULL}, /* G */
294  {0}, /* H */
295  {0}, /* I */
296  {0}, /* J */
297  {CMODE_K, 0, NULL, NULL}, /* K */
299  {CMODE_M, 0, NULL, NULL}, /* M */
300  {CMODE_N, 0, NULL, NULL}, /* N */
301  {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
302  {0}, /* P */
303  {CMODE_Q, 0, NULL, NULL}, /* Q */
304  {CMODE_R, 0, NULL, NULL}, /* R */
305  {CMODE_S, 0, NULL, NULL}, /* S */
306  {CMODE_T, 0, NULL, NULL}, /* T */
307  {0}, /* U */
308  {CMODE_V, 0, NULL, NULL}, /* V */
309  {0}, /* W */
310  {0}, /* X */
311  {0}, /* Y */
312  {0}, /* Z */
313  {0}, {0}, {0}, {0}, {0}, {0},
314  {0}, /* a */
315  {0}, /* b */
316  {CMODE_c, 0, NULL, NULL},
317  {0}, /* d */
318  {0}, /* e */
320  {0}, /* g */
321  {0}, /* h */
322  {CMODE_i, 0, NULL, NULL},
326  {CMODE_m, 0, NULL, NULL},
327  {CMODE_n, 0, NULL, NULL},
328  {0}, /* o */
329  {CMODE_p, 0, NULL, NULL},
330  {0}, /* q */
331  {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
332  {CMODE_s, 0, NULL, NULL},
333  {CMODE_t, 0, NULL, NULL},
334  {CMODE_u, 0, NULL, NULL},
335  {0}, /* v */
336  {0}, /* w */
337  {0}, /* x */
338  {0}, /* y */
339  {CMODE_z, 0, NULL, NULL},
340  {0}, {0}, {0}, {0}
341 };
342 
344  {'c', CMODE_c, 0, NULL, NULL},
345  {'f', CMODE_f, 0, get_flood, cs_get_flood},
346  {'i', CMODE_i, 0, NULL, NULL},
348  {'k', CMODE_k, 0, get_key, cs_get_key},
350  {'m', CMODE_m, 0, NULL, NULL},
351  {'n', CMODE_n, 0, NULL, NULL},
352  {'p', CMODE_p, 0, NULL, NULL},
353  {'r', CMODE_r, 0, NULL, NULL},
354  {'s', CMODE_s, 0, NULL, NULL},
355  {'t', CMODE_t, 0, NULL, NULL},
356  {'u', CMODE_u, 0, NULL, NULL},
357  {'z', CMODE_z, 0, NULL, NULL},
358  {'A', CMODE_A, 0, NULL, NULL},
359  {'C', CMODE_C, 0, NULL, NULL},
360  {'G', CMODE_G, 0, NULL, NULL},
361  {'K', CMODE_K, 0, NULL, NULL},
363  {'M', CMODE_M, 0, NULL, NULL},
364  {'N', CMODE_N, 0, NULL, NULL},
365  {'O', CMODE_O, 0, NULL, NULL},
366  {'Q', CMODE_Q, 0, NULL, NULL},
367  {'R', CMODE_R, 0, NULL, NULL},
368  {'S', CMODE_S, 0, NULL, NULL},
369  {'T', CMODE_T, 0, NULL, NULL},
370  {'V', CMODE_V, 0, NULL, NULL},
371  {0}
372 };
373 
375  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
376  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
377  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
378  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
379 
380  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
381  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
382  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
383  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
384 
385  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
386  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
387  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
388  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
389 
390  {0},
391 
393  {0}, /* b */
394  {0}, /* c */
395  {0}, /* d */
396  {0}, /* e */
397  {0}, /* f */
398  {0}, /* g */
400  {0}, /* i */
401  {0}, /* j */
402  {0}, /* k */
403  {0}, /* l */
404  {0}, /* m */
405  {0}, /* n */
407  {0}, /* p */
409  {0}, /* r */
410  {0}, /* s */
411  {0}, /* t */
412  {0}, /* u */
413  {CUS_VOICE, 0, NULL},
414  {0}, /* w */
415  {0}, /* x */
416  {0}, /* y */
417  {0}, /* z */
418  {0}, {0}, {0}, {0}, {0}
419 };
420 
421 
422 void unreal_set_umode(User * user, int ac, char **av)
423 {
424  int add = 1; /* 1 if adding modes, 0 if deleting */
425  char *modes = av[0];
426 
427  ac--;
428 
429  if (!user || !modes) {
430  /* Prevent NULLs from doing bad things */
431  return;
432  }
433 
434  if (debug)
435  alog("debug: Changing mode for %s to %s", user->nick, modes);
436 
437  while (*modes) {
438  uint32 backup = user->mode;
439 
440  /* This looks better, much better than "add ? (do_add) : (do_remove)".
441  * At least this is readable without paying much attention :) -GD
442  */
443  if (add)
444  user->mode |= umodes[(int) *modes];
445  else
446  user->mode &= ~umodes[(int) *modes];
447 
448  switch (*modes++) {
449  case '+':
450  add = 1;
451  break;
452  case '-':
453  add = 0;
454  break;
455  case 'd':
456  if (ac <= 0) {
457  break;
458  }
459  if (isdigit(*av[1])) {
460  user->svid = strtoul(av[1], NULL, 0);
461  user->mode = backup; /* Ugly fix, but should do the job ~ Viper */
462  }
463  break;
464  case 'o':
465  if (add) {
466  opcnt++;
467  if (WallOper) {
469  "\2%s\2 is now an IRC operator.",
470  user->nick);
471  }
472  display_news(user, NEWS_OPER);
473  } else {
474  opcnt--;
475  }
476  break;
477  case 'a':
478  if (UnRestrictSAdmin) {
479  break;
480  }
481  if (add && !is_services_admin(user)) {
482  common_svsmode(user, "-a", NULL);
483  user->mode &= ~UMODE_a;
484  }
485  break;
486  case 'r':
487  if (add && !nick_identified(user)) {
488  common_svsmode(user, "-r", NULL);
489  user->mode &= ~UMODE_r;
490  }
491  break;
492  case 'x':
493  if (!add) {
494  if (user->vhost)
495  free(user->vhost);
496  user->vhost = NULL;
497  }
498  update_host(user);
499  break;
500  }
501  }
502 }
503 
504 
505 
506 
507 /* Event: PROTOCTL */
508 int anope_event_capab(char *source, int ac, char **av)
509 {
510  capab_parse(ac, av);
511  return MOD_CONT;
512 }
513 
514 /* SVSNOOP */
515 void unreal_cmd_svsnoop(char *server, int set)
516 {
517  send_cmd(NULL, "%s %s %s", send_token("SVSNOOP", "f"), server,
518  (set ? "+" : "-"));
519 }
520 
521 void unreal_cmd_svsadmin(char *server, int set)
522 {
523  unreal_cmd_svsnoop(server, set);
524 }
525 
526 void unreal_cmd_remove_akill(char *user, char *host)
527 {
528  send_cmd(NULL, "%s - G %s %s %s", send_token("TKL", "BD"), user, host,
529  s_OperServ);
530 }
531 
532 void unreal_cmd_topic(char *whosets, char *chan, char *whosetit,
533  char *topic, time_t when)
534 {
535  send_cmd(whosets, "%s %s %s %lu :%s", send_token("TOPIC", ")"), chan,
536  whosetit, (unsigned long int) when, topic);
537 }
538 
540 {
541  common_svsmode(u, "-xt", NULL);
542  common_svsmode(u, "+x", NULL);
543 
544  notice_lang(s_HostServ, u, HOST_OFF);
545 }
546 
547 void unreal_cmd_akill(char *user, char *host, char *who, time_t when,
548  time_t expires, char *reason)
549 {
550  send_cmd(NULL, "%s + G %s %s %s %ld %ld :%s", send_token("TKL", "BD"),
551  user, host, who, (long int) time(NULL) + 86400 * 2,
552  (long int) when, reason);
553 }
554 
555 /*
556 ** svskill
557 ** parv[0] = servername
558 ** parv[1] = client
559 ** parv[2] = kill message
560 */
561 void unreal_cmd_svskill(char *source, char *user, char *buf)
562 {
563  if (!source || !user || !buf) {
564  return;
565  }
566  send_cmd(source, "%s %s :%s", send_token("SVSKILL", "h"), user, buf);
567 }
568 
569 /*
570  * m_svsmode() added by taz
571  * parv[0] - sender
572  * parv[1] - username to change mode for
573  * parv[2] - modes to change
574  * parv[3] - Service Stamp (if mode == d)
575  */
576 void unreal_cmd_svsmode(User * u, int ac, char **av)
577 {
578  if (ac >= 1) {
579  if (!u || !av[0]) {
580  return;
581  }
582  if (UseSVS2MODE) {
583  send_cmd(ServerName, "%s %s %s%s%s",
584  send_token("SVS2MODE", "v"), u->nick, av[0],
585  (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
586  } else {
587  send_cmd(ServerName, "%s %s %s%s%s",
588  send_token("SVSMODE", "n"), u->nick, av[0],
589  (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
590  }
591  }
592 }
593 
594 /* 372 */
595 void unreal_cmd_372(char *source, char *msg)
596 {
597  send_cmd(ServerName, "372 %s :- %s", source, msg);
598 }
599 
600 void unreal_cmd_372_error(char *source)
601 {
602  send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
603  "contact your IRC administrator.", source);
604 }
605 
606 void unreal_cmd_375(char *source)
607 {
608  send_cmd(ServerName, "375 %s :- %s Message of the Day",
609  source, ServerName);
610 }
611 
612 void unreal_cmd_376(char *source)
613 {
614  send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
615 }
616 
617 void unreal_cmd_nick(char *nick, char *name, char *modes)
618 {
619  EnforceQlinedNick(nick, NULL);
620  send_cmd(NULL, "%s %s 1 %ld %s %s %s 0 %s %s%s :%s",
621  send_token("NICK", "&"), nick, (long int) time(NULL),
623  (myIrcd->nickip ? " *" : " "), name);
624  unreal_cmd_sqline(nick, "Reserved for services");
625 }
626 
627 void unreal_cmd_guest_nick(char *nick, char *user, char *host, char *real,
628  char *modes)
629 {
630  send_cmd(NULL, "%s %s 1 %ld %s %s %s 0 %s %s%s :%s",
631  send_token("NICK", "&"), nick, (long int) time(NULL), user,
632  host, ServerName, modes, host, (myIrcd->nickip ? " *" : " "),
633  real);
634 }
635 
636 void unreal_cmd_mode(char *source, char *dest, char *buf)
637 {
638  if (!buf) {
639  return;
640  }
641 
642  send_cmd(source, "%s %s %s", send_token("MODE", "G"), dest, buf);
643 }
644 
645 void unreal_cmd_bot_nick(char *nick, char *user, char *host, char *real,
646  char *modes)
647 {
649  send_cmd(NULL, "%s %s 1 %ld %s %s %s 0 %s %s%s :%s",
650  send_token("NICK", "&"), nick, (long int) time(NULL), user,
651  host, ServerName, modes, host, (myIrcd->nickip ? " *" : " "),
652  real);
653  unreal_cmd_sqline(nick, "Reserved for services");
654 }
655 
656 void unreal_cmd_kick(char *source, char *chan, char *user, char *buf)
657 {
658  if (buf) {
659  send_cmd(source, "%s %s %s :%s", send_token("KICK", "H"), chan,
660  user, buf);
661  } else {
662  send_cmd(source, "%s %s %s", send_token("KICK", "H"), chan, user);
663  }
664 }
665 
666 void unreal_cmd_notice_ops(char *source, char *dest, char *buf)
667 {
668  if (!buf) {
669  return;
670  }
671 
672  send_cmd(source, "%s @%s :%s", send_token("NOTICE", "B"), dest, buf);
673 }
674 
675 
676 void unreal_cmd_notice(char *source, char *dest, char *buf)
677 {
678  if (!buf) {
679  return;
680  }
681 
682  if (NSDefFlags & NI_MSG) {
683  unreal_cmd_privmsg2(source, dest, buf);
684  } else {
685  send_cmd(source, "%s %s :%s", send_token("NOTICE", "B"), dest,
686  buf);
687  }
688 }
689 
690 void unreal_cmd_notice2(char *source, char *dest, char *msg)
691 {
692  send_cmd(source, "%s %s :%s", send_token("NOTICE", "B"), dest, msg);
693 }
694 
695 void unreal_cmd_privmsg(char *source, char *dest, char *buf)
696 {
697  if (!buf) {
698  return;
699  }
700 
701  send_cmd(source, "%s %s :%s", send_token("PRIVMSG", "!"), dest, buf);
702 }
703 
704 void unreal_cmd_privmsg2(char *source, char *dest, char *msg)
705 {
706  send_cmd(source, "%s %s :%s", send_token("PRIVMSG", "!"), dest, msg);
707 }
708 
709 void unreal_cmd_serv_notice(char *source, char *dest, char *msg)
710 {
711  send_cmd(source, "%s $%s :%s", send_token("NOTICE", "B"), dest, msg);
712 }
713 
714 void unreal_cmd_serv_privmsg(char *source, char *dest, char *msg)
715 {
716  send_cmd(source, "%s $%s :%s", send_token("PRIVMSG", "!"), dest, msg);
717 }
718 
719 void unreal_cmd_bot_chan_mode(char *nick, char *chan)
720 {
721  anope_cmd_mode(nick, chan, "%s %s %s", myIrcd->botchanumode, nick,
722  nick);
723 }
724 
725 void unreal_cmd_351(char *source)
726 {
727  send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
728  source, version_number, ServerName, myIrcd->name,
730 }
731 
732 /* QUIT */
733 void unreal_cmd_quit(char *source, char *buf)
734 {
735  if (buf) {
736  send_cmd(source, "%s :%s", send_token("QUIT", ","), buf);
737  } else {
738  send_cmd(source, "%s", send_token("QUIT", ","));
739  }
740 }
741 
742 /* PROTOCTL */
743 /*
744  NICKv2 = Nick Version 2
745  VHP = Sends hidden host
746  UMODE2 = sends UMODE2 on user modes
747  NICKIP = Sends IP on NICK
748  TOKEN = Use tokens to talk
749  SJ3 = Supports SJOIN
750  NOQUIT = No Quit
751  TKLEXT = Extended TKL we don't use it but best to have it
752  SJB64 = Base64 encoded time stamps
753  VL = Version Info
754  NS = Numeric Server
755 
756 */
758 {
759  if (UseTokens) {
760  if (Numeric) {
761  send_cmd(NULL,
762  "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT SJB64 VL");
763  } else {
764  send_cmd(NULL,
765  "PROTOCTL NICKv2 VHP UMODE2 NICKIP TOKEN SJOIN SJOIN2 SJ3 NOQUIT TKLEXT SJB64");
766  }
767  } else {
768  if (Numeric) {
769  send_cmd(NULL,
770  "PROTOCTL NICKv2 VHP UMODE2 NICKIP SJOIN SJOIN2 SJ3 NOQUIT TKLEXT SJB64 VL");
771  } else {
772  send_cmd(NULL,
773  "PROTOCTL NICKv2 VHP UMODE2 NICKIP SJOIN SJOIN2 SJ3 NOQUIT TKLEXT SJB64");
774  }
775  }
776 }
777 
778 /* PASS */
779 void unreal_cmd_pass(char *pass)
780 {
781  send_cmd(NULL, "PASS :%s", pass);
782 }
783 
784 /* SERVER name hop descript */
785 /* Unreal 3.2 actually sends some info about itself in the descript area */
786 void unreal_cmd_server(char *servname, int hop, char *descript)
787 {
788  if (Numeric) {
789  send_cmd(NULL, "SERVER %s %d :U0-*-%s %s", servname, hop, Numeric,
790  descript);
791  } else {
792  send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
793  }
794 }
795 
796 /* PONG */
797 void unreal_cmd_pong(char *servname, char *who)
798 {
799  send_cmd(servname, "%s %s", send_token("PONG", "9"), who);
800 }
801 
802 /* JOIN */
803 void unreal_cmd_join(char *user, char *channel, time_t chantime)
804 {
805  send_cmd(ServerName, "%s !%s %s :%s",
806  send_token("SJOIN", "~"), base64enc((long int) chantime),
807  channel, user);
808  /* send_cmd(user, "%s %s", send_token("JOIN", "C"), channel); */
809 }
810 
811 /* unsqline
812 ** parv[0] = sender
813 ** parv[1] = nickmask
814 */
815 void unreal_cmd_unsqline(char *user)
816 {
817  if (!user) {
818  return;
819  }
820  send_cmd(NULL, "%s %s", send_token("UNSQLINE", "d"), user);
821 }
822 
823 /* CHGHOST */
824 void unreal_cmd_chghost(char *nick, char *vhost)
825 {
826  if (!nick || !vhost) {
827  return;
828  }
829  send_cmd(ServerName, "%s %s %s", send_token("CHGHOST", "AL"), nick,
830  vhost);
831 }
832 
833 /* CHGIDENT */
834 void unreal_cmd_chgident(char *nick, char *vIdent)
835 {
836  if (!nick || !vIdent) {
837  return;
838  }
839  send_cmd(ServerName, "%s %s %s", send_token("CHGIDENT", "AZ"), nick,
840  vIdent);
841 }
842 
843 /* INVITE */
844 void unreal_cmd_invite(char *source, char *chan, char *nick)
845 {
846  if (!source || !chan || !nick) {
847  return;
848  }
849 
850  send_cmd(source, "%s %s %s", send_token("INVITE", "*"), nick, chan);
851 }
852 
853 /* PART */
854 void unreal_cmd_part(char *nick, char *chan, char *buf)
855 {
856  if (!nick || !chan) {
857  return;
858  }
859 
860  if (buf) {
861  send_cmd(nick, "%s %s :%s", send_token("PART", "D"), chan, buf);
862  } else {
863  send_cmd(nick, "%s %s", send_token("PART", "D"), chan);
864  }
865 }
866 
867 /* 391 RPL_TIME ":%s 391 %s %s :%s" */
868 void unreal_cmd_391(char *source, char *timestr)
869 {
870  if (!timestr) {
871  return;
872  }
873  send_cmd(ServerName, "391 %s %s :%s", source, ServerName, timestr);
874 }
875 
876 /* 250 */
877 void unreal_cmd_250(char *buf)
878 {
879  if (!buf) {
880  return;
881  }
882 
883  send_cmd(NULL, "250 %s", buf);
884 }
885 
886 /* 307 */
887 void unreal_cmd_307(char *buf)
888 {
889  if (!buf) {
890  return;
891  }
892 
893  send_cmd(ServerName, "307 %s", buf);
894 }
895 
896 /* 311 */
897 void unreal_cmd_311(char *buf)
898 {
899  if (!buf) {
900  return;
901  }
902 
903  send_cmd(ServerName, "311 %s", buf);
904 }
905 
906 /* 312 */
907 void unreal_cmd_312(char *buf)
908 {
909  if (!buf) {
910  return;
911  }
912 
913  send_cmd(ServerName, "312 %s", buf);
914 }
915 
916 /* 317 */
917 void unreal_cmd_317(char *buf)
918 {
919  if (!buf) {
920  return;
921  }
922 
923  send_cmd(ServerName, "317 %s", buf);
924 }
925 
926 /* 219 */
927 void unreal_cmd_219(char *source, char *letter)
928 {
929  if (!source) {
930  return;
931  }
932 
933  if (letter) {
934  send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
935  *letter);
936  } else {
937  send_cmd(NULL, "219 %s l :End of /STATS report.", source);
938  }
939 }
940 
941 /* 401 */
942 void unreal_cmd_401(char *source, char *who)
943 {
944  if (!source || !who) {
945  return;
946  }
947  send_cmd(ServerName, "401 %s %s :No such service.", source, who);
948 }
949 
950 /* 318 */
951 void unreal_cmd_318(char *source, char *who)
952 {
953  if (!source || !who) {
954  return;
955  }
956 
957  send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
958 }
959 
960 /* 242 */
961 void unreal_cmd_242(char *buf)
962 {
963  if (!buf) {
964  return;
965  }
966 
967  send_cmd(NULL, "242 %s", buf);
968 }
969 
970 /* 243 */
971 void unreal_cmd_243(char *buf)
972 {
973  if (!buf) {
974  return;
975  }
976 
977  send_cmd(NULL, "243 %s", buf);
978 }
979 
980 /* 211 */
981 void unreal_cmd_211(char *buf)
982 {
983  if (!buf) {
984  return;
985  }
986 
987  send_cmd(NULL, "211 %s", buf);
988 }
989 
990 /* GLOBOPS */
991 void unreal_cmd_global(char *source, char *buf)
992 {
993  if (!buf) {
994  return;
995  }
996 
997  send_cmd(source ? source : ServerName, "%s :%s",
998  send_token("GLOBOPS", "]"), buf);
999 }
1000 
1001 /* GLOBOPS - to handle old WALLOPS */
1002 void unreal_cmd_global_legacy(char *source, char *fmt)
1003 {
1004  send_cmd(source ? source : ServerName, "%s :%s",
1005  send_token("GLOBOPS", "]"), fmt);
1006 }
1007 
1008 /* SQLINE */
1009 /*
1010 ** parv[0] = sender
1011 ** parv[1] = nickmask
1012 ** parv[2] = reason
1013 **
1014 ** - Unreal will translate this to TKL for us
1015 **
1016 */
1017 void unreal_cmd_sqline(char *mask, char *reason)
1018 {
1019  if (!mask || !reason) {
1020  return;
1021  }
1022 
1023  send_cmd(NULL, "%s %s :%s", send_token("SQLINE", "c"), mask, reason);
1024 }
1025 
1026 /* SQUIT */
1027 void unreal_cmd_squit(char *servname, char *message)
1028 {
1029  if (!servname || !message) {
1030  return;
1031  }
1032 
1033  send_cmd(NULL, "%s %s :%s", send_token("SQUIT", "-"), servname,
1034  message);
1035 }
1036 
1037 /*
1038 ** svso
1039 ** parv[0] = sender prefix
1040 ** parv[1] = nick
1041 ** parv[2] = options
1042 */
1043 void unreal_cmd_svso(char *source, char *nick, char *flag)
1044 {
1045  if (!source || !nick || !flag) {
1046  return;
1047  }
1048 
1049  send_cmd(source, "%s %s %s", send_token("SVSO", "BB"), nick, flag);
1050 }
1051 
1052 /* NICK <newnick> */
1053 void unreal_cmd_chg_nick(char *oldnick, char *newnick)
1054 {
1055  if (!oldnick || !newnick) {
1056  return;
1057  }
1058 
1059  send_cmd(oldnick, "%s %s %ld", send_token("NICK", "&"), newnick,
1060  (long int) time(NULL));
1061 }
1062 
1063 /* SVSNICK */
1064 /*
1065 ** parv[0] = sender
1066 ** parv[1] = old nickname
1067 ** parv[2] = new nickname
1068 ** parv[3] = timestamp
1069 */
1070 void unreal_cmd_svsnick(char *source, char *guest, time_t when)
1071 {
1072  if (!source || !guest) {
1073  return;
1074  }
1075  send_cmd(NULL, "%s %s %s :%ld", send_token("SVSNICK", "e"), source,
1076  guest, (long int) when);
1077 }
1078 
1079 /* Functions that use serval cmd functions */
1080 
1081 void unreal_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
1082 {
1083  if (!nick) {
1084  return;
1085  }
1086  if (vIdent) {
1087  unreal_cmd_chgident(nick, vIdent);
1088  }
1089  unreal_cmd_chghost(nick, vhost);
1090 }
1091 
1093 {
1094  if (Numeric) {
1095  me_server =
1097  } else {
1098  me_server =
1100  }
1101 
1102  unreal_cmd_capab();
1103  if (servernum == 1) {
1105  }
1106  if (servernum == 2) {
1108  }
1109  if (servernum == 3) {
1111  }
1113 }
1114 
1116 {
1117  /* Not used */
1118 }
1119 
1120 /* Events */
1121 
1122 int anope_event_ping(char *source, int ac, char **av)
1123 {
1124  if (ac < 1)
1125  return MOD_CONT;
1126  unreal_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]);
1127  return MOD_CONT;
1128 }
1129 
1130 void unreal_cmd_netinfo(int ac, char **av)
1131 {
1132  send_cmd(NULL, "%s %ld %ld %d %s 0 0 0 :%s",
1133  send_token("NETINFO", "AO"), (long int) maxusercnt,
1134  (long int) time(NULL), atoi(av[2]), av[3], av[7]);
1135 }
1136 
1137 /* netinfo
1138  * argv[0] = max global count
1139  * argv[1] = time of end sync
1140  * argv[2] = unreal protocol using (numeric)
1141  * argv[3] = cloak-crc (> u2302)
1142  * argv[4] = free(**)
1143  * argv[5] = free(**)
1144  * argv[6] = free(**)
1145  * argv[7] = ircnet
1146  */
1147 int anope_event_netinfo(char *source, int ac, char **av)
1148 {
1149  unreal_cmd_netinfo(ac, av);
1150  return MOD_CONT;
1151 }
1152 
1153 
1154 /* TKL
1155  * add: remove: spamfilter: spamfilter+TKLEXT sqline:
1156  * parv[ 1]: + - +/- + +/-
1157  * parv[ 2]: type type type type type
1158  * parv[ 3]: user user target target hold
1159  * parv[ 4]: host host action action host
1160  * parv[ 5]: setby removedby (un)setby setby setby
1161  * parv[ 6]: expire_at expire_at (0) expire_at (0) expire_at
1162  * parv[ 7]: set_at set_at set_at set_at
1163  * parv[ 8]: reason regex tkl duration reason
1164  * parv[ 9]: tkl reason [A]
1165  * parv[10]: regex
1166  *
1167 */
1168 int anope_event_tkl(char *source, int ac, char **av)
1169 {
1170  return MOD_CONT;
1171 }
1172 
1173 int anope_event_eos(char *source, int ac, char **av)
1174 {
1175  Server *s;
1176  s = findserver(servlist, source);
1177  /* If we found a server with the given source, that one just
1178  * finished bursting. If there was no source, then our uplink
1179  * server finished bursting. -GD
1180  */
1181  if (!s && serv_uplink)
1182  s = serv_uplink;
1183  finish_sync(s, 1);
1184  return MOD_CONT;
1185 }
1186 
1187 int anope_event_436(char *source, int ac, char **av)
1188 {
1189  if (ac < 1)
1190  return MOD_CONT;
1191 
1192  m_nickcoll(av[0]);
1193  return MOD_CONT;
1194 }
1195 
1196 /*
1197 ** away
1198 ** parv[0] = sender prefix
1199 ** parv[1] = away message
1200 */
1201 int anope_event_away(char *source, int ac, char **av)
1202 {
1203  if (!source) {
1204  return MOD_CONT;
1205  }
1206  m_away(source, (ac ? av[0] : NULL));
1207  return MOD_CONT;
1208 }
1209 
1210 /*
1211 ** m_topic
1212 ** parv[0] = sender prefix
1213 ** parv[1] = topic text
1214 **
1215 ** For servers using TS:
1216 ** parv[0] = sender prefix
1217 ** parv[1] = channel name
1218 ** parv[2] = topic nickname
1219 ** parv[3] = topic time
1220 ** parv[4] = topic text
1221 */
1222 int anope_event_topic(char *source, int ac, char **av)
1223 {
1224  if (ac != 4)
1225  return MOD_CONT;
1226  do_topic(source, ac, av);
1227  return MOD_CONT;
1228 }
1229 
1230 int anope_event_squit(char *source, int ac, char **av)
1231 {
1232  if (ac != 2)
1233  return MOD_CONT;
1234  do_squit(source, ac, av);
1235  return MOD_CONT;
1236 }
1237 
1238 int anope_event_quit(char *source, int ac, char **av)
1239 {
1240  if (ac != 1)
1241  return MOD_CONT;
1242  do_quit(source, ac, av);
1243  return MOD_CONT;
1244 }
1245 
1246 int anope_event_pass(char *source, int ac, char **av)
1247 {
1248  return MOD_CONT;
1249 }
1250 
1251 
1252 int anope_event_mode(char *source, int ac, char **av)
1253 {
1254  if (ac < 2)
1255  return MOD_CONT;
1256 
1257  if (*av[0] == '#' || *av[0] == '&') {
1258  do_cmode(source, ac, av);
1259  } else {
1260  do_umode(source, ac, av);
1261  }
1262  return MOD_CONT;
1263 }
1264 
1265 /* Unreal sends USER modes with this */
1266 /*
1267  umode2
1268  parv[0] - sender
1269  parv[1] - modes to change
1270 */
1271 int anope_event_umode2(char *source, int ac, char **av)
1272 {
1273  if (ac < 1)
1274  return MOD_CONT;
1275 
1276  do_umode2(source, ac, av);
1277  return MOD_CONT;
1278 }
1279 
1280 int anope_event_kill(char *source, int ac, char **av)
1281 {
1282  if (ac != 2)
1283  return MOD_CONT;
1284 
1285  m_kill(av[0], av[1]);
1286  return MOD_CONT;
1287 }
1288 
1289 int anope_event_kick(char *source, int ac, char **av)
1290 {
1291  if (ac != 3)
1292  return MOD_CONT;
1293  do_kick(source, ac, av);
1294  return MOD_CONT;
1295 }
1296 
1297 
1298 int anope_event_join(char *source, int ac, char **av)
1299 {
1300  if (ac != 1)
1301  return MOD_CONT;
1302  do_join(source, ac, av);
1303  return MOD_CONT;
1304 }
1305 
1306 int anope_event_motd(char *source, int ac, char **av)
1307 {
1308  if (!source) {
1309  return MOD_CONT;
1310  }
1311 
1312  m_motd(source);
1313  return MOD_CONT;
1314 }
1315 
1316 int anope_event_setname(char *source, int ac, char **av)
1317 {
1318  User *u;
1319 
1320  if (ac != 1)
1321  return MOD_CONT;
1322 
1323  u = finduser(source);
1324  if (!u) {
1325  if (debug) {
1326  alog("debug: SETNAME for nonexistent user %s", source);
1327  }
1328  return MOD_CONT;
1329  }
1330 
1331  change_user_realname(u, av[0]);
1332  return MOD_CONT;
1333 }
1334 
1335 int anope_event_chgname(char *source, int ac, char **av)
1336 {
1337  User *u;
1338 
1339  if (ac != 2)
1340  return MOD_CONT;
1341 
1342  u = finduser(av[0]);
1343  if (!u) {
1344  if (debug) {
1345  alog("debug: CHGNAME for nonexistent user %s", av[0]);
1346  }
1347  return MOD_CONT;
1348  }
1349 
1350  change_user_realname(u, av[1]);
1351  return MOD_CONT;
1352 }
1353 
1354 int anope_event_setident(char *source, int ac, char **av)
1355 {
1356  User *u;
1357 
1358  if (ac != 1)
1359  return MOD_CONT;
1360 
1361  u = finduser(source);
1362  if (!u) {
1363  if (debug) {
1364  alog("debug: SETIDENT for nonexistent user %s", source);
1365  }
1366  return MOD_CONT;
1367  }
1368 
1369  change_user_username(u, av[0]);
1370  return MOD_CONT;
1371 }
1372 int anope_event_chgident(char *source, int ac, char **av)
1373 {
1374  User *u;
1375 
1376  if (ac != 2)
1377  return MOD_CONT;
1378 
1379  u = finduser(av[0]);
1380  if (!u) {
1381  if (debug) {
1382  alog("debug: CHGIDENT for nonexistent user %s", av[0]);
1383  }
1384  return MOD_CONT;
1385  }
1386 
1387  change_user_username(u, av[1]);
1388  return MOD_CONT;
1389 }
1390 
1391 int anope_event_sethost(char *source, int ac, char **av)
1392 {
1393  User *u;
1394 
1395  if (ac != 1)
1396  return MOD_CONT;
1397 
1398  u = finduser(source);
1399  if (!u) {
1400  if (debug) {
1401  alog("debug: SETHOST for nonexistent user %s", source);
1402  }
1403  return MOD_CONT;
1404  }
1405 
1406  if (u->mode & UMODE_x)
1407  change_user_host(u, av[0]);
1408  else {
1409  if (u->chost)
1410  free(u->chost);
1411  u->chost = sstrdup(av[0]);
1412  }
1413  return MOD_CONT;
1414 }
1415 
1416 /*
1417 ** NICK - new
1418 ** source = NULL
1419 ** parv[0] = nickname
1420 ** parv[1] = hopcount
1421 ** parv[2] = timestamp
1422 ** parv[3] = username
1423 ** parv[4] = hostname
1424 ** parv[5] = servername
1425 ** if NICK version 1:
1426 ** parv[6] = servicestamp
1427 ** parv[7] = info
1428 ** if NICK version 2:
1429 ** parv[6] = servicestamp
1430 ** parv[7] = umodes
1431 ** parv[8] = virthost, * if none
1432 ** parv[9] = info
1433 ** if NICKIP:
1434 ** parv[9] = ip
1435 ** parv[10] = info
1436 **
1437 ** NICK - change
1438 ** source = oldnick
1439 ** parv[0] = new nickname
1440 ** parv[1] = hopcount
1441 */
1442 /*
1443  do_nick(const char *source, char *nick, char *username, char *host,
1444  char *server, char *realname, time_t ts, uint32 svid,
1445  uint32 ip, char *vhost, char *uid)
1446 */
1447 int anope_event_nick(char *source, int ac, char **av)
1448 {
1449  User *user;
1450 
1451  if (ac != 2) {
1452  if (ac == 7) {
1453  /*
1454  <codemastr> that was a bug that is now fixed in 3.2.1
1455  <codemastr> in some instances it would use the non-nickv2 format
1456  <codemastr> it's sent when a nick collision occurs
1457  - so we have to leave it around for now -TSL
1458  */
1459  do_nick(source, av[0], av[3], av[4], av[5], av[6],
1460  strtoul(av[2], NULL, 10), 0, 0, "*", NULL);
1461 
1462  } else if (ac == 11) {
1463  user = do_nick(source, av[0], av[3], av[4], av[5], av[10],
1464  strtoul(av[2], NULL, 10), strtoul(av[6], NULL,
1465  0),
1466  ntohl(decode_ip(av[9])), av[8], NULL);
1467  if (user)
1468  anope_set_umode(user, 1, &av[7]);
1469 
1470  } else {
1471  /* NON NICKIP */
1472  user = do_nick(source, av[0], av[3], av[4], av[5], av[9],
1473  strtoul(av[2], NULL, 10), strtoul(av[6], NULL,
1474  0), 0, av[8],
1475  NULL);
1476  if (user)
1477  anope_set_umode(user, 1, &av[7]);
1478  }
1479  } else {
1480  do_nick(source, av[0], NULL, NULL, NULL, NULL,
1481  strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
1482  }
1483  return MOD_CONT;
1484 }
1485 
1486 
1487 int anope_event_chghost(char *source, int ac, char **av)
1488 {
1489  User *u;
1490 
1491  if (ac != 2)
1492  return MOD_CONT;
1493 
1494  u = finduser(av[0]);
1495  if (!u) {
1496  if (debug) {
1497  alog("debug: CHGHOST for nonexistent user %s", av[0]);
1498  }
1499  return MOD_CONT;
1500  }
1501 
1502  change_user_host(u, av[1]);
1503  return MOD_CONT;
1504 }
1505 
1506 /* EVENT: SERVER */
1507 int anope_event_server(char *source, int ac, char **av)
1508 {
1509  char *desc;
1510  char *vl;
1511  char *upnumeric;
1512 
1513  if (!stricmp(av[1], "1")) {
1514  uplink = sstrdup(av[0]);
1515  vl = myStrGetToken(av[2], ' ', 0);
1516  upnumeric = myStrGetToken(vl, '-', 2);
1517  desc = myStrGetTokenRemainder(av[2], ' ', 1);
1518  do_server(source, av[0], av[1], desc, upnumeric);
1519  Anope_Free(vl);
1520  Anope_Free(desc);
1521  Anope_Free(upnumeric);
1522  } else {
1523  do_server(source, av[0], av[1], av[2], NULL);
1524  }
1525 
1526  return MOD_CONT;
1527 }
1528 
1529 int anope_event_privmsg(char *source, int ac, char **av)
1530 {
1531  if (ac != 2)
1532  return MOD_CONT;
1533  m_privmsg(source, av[0], av[1]);
1534  return MOD_CONT;
1535 }
1536 
1537 int anope_event_part(char *source, int ac, char **av)
1538 {
1539  if (ac < 1 || ac > 2)
1540  return MOD_CONT;
1541  do_part(source, ac, av);
1542  return MOD_CONT;
1543 }
1544 
1545 int anope_event_whois(char *source, int ac, char **av)
1546 {
1547  if (source && ac >= 1) {
1548  m_whois(source, av[0]);
1549  }
1550  return MOD_CONT;
1551 }
1552 
1553 /* SVSHOLD - set */
1554 void unreal_cmd_svshold(char *nick)
1555 {
1556  send_cmd(NULL, "%s + Q H %s %s %ld %ld :%s", send_token("TKL", "BD"),
1557  nick, ServerName, (long int) time(NULL) + NSReleaseTimeout,
1558  (long int) time(NULL), "Being held for registered user");
1559 }
1560 
1561 /* SVSHOLD - release */
1563 {
1564  send_cmd(NULL, "%s - Q * %s %s", send_token("TKL", "BD"), nick,
1565  ServerName);
1566 }
1567 
1568 /* UNSGLINE */
1569 /*
1570  * SVSNLINE - :realname mask
1571 */
1572 void unreal_cmd_unsgline(char *mask)
1573 {
1574  send_cmd(NULL, "%s - :%s", send_token("SVSNLINE", "BR"), mask);
1575 }
1576 
1577 /* UNSZLINE */
1578 void unreal_cmd_unszline(char *mask)
1579 {
1580  send_cmd(NULL, "%s - Z * %s %s", send_token("TKL", "BD"), mask,
1581  s_OperServ);
1582 }
1583 
1584 /* SZLINE */
1585 void unreal_cmd_szline(char *mask, char *reason, char *whom)
1586 {
1587  send_cmd(NULL, "%s + Z * %s %s %ld %ld :%s", send_token("TKL", "BD"),
1588  mask, whom, (long int) time(NULL) + 86400 * 2,
1589  (long int) time(NULL), reason);
1590 }
1591 
1592 /* SGLINE */
1593 /*
1594  * SVSNLINE + reason_where_is_space :realname mask with spaces
1595 */
1596 void unreal_cmd_sgline(char *mask, char *reason)
1597 {
1598  strnrepl(reason, BUFSIZE, " ", "_");
1599  send_cmd(NULL, "%s + %s :%s", send_token("SVSNLINE", "BR"), reason,
1600  mask);
1601 }
1602 
1603 /* SVSMODE -b */
1604 void unreal_cmd_unban(char *name, char *nick)
1605 {
1606  unreal_cmd_svsmode_chan(name, "-b", nick);
1607 }
1608 
1609 
1610 /* SVSMODE channel modes */
1611 
1612 void unreal_cmd_svsmode_chan(char *name, char *mode, char *nick)
1613 {
1614  if (nick) {
1615  send_cmd(ServerName, "%s %s %s %s", send_token("SVSMODE", "n"),
1616  name, mode, nick);
1617  } else {
1618  send_cmd(ServerName, "%s %s %s", send_token("SVSMODE", "n"), name,
1619  mode);
1620  }
1621 }
1622 
1623 
1624 /* SVSMODE +d */
1625 /* sent if svid is something weird */
1626 void unreal_cmd_svid_umode(char *nick, time_t ts)
1627 {
1628  if (UseSVS2MODE) {
1629  send_cmd(ServerName, "%s %s +d 1", send_token("SVS2MODE", "v"),
1630  nick);
1631  } else {
1632  send_cmd(ServerName, "%s %s +d 1", send_token("SVSMODE", "n"),
1633  nick);
1634  }
1635 }
1636 
1637 /* SVSMODE +d */
1638 /* nc_change was = 1, and there is no na->status */
1640 {
1641  common_svsmode(u, "-r+d", "1");
1642 }
1643 
1644 /* SVSMODE +r */
1645 void unreal_cmd_svid_umode2(User * u, char *ts)
1646 {
1647  if (u->svid != u->timestamp) {
1648  common_svsmode(u, "+rd", ts);
1649  } else {
1650  common_svsmode(u, "+r", NULL);
1651  }
1652 }
1653 
1654 void unreal_cmd_svid_umode3(User * u, char *ts)
1655 {
1656  /* not used */
1657 }
1658 
1659 int anope_event_error(char *source, int ac, char **av)
1660 {
1661  if (av[0]) {
1662  if (debug) {
1663  alog("debug: %s", av[0]);
1664  }
1665  if(strstr(av[0],"No matching link configuration")!=0) {
1666  alog("Error: Your IRCD's link block may not be setup correctly, please check unrealircd.conf");
1667  }
1668  }
1669  return MOD_CONT;
1670 }
1671 
1672 int anope_event_notice(char *source, int ac, char **av)
1673 {
1674  return MOD_CONT;
1675 }
1676 
1677 int anope_event_smo(char *source, int ac, char **av)
1678 {
1679  return MOD_CONT;
1680 }
1681 
1682 /* svsjoin
1683  parv[0] - sender
1684  parv[1] - nick to make join
1685  parv[2] - channel to join
1686  parv[3] - (optional) channel key(s)
1687 */
1688 /* In older Unreal SVSJOIN and SVSNLINE tokens were mixed so SVSJOIN and SVSNLINE are broken
1689  when coming from a none TOKEN'd server
1690 */
1691 void unreal_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
1692 {
1693  if (param) {
1694  send_cmd(source, "%s %s %s :%s", send_token("SVSJOIN", "BX"), nick, chan, param);
1695  } else {
1696  send_cmd(source, "%s %s :%s", send_token("SVSJOIN", "BX"), nick, chan);
1697  }
1698 }
1699 
1700 /* svspart
1701  parv[0] - sender
1702  parv[1] - nick to make part
1703  parv[2] - channel(s) to part
1704 */
1705 void unreal_cmd_svspart(char *source, char *nick, char *chan)
1706 {
1707  send_cmd(source, "%s %s :%s", send_token("SVSPART", "BT"), nick, chan);
1708 }
1709 
1710 int anope_event_globops(char *source, int ac, char **av)
1711 {
1712  return MOD_CONT;
1713 }
1714 
1715 int anope_event_swhois(char *source, int ac, char **av)
1716 {
1717  return MOD_CONT;
1718 }
1719 
1720 int anope_event_rehash(char *source, int ac, char **av)
1721 {
1722  return MOD_CONT;
1723 }
1724 
1725 int anope_event_credits(char *source, int ac, char **av)
1726 {
1727  return MOD_CONT;
1728 }
1729 
1730 int anope_event_admin(char *source, int ac, char **av)
1731 {
1732  return MOD_CONT;
1733 }
1734 
1735 int anope_event_sdesc(char *source, int ac, char **av)
1736 {
1737  Server *s;
1738  s = findserver(servlist, source);
1739 
1740  if (s) {
1741  s->desc = av[0];
1742  }
1743 
1744  return MOD_CONT;
1745 }
1746 
1747 int anope_event_sjoin(char *source, int ac, char **av)
1748 {
1749  do_sjoin(source, ac, av);
1750  return MOD_CONT;
1751 }
1752 
1753 void unreal_cmd_swhois(char *source, char *who, char *mask)
1754 {
1755  send_cmd(source, "%s %s :%s", send_token("SWHOIS", "BA"), who, mask);
1756 }
1757 
1759 {
1760  send_cmd(ServerName, "%s", send_token("EOS", "ES"));
1761 }
1762 
1763 /* svswatch
1764  * parv[0] - sender
1765  * parv[1] - target nick
1766  * parv[2] - parameters
1767  */
1768 void unreal_cmd_svswatch(char *sender, char *nick, char *parm)
1769 {
1770  send_cmd(sender, "%s %s :%s", send_token("SVSWATCH", "Bw"), nick,
1771  parm);
1772 }
1773 
1774 /* check if +f mode is valid for the ircd */
1775 /* borrowed part of the new check from channels.c in Unreal */
1776 int unreal_flood_mode_check(char *value)
1777 {
1778  char *dp, *end;
1779  /* NEW +F */
1780  char xbuf[256], *p, *p2, *x = xbuf + 1;
1781  int v;
1782 
1783  if (!value) {
1784  return 0;
1785  }
1786 
1787  if (*value != ':'
1788  && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
1789  && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
1790  && (*end == 0)) {
1791  return 1;
1792  } else {
1793  /* '['<number><1 letter>[optional: '#'+1 letter],[next..]']'':'<number> */
1794  strncpy(xbuf, value, sizeof(xbuf));
1795  p2 = strchr(xbuf + 1, ']');
1796  if (!p2) {
1797  return 0;
1798  }
1799  *p2 = '\0';
1800  if (*(p2 + 1) != ':') {
1801  return 0;
1802  }
1803  for (x = strtok(xbuf + 1, ","); x; x = strtok(NULL, ",")) {
1804  /* <number><1 letter>[optional: '#'+1 letter] */
1805  p = x;
1806  while (isdigit(*p)) {
1807  p++;
1808  }
1809  if ((*p == '\0')
1810  || !((*p == 'c') || (*p == 'j') || (*p == 'k')
1811  || (*p == 'm') || (*p == 'n') || (*p == 't'))) {
1812  continue; /* continue instead of break for forward compatability. */
1813  }
1814  *p = '\0';
1815  v = atoi(x);
1816  if ((v < 1) || (v > 999)) {
1817  return 0;
1818  }
1819  p++;
1820  }
1821  return 1;
1822  }
1823 }
1824 
1825 void unreal_cmd_jupe(char *jserver, char *who, char *reason)
1826 {
1827  char rbuf[256];
1828 
1829  snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
1830  reason ? ": " : "", reason ? reason : "");
1831 
1832  if (findserver(servlist, jserver))
1833  {
1834  unreal_cmd_squit(jserver, rbuf);
1835  do_squit(who, 1, &jserver);
1836  }
1837  unreal_cmd_server(jserver, 2, rbuf);
1838  new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
1839 }
1840 
1841 /*
1842  1 = valid nick
1843  0 = nick is in valid
1844 */
1845 int unreal_valid_nick(char *nick)
1846 {
1847  if (!stricmp("ircd", nick)) {
1848  return 0;
1849  }
1850  if (!stricmp("irc", nick)) {
1851  return 0;
1852  }
1853  return 1;
1854 }
1855 
1856 int unreal_valid_chan(char *chan) {
1857  if (strchr(chan, ':')) {
1858  return 0;
1859  }
1860  return 1;
1861 }
1862 
1863 void unreal_cmd_ctcp(char *source, char *dest, char *buf)
1864 {
1865  char *s;
1866  if (!buf) {
1867  return;
1868  } else {
1869  s = normalizeBuffer(buf);
1870  }
1871 
1872  send_cmd(source, "%s %s :\1%s \1", send_token("NOTICE", "B"), dest, s);
1873  free(s);
1874 }
1875 
1877 {
1878  char *tempValue, *one, *two;
1879  int param1, param2;
1880 
1881  if (!value)
1882  return 0;
1883 
1884  tempValue = sstrdup(value);
1885  one = strtok(tempValue, ":");
1886  two = strtok(NULL, "");
1887  if (one && two) {
1888  param1 = atoi(one);
1889  param2 = atoi(two);
1890  if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999)) {
1891  free(tempValue);
1892  return 1;
1893  }
1894  }
1895  free(tempValue);
1896  return 0;
1897 }
1898 
1899 /* *INDENT-OFF* */
1900 void moduleAddIRCDMsgs(void) {
1901  Message *m;
1902 
1903  updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a");
1904 
1911  if (UseTokens) {
1913  }
1915  if (UseTokens) {
1917  }
1919  if (UseTokens) {
1921  }
1923  if (UseTokens) {
1925  }
1927  if (UseTokens) {
1929  }
1931  if (UseTokens) {
1933  }
1935  if (UseTokens) {
1937  }
1939  if (UseTokens) {
1941  }
1943  if (UseTokens) {
1945  }
1947  if (UseTokens) {
1949  }
1951  if (UseTokens) {
1953  }
1955  if (UseTokens) {
1957  }
1959  if (UseTokens) {
1961  }
1963  if (UseTokens) {
1965  }
1967  if (UseTokens) {
1969  }
1971  if (UseTokens) {
1973  }
1974  m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
1975  if (UseTokens) {
1977  }
1978  m = createMessage("SVS2MODE", anope_event_mode); addCoreMessage(IRCD,m);
1979  if (UseTokens) {
1981  }
1983  if (UseTokens) {
1985  }
1986  m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
1987  if (UseTokens) {
1989  }
1991  if (UseTokens) {
1993  }
1995  if (UseTokens) {
1997  }
1999  if (UseTokens) {
2001  }
2002  m = createMessage("GNOTICE", anope_event_null); addCoreMessage(IRCD,m);
2003  if (UseTokens) {
2005  }
2007  if (UseTokens) {
2009  }
2011  if (UseTokens) {
2013  }
2014  m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
2015  if (UseTokens) {
2017  }
2018  m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
2019  if (UseTokens) {
2021  }
2022  m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
2023  if (UseTokens) {
2025  }
2026  m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
2027  if (UseTokens) {
2029  }
2031  if (UseTokens) {
2033  }
2034  m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
2035  if (UseTokens) {
2037  }
2038  m = createMessage("PROTOCTL", anope_event_capab); addCoreMessage(IRCD,m);
2039  if (UseTokens) {
2041  }
2043  if (UseTokens) {
2045  }
2047  if (UseTokens) {
2049  }
2051  if (UseTokens) {
2053  }
2055  if (UseTokens) {
2057  }
2059  if (UseTokens) {
2061  }
2063  if (UseTokens) {
2065  }
2067  if (UseTokens) {
2069  }
2071  if (UseTokens) {
2073  }
2075  if (UseTokens) {
2077  }
2079  if (UseTokens) {
2081  }
2083  if (UseTokens) {
2085  }
2087  if (UseTokens) {
2089  }
2091  if (UseTokens) {
2093  }
2095  if (UseTokens) {
2097  }
2099  if (UseTokens) {
2101  }
2103  if (UseTokens) {
2105  }
2107  if (UseTokens) {
2109  }
2111  if (UseTokens) {
2113  }
2115  if (UseTokens) {
2117  }
2119  if (UseTokens) {
2121  }
2123  if (UseTokens) {
2125  }
2127  if (UseTokens) {
2129  }
2131  if (UseTokens) {
2133  }
2135  if (UseTokens) {
2137  }
2138  m = createMessage("SENDSNO", anope_event_null); addCoreMessage(IRCD,m);
2139  if (UseTokens) {
2141  }
2142  m = createMessage("SENDUMODE", anope_event_null); addCoreMessage(IRCD,m);
2143  if (UseTokens) {
2145  }
2146 
2147  /* The none token version of these is in messages.c */
2148  if (UseTokens) {
2149  m = createMessage("2", m_stats); addCoreMessage(IRCD,m);
2150  m = createMessage(">", m_time); addCoreMessage(IRCD,m);
2152  }
2153 }
2154 
2155 /* *INDENT-ON* */
2156 
2162 {
2239 }
2240 
2244 int AnopeInit(int argc, char **argv)
2245 {
2246 
2247  moduleAddAuthor("Anope");
2248  moduleAddVersion(VERSION_STRING);
2250 
2251  pmodule_ircd_version("UnrealIRCd 3.2+");
2252  pmodule_ircd_cap(myIrcdcap);
2253  pmodule_ircd_var(myIrcd);
2254  pmodule_ircd_cbmodeinfos(myCbmodeinfos);
2255  pmodule_ircd_cumodes(myCumodes);
2258  pmodule_ircd_cbmodes(myCbmodes);
2259  pmodule_ircd_cmmodes(myCmmodes);
2262 
2272 
2275 
2276  return MOD_CONT;
2277 }
int anope_event_kill(char *source, int ac, char **av)
Definition: unreal32.c:1280
E void pmodule_cmd_vhost_off(void(*func)(User *u))
Definition: ircd.c:713
int anope_event_motd(char *source, int ac, char **av)
Definition: unreal32.c:1306
E void pmodule_permchan_mode(int mode)
Definition: ircd.c:1206
E void set_redirect(Channel *chan, char *value)
Definition: channels.c:2022
int anope_event_rehash(char *source, int ac, char **av)
Definition: unreal32.c:1720
void moduleAddAnopeCmds()
Definition: unreal32.c:2161
E int32 opcnt
Definition: extern.h:1140
int anope_event_pass(char *source, int ac, char **av)
Definition: unreal32.c:1246
E char * RemotePassword3
Definition: extern.h:270
E void pmodule_cmd_svspart(void(*func)(char *source, char *nick, char *chan))
Definition: ircd.c:1056
#define Anope_Free(x)
Definition: extern.h:1391
E void do_topic(const char *source, int ac, char **av)
Definition: channels.c:1249
E void do_server(const char *source, char *servername, char *hops, char *descript, char *numeric)
Definition: servers.c:360
E void pmodule_cmd_notice2(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:798
int anope_event_whois(char *source, int ac, char **av)
Definition: unreal32.c:1545
#define CMODE_z
Definition: charybdis.h:40
E char * RemotePassword
Definition: extern.h:264
int anope_event_sjoin(char *source, int ac, char **av)
Definition: unreal32.c:1747
int anope_event_away(char *source, int ac, char **av)
Definition: unreal32.c:1201
int unreal_valid_nick(char *nick)
Definition: unreal32.c:1845
int nickip
Definition: services.h:340
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
Definition: ircd.c:827
int anope_event_ping(char *source, int ac, char **av)
Definition: unreal32.c:1122
#define UMODE_R
Definition: bahamut.h:42
#define CMODE_T
Definition: inspircd12.h:52
int anope_event_436(char *source, int ac, char **av)
Definition: unreal32.c:1187
char nick[NICKMAX]
Definition: services.h:875
E void do_squit(const char *source, int ac, char **av)
Definition: servers.c:398
E int snprintf(char *buf, size_t size, const char *fmt,...)
Definition: compat.c:37
E int m_time(char *source, int ac, char **av)
Definition: messages.c:71
E int anope_event_null(char *source, int ac, char **av)
Definition: messages.c:441
E void pmodule_cmd_351(void(*func)(char *source))
Definition: ircd.c:832
E void cs_set_throttle(ChannelInfo *ci, char *value)
Definition: chanserv.c:2520
MDE void updateProtectDetails(char *level_info_protect_word, char *level_info_protectme_word, char *fant_protect_add, char *fant_protect_del, char *level_protect_word, char *protect_set_mode, char *protect_unset_mode)
Definition: modules.c:2512
void moduleAddIRCDMsgs(void)
Definition: unreal32.c:1900
#define CAPAB_NICKCHARS
Definition: services.h:1396
#define UMODE_w
Definition: bahamut.h:21
int unreal_jointhrottle_mode_check(char *value)
Definition: unreal32.c:1876
#define CBM_MINUS_NO_ARG
Definition: services.h:928
int anope_event_capab(char *source, int ac, char **av)
Definition: unreal32.c:508
E void change_user_username(User *user, const char *username)
Definition: users.c:170
E char * s_BotServ
Definition: extern.h:287
E uint32 maxusercnt
Definition: extern.h:1141
void unreal_cmd_svspart(char *source, char *nick, char *chan)
Definition: unreal32.c:1705
E void pmodule_cmd_nick(void(*func)(char *nick, char *name, char *modes))
Definition: ircd.c:756
E void chan_set_key(Channel *chan, char *value)
Definition: channels.c:1998
E void pmodule_ircd_cmmodes(CMMode modes[128])
Definition: ircd.c:1143
E void do_kick(const char *source, int ac, char **av)
Definition: channels.c:638
E void pmodule_cmd_372_error(void(*func)(char *source))
Definition: ircd.c:741
E void do_umode2(const char *source, int ac, char **av)
Definition: users.c:834
#define CMODE_p
Definition: bahamut.h:47
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
Definition: modules.c:1597
int anope_event_globops(char *source, int ac, char **av)
Definition: unreal32.c:1710
E void pmodule_valid_nick(int(*func)(char *nick))
Definition: ircd.c:1082
#define CAPAB_NOQUIT
Definition: services.h:1366
E void cs_set_limit(ChannelInfo *ci, char *value)
Definition: chanserv.c:2558
int anope_event_join(char *source, int ac, char **av)
Definition: unreal32.c:1298
void unreal_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: unreal32.c:547
int anope_event_setname(char *source, int ac, char **av)
Definition: unreal32.c:1316
E int nick_identified(User *u)
Definition: nickserv.c:1111
int anope_event_part(char *source, int ac, char **av)
Definition: unreal32.c:1537
E void pmodule_cmd_kick(void(*func)(char *source, char *chan, char *user, char *buf))
Definition: ircd.c:780
E void send_cmd(const char *source, const char *fmt,...) FORMAT(printf
char * vhost
Definition: services.h:880
E void pmodule_cmd_vhost_on(void(*func)(char *nick, char *vIdent, char *vhost))
Definition: ircd.c:966
E void pmodule_cmd_svsjoin(void(*func)(char *source, char *nick, char *chan, char *param))
Definition: ircd.c:1048
#define CBM_NO_MLOCK
Definition: services.h:929
E void pmodule_cmd_swhois(void(*func)(char *source, char *who, char *mask))
Definition: ircd.c:1061
void unreal_cmd_netinfo(int ac, char **av)
Definition: unreal32.c:1130
E void pmodule_cmd_pong(void(*func)(char *servname, char *who))
Definition: ircd.c:842
void unreal_set_umode(User *user, int ac, char **av)
Definition: unreal32.c:422
E void pmodule_cmd_307(void(*func)(char *buf))
Definition: ircd.c:879
E char * get_limit(Channel *chan)
Definition: channels.c:1881
int unreal_valid_chan(char *chan)
Definition: unreal32.c:1856
E void pmodule_cmd_211(void(*func)(char *buf))
Definition: ircd.c:924
void unreal_cmd_join(char *user, char *channel, time_t chantime)
Definition: unreal32.c:803
E void pmodule_cmd_unsqline(void(*func)(char *user))
Definition: ircd.c:853
E void pmodule_cmd_sgline(void(*func)(char *mask, char *reason))
Definition: ircd.c:1007
E int stricmp(const char *s1, const char *s2)
Definition: compat.c:58
E void pmodule_set_umode(void(*func)(User *user, int ac, char **av))
Definition: ircd.c:1077
char * chost
Definition: services.h:881
E void pmodule_ircd_cap(IRCDCAPAB *cap)
Definition: ircd.c:1102
E char * myStrGetTokenRemainder(const char *str, const char dilim, int token_number)
Definition: misc.c:720
#define CMODE_l
Definition: bahamut.h:51
char * name
Definition: services.h:277
#define CMODE_N
Definition: inspircd11.h:48
E void pmodule_cmd_nc_change(void(*func)(User *u))
Definition: ircd.c:1028
E void pmodule_cmd_372(void(*func)(char *source, char *msg))
Definition: ircd.c:736
void unreal_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: unreal32.c:532
void unreal_cmd_svsnoop(char *server, int set)
Definition: unreal32.c:515
int anope_event_squit(char *source, int ac, char **av)
Definition: unreal32.c:1230
void unreal_cmd_401(char *source, char *who)
Definition: unreal32.c:942
E char * ServerDesc
Definition: extern.h:275
E void pmodule_cmd_bob(void(*func)())
Definition: ircd.c:976
#define CMODE_C
Definition: inspircd11.h:45
E void pmodule_ircd_flood_mode_char_remove(char *mode)
Definition: ircd.c:1130
void unreal_cmd_svshold(char *nick)
Definition: unreal32.c:1554
E void del_invite(Channel *chan, char *mask)
Definition: channels.c:1833
uint32 svid
Definition: services.h:888
E void pmodule_cmd_ctcp(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:1043
E void pmodule_cmd_invite(void(*func)(char *source, char *chan, char *nick))
Definition: ircd.c:859
void unreal_cmd_318(char *source, char *who)
Definition: unreal32.c:951
void unreal_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: unreal32.c:714
#define CMODE_M
Definition: bahamut.h:55
E void pmodule_ircd_var(IRCDVar *ircdvar)
Definition: ircd.c:1097
void unreal_cmd_global_legacy(char *source, char *fmt)
Definition: unreal32.c:1002
E void do_umode(const char *source, int ac, char **av)
Definition: users.c:816
E int UnRestrictSAdmin
Definition: extern.h:363
#define CAPAB_NICKIP
Definition: services.h:1369
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
Definition: modules.c:1470
int anope_event_admin(char *source, int ac, char **av)
Definition: unreal32.c:1730
void unreal_cmd_svsadmin(char *server, int set)
Definition: unreal32.c:521
E void add_invite(Channel *chan, char *mask)
Definition: channels.c:1402
#define CUS_VOICE
Definition: services.h:1342
#define IRCD
Definition: modules.h:63
#define UMODE_g
Definition: bahamut.h:35
#define CMODE_A
Definition: inspircd11.h:35
void unreal_cmd_bot_chan_mode(char *nick, char *chan)
Definition: unreal32.c:719
#define UMODE_i
Definition: bahamut.h:18
#define CAPAB_TOKEN
Definition: services.h:1388
E void pmodule_cmd_svsnoop(void(*func)(char *server, int set))
Definition: ircd.c:696
E void pmodule_cmd_squit(void(*func)(char *servname, char *message))
Definition: ircd.c:944
#define UMODE_W
Definition: inspircd12.h:38
void unreal_cmd_nc_change(User *u)
Definition: unreal32.c:1639
#define CMODE_n
Definition: bahamut.h:46
unsigned long umodes[128]
Definition: unreal32.c:157
#define CMODE_R
Definition: bahamut.h:52
E void pmodule_cmd_unsgline(void(*func)(char *mask))
Definition: ircd.c:991
E char * get_throttle(Channel *chan)
Definition: channels.c:1867
#define UMODE_s
Definition: bahamut.h:29
int anope_event_umode2(char *source, int ac, char **av)
Definition: unreal32.c:1271
void unreal_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: unreal32.c:656
void unreal_cmd_pass(char *pass)
Definition: unreal32.c:779
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void EnforceQlinedNick(char *nick, char *killer)
Definition: misc.c:837
#define CMODE_t
Definition: bahamut.h:49
int anope_event_privmsg(char *source, int ac, char **av)
Definition: unreal32.c:1529
E void notice_lang(char *source, User *dest, int message,...)
Definition: send.c:169
E char * cs_get_key(ChannelInfo *ci)
Definition: chanserv.c:2447
IRCDVar myIrcd[]
Definition: unreal32.c:21
void unreal_cmd_unsqline(char *user)
Definition: unreal32.c:815
CBModeInfo myCbmodeinfos[]
Definition: unreal32.c:343
E void cs_set_redirect(ChannelInfo *ci, char *value)
Definition: chanserv.c:2572
MDE void moduleSetType(MODType type)
Definition: modules.c:818
char * desc
Definition: services.h:856
int AnopeInit(int argc, char **argv)
Definition: unreal32.c:2244
#define CMODE_V
Definition: inspircd11.h:42
void unreal_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: unreal32.c:645
#define CMODE_j
Definition: bahamut.h:56
E void pmodule_cmd_jupe(void(*func)(char *jserver, char *who, char *reason))
Definition: ircd.c:1072
char * botchanumode
Definition: services.h:299
#define UMODE_t
Definition: unreal32.h:31
E void update_host(User *user)
Definition: users.c:104
E void pmodule_cmd_243(void(*func)(char *buf))
Definition: ircd.c:919
int anope_event_notice(char *source, int ac, char **av)
Definition: unreal32.c:1672
E void do_sjoin(const char *source, int ac, char **av)
Definition: channels.c:803
E void anope_set_umode(User *user, int ac, char **av)
Definition: ircd.c:130
E char * sstrdup(const char *s)
Definition: memory.c:105
int anope_event_setident(char *source, int ac, char **av)
Definition: unreal32.c:1354
#define CMODE_u
Definition: inspircd11.h:46
E void do_join(const char *source, int ac, char **av)
Definition: channels.c:556
void unreal_cmd_unban(char *name, char *nick)
Definition: unreal32.c:1604
int anope_event_credits(char *source, int ac, char **av)
Definition: unreal32.c:1725
#define CMODE_Q
Definition: charybdis.h:44
void unreal_cmd_chg_nick(char *oldnick, char *newnick)
Definition: unreal32.c:1053
E int m_nickcoll(char *user)
Definition: messages.c:20
E char * cs_get_redirect(ChannelInfo *ci)
Definition: chanserv.c:2476
E void pmodule_cmd_375(void(*func)(char *source))
Definition: ircd.c:746
E void pmodule_key_mode(int mode)
Definition: ircd.c:1196
E void pmodule_cmd_svsnick(void(*func)(char *source, char *guest, time_t when))
Definition: ircd.c:960
E char * s_OperServ
Definition: extern.h:289
int anope_event_nick(char *source, int ac, char **av)
Definition: unreal32.c:1447
E void pmodule_invis_umode(int mode)
Definition: ircd.c:1171
E void pmodule_cmd_svid_umode2(void(*func)(User *u, char *ts))
Definition: ircd.c:1033
E void pmodule_cmd_chg_nick(void(*func)(char *oldnick, char *newnick))
Definition: ircd.c:954
void unreal_cmd_global(char *source, char *buf)
Definition: unreal32.c:991
E char * ServiceHost
Definition: extern.h:277
#define UMODE_x
Definition: bahamut.h:23
E char * EncModule
Definition: extern.h:580
E void pmodule_invite_cmode(int mode)
Definition: ircd.c:1181
int unreal_flood_mode_check(char *value)
Definition: unreal32.c:1776
E void cs_set_flood(ChannelInfo *ci, char *value)
Definition: chanserv.c:2500
#define CMODE_r
Definition: bahamut.h:53
E void pmodule_cmd_eob(void(*func)())
Definition: ircd.c:1066
#define CMODE_O
Definition: bahamut.h:57
void unreal_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: unreal32.c:1081
E void pmodule_cmd_svid_umode3(void(*func)(User *u, char *ts))
Definition: ircd.c:1038
E void pmodule_cmd_376(void(*func)(char *source))
Definition: ircd.c:751
void unreal_cmd_242(char *buf)
Definition: unreal32.c:961
void unreal_cmd_svid_umode2(User *u, char *ts)
Definition: unreal32.c:1645
void unreal_cmd_391(char *source, char *timestr)
Definition: unreal32.c:868
E char * uplink
Definition: extern.h:35
E char * base64enc(long i)
Definition: base64.c:23
void unreal_cmd_sqline(char *mask, char *reason)
Definition: unreal32.c:1017
E User * finduser(const char *nick)
Definition: users.c:323
#define UMODE_q
Definition: unreal32.h:29
void unreal_cmd_243(char *buf)
Definition: unreal32.c:971
void unreal_cmd_jupe(char *jserver, char *who, char *reason)
Definition: unreal32.c:1825
void unreal_cmd_unszline(char *mask)
Definition: unreal32.c:1578
void unreal_cmd_bob()
Definition: unreal32.c:1115
E int m_kill(char *nick, char *msg)
Definition: messages.c:49
E void pmodule_cmd_part(void(*func)(char *nick, char *chan, char *buf))
Definition: ircd.c:864
E int m_away(char *source, char *msg)
Definition: messages.c:29
int anope_event_sdesc(char *source, int ac, char **av)
Definition: unreal32.c:1735
#define CAPAB_TLKEXT
Definition: services.h:1393
E void set_flood(Channel *chan, char *value)
Definition: channels.c:1972
void unreal_cmd_unsgline(char *mask)
Definition: unreal32.c:1572
void unreal_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: unreal32.c:704
void unreal_cmd_375(char *source)
Definition: unreal32.c:606
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
#define UMODE_a
Definition: bahamut.h:16
E int m_version(char *source, int ac, char **av)
Definition: messages.c:345
E void add_ban(Channel *chan, char *mask)
Definition: channels.c:1338
E void do_part(const char *source, int ac, char **av)
Definition: channels.c:710
#define CUS_HALFOP
Definition: services.h:1343
E void del_ban(Channel *chan, char *mask)
Definition: channels.c:1779
void unreal_cmd_privmsg(char *source, char *dest, char *buf)
Definition: unreal32.c:695
void unreal_cmd_chghost(char *nick, char *vhost)
Definition: unreal32.c:824
void unreal_cmd_svsnick(char *source, char *guest, time_t when)
Definition: unreal32.c:1070
#define CUS_PROTECT
Definition: services.h:1345
E void pmodule_ircd_cumodes(CUMode modes[128])
Definition: ircd.c:1117
int anope_event_netinfo(char *source, int ac, char **av)
Definition: unreal32.c:1147
E const char version_flags[]
Definition: extern.h:771
#define CMODE_f
Definition: charybdis.h:35
int anope_event_topic(char *source, int ac, char **av)
Definition: unreal32.c:1222
void unreal_cmd_quit(char *source, char *buf)
Definition: unreal32.c:733
E char * send_token(char *token1, char *token2)
Definition: misc.c:1095
u_int32_t uint32
Definition: db-merger.c:123
void unreal_cmd_219(char *source, char *letter)
Definition: unreal32.c:927
E void alog(const char *fmt,...) FORMAT(printf
E int servernum
Definition: extern.h:615
void unreal_cmd_211(char *buf)
Definition: unreal32.c:981
int anope_event_chgident(char *source, int ac, char **av)
Definition: unreal32.c:1372
E char * get_redirect(Channel *chan)
Definition: channels.c:1894
int anope_event_sethost(char *source, int ac, char **av)
Definition: unreal32.c:1391
void unreal_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
Definition: unreal32.c:1691
#define MOD_CONT
Definition: modules.h:54
void unreal_cmd_svid_umode(char *nick, time_t ts)
Definition: unreal32.c:1626
E int m_motd(char *source)
Definition: messages.c:97
E void pmodule_cmd_svsmode(void(*func)(User *u, int ac, char **av))
Definition: ircd.c:731
E void do_quit(const char *source, int ac, char **av)
Definition: users.c:854
#define CAPAB_CHANMODE
Definition: services.h:1394
E void pmodule_cmd_bot_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
Definition: ircd.c:773
E void pmodule_private_cmode(int mode)
Definition: ircd.c:1191
E char * cs_get_flood(ChannelInfo *ci)
Definition: chanserv.c:2417
E void display_news(User *u, int16 type)
Definition: news.c:269
#define CAPAB_SSJ3
Definition: services.h:1389
E int UseSVS2MODE
Definition: extern.h:358
void unreal_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: unreal32.c:709
int anope_event_chghost(char *source, int ac, char **av)
Definition: unreal32.c:1487
#define CMODE_K
Definition: inspircd11.h:37
int anope_event_eos(char *source, int ac, char **av)
Definition: unreal32.c:1173
E Server * findserver(Server *s, const char *name)
Definition: servers.c:261
int anope_event_server(char *source, int ac, char **av)
Definition: unreal32.c:1507
void unreal_cmd_svswatch(char *sender, char *nick, char *parm)
Definition: unreal32.c:1768
#define CMODE_G
Definition: inspircd11.h:44
#define UMODE_z
Definition: charybdis.h:18
E void pmodule_cmd_svid_umode(void(*func)(char *nick, time_t ts))
Definition: ircd.c:1023
E int m_privmsg(char *source, char *receiver, char *msg)
Definition: messages.c:130
E void pmodule_ircd_csmodes(char mode[128])
Definition: ircd.c:1151
E void pmodule_cmd_242(void(*func)(char *buf))
Definition: ircd.c:914
E int UseTokens
Definition: extern.h:360
#define NI_MSG
Definition: services.h:1292
E int debug
Definition: extern.h:775
CUMode myCumodes[128]
Definition: unreal32.c:374
void unreal_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: unreal32.c:627
void unreal_cmd_swhois(char *source, char *who, char *mask)
Definition: unreal32.c:1753
E int is_services_admin(User *u)
Definition: operserv.c:591
E void set_limit(Channel *chan, char *value)
Definition: channels.c:2011
#define CAPAB_SJB64
Definition: services.h:1395
void unreal_cmd_317(char *buf)
Definition: unreal32.c:917
E void finish_sync(Server *serv, int sync_links)
Definition: servers.c:531
#define CMODE_L
Definition: charybdis.h:43
E void pmodule_cmd_311(void(*func)(char *buf))
Definition: ircd.c:884
E void pmodule_cmd_join(void(*func)(char *user, char *channel, time_t chantime))
Definition: ircd.c:848
E int m_stats(char *source, int ac, char **av)
Definition: messages.c:253
E int NSDefFlags
Definition: extern.h:377
CMMode myCmmodes[128]
Definition: unreal32.c:230
#define CUS_OWNER
Definition: services.h:1344
E void del_exception(Channel *chan, char *mask)
Definition: channels.c:1808
E void pmodule_cmd_318(void(*func)(char *source, char *who))
Definition: ircd.c:909
E char * s_HostServ
Definition: extern.h:303
void unreal_cmd_nick(char *nick, char *name, char *modes)
Definition: unreal32.c:617
E void pmodule_cmd_250(void(*func)(char *buf))
Definition: ircd.c:874
void unreal_cmd_capab()
Definition: unreal32.c:757
char myCsmodes[128]
Definition: unreal32.c:208
#define UMODE_B
Definition: inspircd12.h:31
IRCDCAPAB myIrcdcap[]
Definition: unreal32.c:120
void unreal_cmd_376(char *source)
Definition: unreal32.c:612
void unreal_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: unreal32.c:666
E void pmodule_ircd_version(char *version)
Definition: ircd.c:1107
void unreal_cmd_szline(char *mask, char *reason, char *whom)
Definition: unreal32.c:1585
E const char version_number[]
Definition: extern.h:767
CBMode myCbmodes[128]
Definition: unreal32.c:277
E char * get_flood(Channel *chan)
Definition: channels.c:1860
#define CMODE_m
Definition: bahamut.h:45
void unreal_cmd_vhost_off(User *u)
Definition: unreal32.c:539
E void pmodule_cmd_unszline(void(*func)(char *mask))
Definition: ircd.c:996
int anope_event_error(char *source, int ac, char **av)
Definition: unreal32.c:1659
E void cs_set_key(ChannelInfo *ci, char *value)
Definition: chanserv.c:2538
void unreal_cmd_part(char *nick, char *chan, char *buf)
Definition: unreal32.c:854
E void anope_cmd_mode(char *source, char *dest, const char *fmt,...)
Definition: ircd.c:211
void unreal_cmd_372_error(char *source)
Definition: unreal32.c:600
E void pmodule_cmd_401(void(*func)(char *source, char *who))
Definition: ircd.c:904
E Server * serv_uplink
Definition: extern.h:1053
E int WallOper
Definition: extern.h:448
E void pmodule_cmd_svso(void(*func)(char *source, char *nick, char *flag))
Definition: ircd.c:949
#define CAPAB_VL
Definition: services.h:1392
E void pmodule_cmd_serv_privmsg(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:821
E void pmodule_cmd_317(void(*func)(char *buf))
Definition: ircd.c:894
E void do_cmode(const char *source, int ac, char **av)
Definition: channels.c:1183
E void pmodule_secret_cmode(int mode)
Definition: ircd.c:1186
E void pmodule_cmd_391(void(*func)(char *source, char *timestr))
Definition: ircd.c:869
E int decode_ip(char *buf)
Definition: base64.c:304
E void pmodule_cmd_remove_akill(void(*func)(char *user, char *host))
Definition: ircd.c:701
E int NSReleaseTimeout
Definition: extern.h:388
E void pmodule_ircd_cbmodes(CBMode modes[128])
Definition: ircd.c:1135
#define SERVER_JUPED
Definition: services.h:866
#define UMODE_C
Definition: ratbox.h:15
void unreal_cmd_ctcp(char *source, char *dest, char *buf)
Definition: unreal32.c:1863
void unreal_cmd_svso(char *source, char *nick, char *flag)
Definition: unreal32.c:1043
E void pmodule_cmd_szline(void(*func)(char *mask, char *reason, char *whom))
Definition: ircd.c:1002
E char * myStrGetToken(const char *str, const char dilim, int token_number)
Definition: misc.c:654
#define UMODE_r
Definition: bahamut.h:20
E void pmodule_cmd_notice_ops(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:787
E void pmodule_cmd_release_svshold(void(*func)(char *nick))
Definition: ircd.c:986
void unreal_cmd_notice2(char *source, char *dest, char *msg)
Definition: unreal32.c:690
void unreal_cmd_release_svshold(char *nick)
Definition: unreal32.c:1562
void unreal_cmd_server(char *servname, int hop, char *descript)
Definition: unreal32.c:786
#define UMODE_N
Definition: plexus3.h:22
#define UMODE_A
Definition: bahamut.h:22
E void add_exception(Channel *chan, char *mask)
Definition: channels.c:1377
int anope_event_quit(char *source, int ac, char **av)
Definition: unreal32.c:1238
void unreal_cmd_mode(char *source, char *dest, char *buf)
Definition: unreal32.c:636
#define CBM_NO_USER_MLOCK
Definition: services.h:930
#define CAPAB_UMODE2
Definition: services.h:1391
void unreal_cmd_svid_umode3(User *u, char *ts)
Definition: unreal32.c:1654
#define UMODE_S
Definition: charybdis.h:23
#define CMODE_k
Definition: bahamut.h:50
E void pmodule_cmd_unban(void(*func)(char *name, char *nick))
Definition: ircd.c:1012
E void pmodule_cmd_notice(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:792
E Server * servlist
Definition: extern.h:1051
#define UMODE_h
Definition: bahamut.h:17
int anope_event_mode(char *source, int ac, char **av)
Definition: unreal32.c:1252
int anope_event_tkl(char *source, int ac, char **av)
Definition: unreal32.c:1168
#define DEFAULT_MLOCK
Definition: bahamut.h:59
E void chan_set_throttle(Channel *chan, char *value)
Definition: channels.c:1985
void unreal_cmd_chgident(char *nick, char *vIdent)
Definition: unreal32.c:834
E void pmodule_cmd_akill(void(*func)(char *user, char *host, char *who, time_t when, time_t expires, char *reason))
Definition: ircd.c:718
void unreal_cmd_remove_akill(char *user, char *host)
Definition: unreal32.c:526
E void capab_parse(int ac, char **av)
Definition: servers.c:451
E int check_valid_op(User *user, Channel *chan, int servermode)
Definition: chanserv.c:1290
E char * cs_get_limit(ChannelInfo *ci)
Definition: chanserv.c:2458
uint32 mode
Definition: services.h:889
E char * cs_get_throttle(ChannelInfo *ci)
Definition: chanserv.c:2432
E void pmodule_cmd_guest_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
Definition: ircd.c:761
E void common_svsmode(User *u, char *modes, char *arg)
Definition: actions.c:228
E char * ServerName
Definition: extern.h:274
#define CMODE_c
Definition: bahamut.h:54
void unreal_cmd_notice(char *source, char *dest, char *buf)
Definition: unreal32.c:676
#define UMODE_G
Definition: inspircd12.h:32
E void pmodule_valid_chan(int(*func)(char *chan))
Definition: ircd.c:1087
E void pmodule_cmd_privmsg(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:804
void unreal_cmd_pong(char *servname, char *who)
Definition: unreal32.c:797
E void pmodule_cmd_svshold(void(*func)(char *nick))
Definition: ircd.c:981
#define SERVER_ISME
Definition: services.h:865
#define CAPAB_NICK2
Definition: services.h:1390
#define UMODE_V
Definition: unreal32.h:38
E void pmodule_cmd_serv_notice(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:816
void unreal_cmd_372(char *source, char *msg)
Definition: unreal32.c:595
E void pmodule_jointhrottle_mode_check(int(*func)(char *value))
Definition: ircd.c:1159
void unreal_cmd_250(char *buf)
Definition: unreal32.c:877
void unreal_cmd_connect(int servernum)
Definition: unreal32.c:1092
E char * get_key(Channel *chan)
Definition: channels.c:1874
E int m_whois(char *source, char *who)
Definition: messages.c:366
E char * RemotePassword2
Definition: extern.h:267
E void pmodule_cmd_topic(void(*func)(char *whosets, char *chan, char *whosetit, char *topic, time_t when))
Definition: ircd.c:706
E void pmodule_cmd_quit(void(*func)(char *source, char *buf))
Definition: ircd.c:837
E char * ServiceUser
Definition: extern.h:276
E Server * me_server
Definition: extern.h:1052
void unreal_cmd_311(char *buf)
Definition: unreal32.c:897
time_t timestamp
Definition: services.h:886
void unreal_cmd_svsmode(User *u, int ac, char **av)
Definition: unreal32.c:576
E void pmodule_ircd_useTSMode(int use)
Definition: ircd.c:1164
void unreal_cmd_eob()
Definition: unreal32.c:1758
E void pmodule_oper_umode(int mode)
Definition: ircd.c:1176
E Server * new_server(Server *uplink, const char *name, const char *desc, uint16 flags, char *suid)
Definition: servers.c:119
#define UMODE_H
Definition: inspircd12.h:33
E void pmodule_flood_mode_check(int(*func)(char *value))
Definition: ircd.c:1092
#define NEWS_OPER
Definition: services.h:1050
E void change_user_realname(User *user, const char *realname)
Definition: users.c:147
E void pmodule_ircd_cbmodeinfos(CBModeInfo *modeinfos)
Definition: ircd.c:1112
void unreal_cmd_svskill(char *source, char *user, char *buf)
Definition: unreal32.c:561
E void pmodule_cmd_sqline(void(*func)(char *mask, char *reason))
Definition: ircd.c:939
E void pmodule_cmd_privmsg2(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:810
int anope_event_chgname(char *source, int ac, char **av)
Definition: unreal32.c:1335
E User * do_nick(const char *source, char *nick, char *username, char *host, char *server, char *realname, time_t ts, uint32 svid, uint32 ip, char *vhost, char *uid)
Definition: users.c:500
E void pmodule_cmd_connect(void(*func)(int servernum))
Definition: ircd.c:971
E void pmodule_cmd_global_legacy(void(*func)(char *source, char *fmt))
Definition: ircd.c:934
E void pmodule_cmd_mode(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:768
int anope_event_kick(char *source, int ac, char **av)
Definition: unreal32.c:1289
#define CAPAB_ZIP
Definition: services.h:1371
E void pmodule_limit_mode(int mode)
Definition: ircd.c:1201
void unreal_cmd_invite(char *source, char *chan, char *nick)
Definition: unreal32.c:844
#define CMODE_i
Definition: bahamut.h:44
void unreal_cmd_351(char *source)
Definition: unreal32.c:725
#define CMODE_S
Definition: hybrid.h:46
E char * Numeric
Definition: extern.h:362
E void pmodule_cmd_svskill(void(*func)(char *source, char *user, char *buf))
Definition: ircd.c:726
E void pmodule_cmd_svsmode_chan(void(*func)(char *name, char *mode, char *nick))
Definition: ircd.c:1018
E void pmodule_ircd_flood_mode_char_set(char *mode)
Definition: ircd.c:1125
#define BUFSIZE
Definition: config.h:47
void unreal_cmd_312(char *buf)
Definition: unreal32.c:907
E void pmodule_cmd_312(void(*func)(char *buf))
Definition: ircd.c:889
E const char version_build[]
Definition: extern.h:769
int anope_event_smo(char *source, int ac, char **av)
Definition: unreal32.c:1677
void unreal_cmd_sgline(char *mask, char *reason)
Definition: unreal32.c:1596
E void change_user_host(User *user, const char *host)
Definition: users.c:129
void unreal_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: unreal32.c:1612
E char * strnrepl(char *s, int32 size, const char *old, const char *new)
Definition: misc.c:144
#define CMODE_s
Definition: bahamut.h:48
#define CUS_OP
Definition: services.h:1341
E char * normalizeBuffer(char *)
Definition: botserv.c:1101
void unreal_cmd_squit(char *servname, char *message)
Definition: unreal32.c:1027
int anope_event_swhois(char *source, int ac, char **av)
Definition: unreal32.c:1715
E void anope_cmd_global(char *source, const char *fmt,...)
Definition: ircd.c:506
E void pmodule_cmd_global(void(*func)(char *source, char *buf))
Definition: ircd.c:929
#define UMODE_d
Definition: bahamut.h:34
#define CUF_PROTECT_BOTSERV
Definition: services.h:956
void unreal_cmd_307(char *buf)
Definition: unreal32.c:887
#define UMODE_O
Definition: bahamut.h:28
#define UMODE_o
Definition: bahamut.h:19
E void pmodule_cmd_219(void(*func)(char *source, char *letter))
Definition: ircd.c:899