Anope IRC Services  Version 1.8
ultimate3.c
Go to the documentation of this file.
1 /* Ultimate IRCD 3 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 #include "services.h"
15 #include "pseudo.h"
16 #include "ultimate3.h"
17 #include "version.h"
18 
20  {"UltimateIRCd 3.0.*", /* ircd name */
21  "+S", /* nickserv mode */
22  "+S", /* chanserv mode */
23  "+S", /* memoserv mode */
24  "+o", /* hostserv mode */
25  "+iS", /* operserv mode */
26  "+S", /* botserv mode */
27  "+Sh", /* helpserv mode */
28  "+iS", /* Dev/Null mode */
29  "+iS", /* Global mode */
30  "+o", /* nickserv alias mode */
31  "+o", /* chanserv alias mode */
32  "+o", /* memoserv alias mode */
33  "+io", /* hostserv alias mode */
34  "+io", /* operserv alias mode */
35  "+o", /* botserv alias mode */
36  "+h", /* helpserv alias mode */
37  "+i", /* Dev/Null alias mode */
38  "+io", /* Global alias mode */
39  "+S", /* Used by BotServ Bots */
40  5, /* Chan Max Symbols */
41  "-ilmnpqstRKAO", /* Modes to Remove */
42  "+o", /* Channel Umode used by Botserv bots */
43  1, /* SVSNICK */
44  1, /* Vhost */
45  0, /* Has Owner */
46  NULL, /* Mode to set for an owner */
47  NULL, /* Mode to unset for an owner */
48  "+a", /* Mode to set for channel admin */
49  "-a", /* Mode to unset for channel admin */
50  "+rd", /* Mode On Reg */
51  NULL, /* Mode on ID for Roots */
52  NULL, /* Mode on ID for Admins */
53  NULL, /* Mode on ID for Opers */
54  "-r+d", /* Mode on UnReg */
55  "+d", /* Mode on Nick Change */
56  1, /* Supports SGlines */
57  1, /* Supports SQlines */
58  1, /* Supports SZlines */
59  1, /* Supports Halfop +h */
60  3, /* Number of server args */
61  0, /* Join 2 Set */
62  0, /* Join 2 Message */
63  1, /* Has exceptions +e */
64  0, /* TS Topic Forward */
65  0, /* TS Topci Backward */
66  UMODE_p, /* Protected Umode */
67  1, /* Has Admin */
68  1, /* Chan SQlines */
69  0, /* Quit on Kill */
70  1, /* SVSMODE unban */
71  0, /* Has Protect */
72  0, /* Reverse */
73  1, /* Chan Reg */
74  CMODE_r, /* Channel Mode */
75  0, /* vidents */
76  0, /* svshold */
77  1, /* time stamp on mode */
78  1, /* NICKIP */
79  0, /* O:LINE */
80  1, /* UMODE */
81  1, /* VHOST ON NICK */
82  0, /* Change RealName */
83  CMODE_K, /* No Knock */
84  CMODE_A, /* Admin Only */
85  DEFAULT_MLOCK, /* Default MLOCK */
86  UMODE_x, /* Vhost Mode */
87  0, /* +f */
88  0, /* +L */
89  0, /* +f Mode */
90  0, /* +L Mode */
91  1, /* On nick change check if they could be identified */
92  1, /* No Knock requires +i */
93  NULL, /* CAPAB Chan Modes */
94  0, /* We support TOKENS */
95  1, /* TOKENS are CASE inSensitive */
96  0, /* TIME STAMPS are BASE64 */
97  0, /* +I support */
98  0, /* SJOIN ban char */
99  0, /* SJOIN except char */
100  0, /* SJOIN invite char */
101  0, /* Can remove User Channel Modes with SVSMODE */
102  1, /* Sglines are enforced */
103  "x", /* vhost char */
104  0, /* ts6 */
105  1, /* support helper umode */
106  0, /* p10 */
107  NULL, /* character set */
108  1, /* reports sync state */
109  0, /* CIDR channelbans */
110  0, /* +j */
111  0, /* +j mode */
112  0, /* Use delayed client introduction. */
113  }
114  ,
115  {NULL}
116 };
117 
119  {
120  CAPAB_NOQUIT, /* NOQUIT */
121  CAPAB_TSMODE, /* TSMODE */
122  CAPAB_UNCONNECT, /* UNCONNECT */
123  0, /* NICKIP */
124  CAPAB_NSJOIN, /* SJOIN */
125  CAPAB_ZIP, /* ZIP */
126  CAPAB_BURST, /* BURST */
127  CAPAB_TS5, /* TS5 */
128  0, /* TS3 */
129  CAPAB_DKEY, /* DKEY */
130  0, /* PT4 */
131  0, /* SCS */
132  0, /* QS */
133  0, /* UID */
134  0, /* KNOCK */
135  CAPAB_CLIENT, /* CLIENT */
136  CAPAB_IPV6, /* IPV6 */
137  CAPAB_SSJ5, /* SSJ5 */
138  0, /* SN2 */
139  0, /* TOKEN */
140  0, /* VHOST */
141  0, /* SSJ3 */
142  0, /* NICK2 */
143  0, /* UMODE2 */
144  0, /* VL */
145  0, /* TLKEXT */
146  CAPAB_DODKEY, /* DODKEY */
147  CAPAB_DOZIP, /* DOZIP */
148  0, 0, 0}
149 };
150 
151 void ultimate3_set_umode(User * user, int ac, char **av)
152 {
153  int add = 1; /* 1 if adding modes, 0 if deleting */
154  char *modes = av[0];
155 
156  ac--;
157 
158  if (debug)
159  alog("debug: Changing mode for %s to %s", user->nick, modes);
160 
161  while (*modes) {
162 
163  /* This looks better, much better than "add ? (do_add) : (do_remove)".
164  * At least this is readable without paying much attention :) -GD
165  */
166  if (add)
167  user->mode |= umodes[(int) *modes];
168  else
169  user->mode &= ~umodes[(int) *modes];
170 
171  switch (*modes++) {
172  case '+':
173  add = 1;
174  break;
175  case '-':
176  add = 0;
177  break;
178  case 'a':
179  if (add && !is_services_oper(user)) {
180  common_svsmode(user, "-a", NULL);
181  user->mode &= ~UMODE_a;
182  }
183  break;
184  case 'P':
185  if (add && !is_services_admin(user)) {
186  common_svsmode(user, "-P", NULL);
187  user->mode &= ~UMODE_P;
188  }
189  break;
190  case 'Z':
191  if (add && !is_services_root(user)) {
192  common_svsmode(user, "-Z", NULL);
193  user->mode &= ~UMODE_Z;
194  }
195  break;
196  case 'd':
197  if (ac == 0) {
198  alog("user: umode +d with no parameter (?) for user %s",
199  user->nick);
200  break;
201  }
202 
203  ac--;
204  av++;
205  user->svid = strtoul(*av, NULL, 0);
206  break;
207  case 'o':
208  if (add) {
209  opcnt++;
210  if (WallOper) {
212  "\2%s\2 is now an IRC operator.",
213  user->nick);
214  }
215  display_news(user, NEWS_OPER);
216  if (is_services_oper(user)) {
217  common_svsmode(user, "+a", NULL);
218  user->mode |= UMODE_a;
219  }
220  if (is_services_admin(user)) {
221  common_svsmode(user, "+P", NULL);
222  user->mode |= UMODE_P;
223  }
224  if (is_services_root(user)) {
225  common_svsmode(user, "+Z", NULL);
226  user->mode |= UMODE_Z;
227  }
228  } else {
229  opcnt--;
230  }
231  break;
232  case 'r':
233  if (add && !nick_identified(user)) {
234  common_svsmode(user, "-r", NULL);
235  user->mode &= ~UMODE_r;
236  }
237  break;
238  case 'x':
239  update_host(user);
240  break;
241  }
242  }
243 }
244 
245 unsigned long umodes[128] = {
246  0, 0, 0, /* Unused */
247  0, 0, 0, /* Unused */
248  0, 0, 0, /* Unused, Unused, Horzontal Tab */
249  0, 0, 0, /* Line Feed, Unused, Unused */
250  0, 0, 0, /* Carriage Return, Unused, Unused */
251  0, 0, 0, /* Unused */
252  0, 0, 0, /* Unused */
253  0, 0, 0, /* Unused */
254  0, 0, 0, /* Unused */
255  0, 0, 0, /* Unused */
256  0, 0, 0, /* Unused, Unused, Space */
257  0, 0, 0, /* ! " # */
258  0, 0, 0, /* $ % & */
259  0, 0, 0, /* ! ( ) */
260  0, 0, 0, /* * + , */
261  0, 0, 0, /* - . / */
262  0, 0, /* 0 1 */
263  0, 0, /* 2 3 */
264  0, 0, /* 4 5 */
265  0, 0, /* 6 7 */
266  0, 0, /* 8 9 */
267  0, 0, /* : ; */
268  0, 0, 0, /* < = > */
269  0, 0, /* ? @ */
270  UMODE_A, 0, 0, /* A B C */
271  UMODE_D, 0, 0, /* D E F */
272  0, 0, 0, /* G H I */
273  0, 0, 0, /* J K L */
274  0, 0, UMODE_0, /* M N O */
275  UMODE_P, 0, UMODE_R, /* P Q R */
276  UMODE_S, 0, 0, /* S T U */
277  0, UMODE_W, 0, /* V W X */
278  0, /* Y */
279  UMODE_Z, /* Z */
280  0, 0, 0, /* [ \ ] */
281  0, 0, 0, /* ^ _ ` */
282  UMODE_a, 0, 0, /* a b c */
283  UMODE_d, 0, 0, /* d e f */
284  0, UMODE_h, UMODE_i, /* g h i */
285  0, 0, 0, /* j k l */
286  0, 0, UMODE_o, /* m n o */
287  UMODE_p, 0, UMODE_r, /* p q r */
288  0, 0, 0, /* s t u */
289  0, UMODE_w, UMODE_x, /* v w x */
290  0, /* y */
291  0, /* z */
292  0, 0, 0, /* { | } */
293  0, 0 /* ~ � */
294 };
295 
296 
297 char myCsmodes[128] = {
298  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300 
301  0,
302  'a', /* (33) ! Channel Admins */
303  0, 0, 0,
304  'h', /* (37) % Channel halfops */
305  0, 0, 0, 0,
306  0,
307 
308  'v', 0, 0, 0, 0,
309  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
310 
311  'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
312  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
313 
314  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
315  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
316 };
317 
318 
320  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
321  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
322  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
323  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
324  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
325  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
326  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
327  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
328  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
329  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
330  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
331  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
332  {NULL},
333  {NULL},
334  {add_ban, del_ban},
335  {NULL},
336  {NULL},
338  {NULL},
339  {NULL},
340  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
341  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
342  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
343 };
344 
345 
347  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
348  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
349  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
350  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
351  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
352  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
353  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
354  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
355  {0},
356  {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL},
357  {0}, /* B */
358  {0}, /* C */
359  {0}, /* D */
360  {0}, /* E */
361  {0}, /* F */
362  {0}, /* G */
363  {0}, /* H */
364  {0}, /* I */
365  {0}, /* J */
366  {CMODE_K, 0, NULL, NULL}, /* K */
367  {0}, /* L */
368  {CMODE_M, 0, NULL, NULL}, /* M */
369  {CMODE_N, 0, NULL, NULL}, /* N */
370  {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
371  {0}, /* P */
372  {0}, /* Q */
373  {CMODE_R, 0, NULL, NULL}, /* R */
374  {CMODE_S, 0, NULL, NULL}, /* S */
375  {0}, /* T */
376  {0}, /* U */
377  {0}, /* V */
378  {0}, /* W */
379  {0}, /* X */
380  {0}, /* Y */
381  {0}, /* Z */
382  {0}, {0}, {0}, {0}, {0}, {0},
383  {0}, /* a */
384  {0}, /* b */
385  {CMODE_c, 0, NULL, NULL}, /* c */
386  {0}, /* d */
387  {0}, /* e */
388  {0}, /* f */
389  {0}, /* g */
390  {0}, /* h */
391  {CMODE_i, 0, NULL, NULL}, /* i */
392  {0}, /* j */
395  {CMODE_m, 0, NULL, NULL}, /* m */
396  {CMODE_n, 0, NULL, NULL}, /* n */
397  {0}, /* o */
398  {CMODE_p, 0, NULL, NULL}, /* p */
399  {CMODE_q, 0, NULL, NULL}, /* q */
400  {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
401  {CMODE_s, 0, NULL, NULL}, /* s */
402  {CMODE_t, 0, NULL, NULL}, /* t */
403  {0}, /* u */
404  {0}, /* v */
405  {0}, /* w */
406  {0}, /* x */
407  {0}, /* y */
408  {0}, /* z */
409  {0}, {0}, {0}, {0}
410 };
411 
413  {'c', CMODE_c, 0, NULL, NULL},
414  {'i', CMODE_i, 0, NULL, NULL},
415  {'k', CMODE_k, 0, get_key, cs_get_key},
417  {'m', CMODE_m, 0, NULL, NULL},
418  {'n', CMODE_n, 0, NULL, NULL},
419  {'p', CMODE_p, 0, NULL, NULL},
420  {'q', CMODE_q, 0, NULL, NULL},
421  {'r', CMODE_r, 0, NULL, NULL},
422  {'s', CMODE_s, 0, NULL, NULL},
423  {'t', CMODE_t, 0, NULL, NULL},
424  {'A', CMODE_A, 0, NULL, NULL},
425  {'K', CMODE_K, 0, NULL, NULL},
426  {'M', CMODE_M, 0, NULL, NULL},
427  {'N', CMODE_N, 0, NULL, NULL},
428  {'O', CMODE_O, 0, NULL, NULL},
429  {'R', CMODE_R, 0, NULL, NULL},
430  {'S', CMODE_S, 0, NULL, NULL},
431  {0}
432 };
433 
435  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
436  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
437  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
438  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
439 
440  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
441  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
442  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
443  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
444 
445  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
446  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
447  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
448  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
449 
450  {0},
451 
453  {0}, /* b */
454  {0}, /* c */
455  {0}, /* d */
456  {0}, /* e */
457  {0}, /* f */
458  {0}, /* g */
460  {0}, /* i */
461  {0}, /* j */
462  {0}, /* k */
463  {0}, /* l */
464  {0}, /* m */
465  {0}, /* n */
467  {0}, /* p */
468  {0}, /* q */
469  {0}, /* r */
470  {0}, /* s */
471  {0}, /* t */
472  {0}, /* u */
473  {CUS_VOICE, 0, NULL},
474  {0}, /* w */
475  {0}, /* x */
476  {0}, /* y */
477  {0}, /* z */
478  {0}, {0}, {0}, {0}, {0}
479 };
480 
481 /* SVSMODE -b */
482 void ultimate3_cmd_unban(char *name, char *nick)
483 {
484  ultimate3_cmd_svsmode_chan(name, "-b", nick);
485 }
486 
487 
488 /* SVSMODE channel modes */
489 
490 void ultimate3_cmd_svsmode_chan(char *name, char *mode, char *nick)
491 {
492  if (nick) {
493  send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
494  } else {
495  send_cmd(ServerName, "SVSMODE %s %s", name, mode);
496  }
497 }
498 
499 int anope_event_sjoin(char *source, int ac, char **av)
500 {
501  do_sjoin(source, ac, av);
502  return MOD_CONT;
503 }
504 
505 
506 /*
507 ** NICK - new
508 ** source = NULL
509 ** parv[0] = nickname
510 ** parv[1] = hopcount
511 ** parv[2] = timestamp
512 ** parv[3] = modes
513 ** parv[4] = username
514 ** parv[5] = hostname
515 ** parv[6] = server
516 ** parv[7] = servicestamp
517 ** parv[8] = IP
518 ** parv[9] = info
519 ** NICK - change
520 ** source = oldnick
521 ** parv[0] = new nickname
522 ** parv[1] = hopcount
523 */
524 int anope_event_nick(char *source, int ac, char **av)
525 {
526  if (ac != 2) {
527  User *user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
528  strtoul(av[2], NULL, 10), strtoul(av[7], NULL,
529  0),
530  strtoul(av[8], NULL, 0), "*", NULL);
531  if (user)
532  anope_set_umode(user, 1, &av[3]);
533  } else {
534  do_nick(source, av[0], NULL, NULL, NULL, NULL,
535  strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
536  }
537  return MOD_CONT;
538 }
539 
540 int anope_event_sethost(char *source, int ac, char **av)
541 {
542  User *u;
543 
544  if (ac != 2)
545  return MOD_CONT;
546 
547  u = finduser(av[0]);
548  if (!u) {
549  if (debug) {
550  alog("debug: SETHOST for nonexistent user %s", av[0]);
551  }
552  return MOD_CONT;
553  }
554 
555  change_user_host(u, av[1]);
556  return MOD_CONT;
557 }
558 
559 int anope_event_capab(char *source, int ac, char **av)
560 {
561  capab_parse(ac, av);
562  return MOD_CONT;
563 }
564 
565 /*
566 ** CLIENT
567 ** source = NULL
568 ** parv[0] = nickname Trystan
569 ** parv[1] = hopcount 1
570 ** parv[2] = timestamp 1090083810
571 ** parv[3] = modes +ix
572 ** parv[4] = modes ? +
573 ** parv[5] = username Trystan
574 ** parv[6] = hostname c-24-2-101-227.client.comcast.net
575 ** parv[7] = vhost 3223f75b.2b32ee69.client.comcast.net
576 ** parv[8] = server WhiteRose.No.Eu.Shadow-Realm.org
577 ** parv[9] = svid 0
578 ** parv[10] = ip 402810339
579 ** parv[11] = info Dreams are answers to questions not yet asked
580 */
581 int anope_event_client(char *source, int ac, char **av)
582 {
583  if (ac != 2) {
584  User *user = do_nick(source, av[0], av[5], av[6], av[8], av[11],
585  strtoul(av[2], NULL, 10), strtoul(av[9], NULL,
586  0),
587  strtoul(av[10], NULL, 0), av[7], NULL);
588  if (user) {
589  anope_set_umode(user, 1, &av[3]);
590  }
591  }
592  return MOD_CONT;
593 }
594 
595 /* *INDENT-OFF* */
596 void moduleAddIRCDMsgs(void) {
597  Message *m;
598 
599  updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
600 
635  m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
648  m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
649  m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
652  m = createMessage("GCONNECT", anope_event_null); addCoreMessage(IRCD,m);
664  m = createMessage("EOBURST", anope_event_eob); addCoreMessage(IRCD,m);
665 }
666 
667 /* *INDENT-ON* */
668 
669 
670 void ultimate3_cmd_sqline(char *mask, char *reason)
671 {
672  if (!mask || !reason) {
673  return;
674  }
675 
676  send_cmd(NULL, "SQLINE %s :%s", mask, reason);
677 }
678 
679 void ultimate3_cmd_unsgline(char *mask)
680 {
681  send_cmd(NULL, "UNSGLINE 0 :%s", mask);
682 }
683 
684 void ultimate3_cmd_unszline(char *mask)
685 {
686  send_cmd(NULL, "UNSZLINE 0 %s", mask);
687 }
688 
689 /* As of alpha27 (one after our offical support szline was removed */
690 /* quote the changelog ---
691  Complete rewrite of the kline/akill/zline system. (s)zlines no longer exist.
692  K: lines set on IP addresses without username portions (or *) are treated as Z: lines used to be.
693 */
694 void ultimate3_cmd_szline(char *mask, char *reason, char *whom)
695 {
696  send_cmd(NULL, "AKILL %s * %d %s %ld :%s", mask, 86400 * 2, whom,
697  (long int) time(NULL), reason);
698  /* leaving this in here in case some legacy user asks for it */
699  /* send_cmd(NULL, "SZLINE %s :%s", mask, reason); */
700 }
701 
702 void ultimate3_cmd_svsnoop(char *server, int set)
703 {
704  send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
705 }
706 
707 void ultimate3_cmd_svsadmin(char *server, int set)
708 {
709  ultimate3_cmd_svsnoop(server, set);
710 }
711 
712 void ultimate3_cmd_sgline(char *mask, char *reason)
713 {
714  send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
715 }
716 
717 void ultimate3_cmd_remove_akill(char *user, char *host)
718 {
719  send_cmd(NULL, "RAKILL %s %s", host, user);
720 }
721 
723 {
724  common_svsmode(u, "-x", NULL);
725  notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
726 }
727 
728 void ultimate3_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
729 {
730  send_cmd(s_HostServ, "SVSMODE %s +x", nick);
731  send_cmd(ServerName, "SETHOST %s %s", nick, vhost);
732 }
733 
734 void ultimate3_cmd_join(char *user, char *channel, time_t chantime)
735 {
736  send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
737 }
738 
739 void ultimate3_cmd_akill(char *user, char *host, char *who, time_t when,
740  time_t expires, char *reason)
741 {
742  send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
743  (long int) time(NULL), reason);
744 }
745 
746 void ultimate3_cmd_svskill(char *source, char *user, char *buf)
747 {
748  if (!buf) {
749  return;
750  }
751 
752  send_cmd(NULL, "SVSKILL %s :%s", user, buf);
753 }
754 
755 
756 void ultimate3_cmd_svsmode(User * u, int ac, char **av)
757 {
758  send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
759  (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
760  (ac == 2 ? av[1] : ""));
761 }
762 
763 void anope_squit(char *servname, char *message)
764 {
765  send_cmd(servname, "SQUIT %s :%s", servname, message);
766 }
767 
768 void anope_pong(char *servname)
769 {
770  send_cmd(servname, "PONG %s", servname);
771 }
772 
773 /* Events */
774 
775 int anope_event_ping(char *source, int ac, char **av)
776 {
777  if (ac < 1)
778  return MOD_CONT;
779  ultimate3_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]);
780  return MOD_CONT;
781 }
782 
783 int anope_event_436(char *source, int ac, char **av)
784 {
785  if (ac < 1)
786  return MOD_CONT;
787 
788  m_nickcoll(av[0]);
789  return MOD_CONT;
790 }
791 
792 int anope_event_away(char *source, int ac, char **av)
793 {
794  if (!source) {
795  return MOD_CONT;
796  }
797  m_away(source, (ac ? av[0] : NULL));
798  return MOD_CONT;
799 }
800 
801 int anope_event_topic(char *source, int ac, char **av)
802 {
803  if (ac != 4)
804  return MOD_CONT;
805  do_topic(source, ac, av);
806  return MOD_CONT;
807 }
808 
809 int anope_event_squit(char *source, int ac, char **av)
810 {
811  if (ac != 2)
812  return MOD_CONT;
813  do_squit(source, ac, av);
814  return MOD_CONT;
815 }
816 
817 int anope_event_quit(char *source, int ac, char **av)
818 {
819  if (ac != 1)
820  return MOD_CONT;
821  do_quit(source, ac, av);
822  return MOD_CONT;
823 }
824 
825 
826 int anope_event_mode(char *source, int ac, char **av)
827 {
828  if (ac < 2)
829  return MOD_CONT;
830 
831  if (*av[0] == '#' || *av[0] == '&') {
832  do_cmode(source, ac, av);
833  } else {
834  do_umode(source, ac, av);
835  }
836  return MOD_CONT;
837 }
838 
839 /* EVENT : OS */
840 int anope_event_os(char *source, int ac, char **av)
841 {
842  if (ac < 1)
843  return MOD_CONT;
844  m_privmsg(source, s_OperServ, av[0]);
845  return MOD_CONT;
846 }
847 
848 /* EVENT : NS */
849 int anope_event_ns(char *source, int ac, char **av)
850 {
851  if (ac < 1)
852  return MOD_CONT;
853  m_privmsg(source, s_NickServ, av[0]);
854  return MOD_CONT;
855 }
856 
857 /* EVENT : MS */
858 int anope_event_ms(char *source, int ac, char **av)
859 {
860  if (ac < 1)
861  return MOD_CONT;
862  m_privmsg(source, s_MemoServ, av[0]);
863  return MOD_CONT;
864 }
865 
866 /* EVENT : HS */
867 int anope_event_hs(char *source, int ac, char **av)
868 {
869  if (ac < 1)
870  return MOD_CONT;
871  m_privmsg(source, s_HostServ, av[0]);
872  return MOD_CONT;
873 }
874 
875 /* EVENT : CS */
876 int anope_event_cs(char *source, int ac, char **av)
877 {
878  if (ac < 1)
879  return MOD_CONT;
880  m_privmsg(source, s_ChanServ, av[0]);
881  return MOD_CONT;
882 }
883 
884 
885 int anope_event_kill(char *source, int ac, char **av)
886 {
887  if (ac != 2)
888  return MOD_CONT;
889 
890  m_kill(av[0], av[1]);
891  return MOD_CONT;
892 }
893 
894 int anope_event_kick(char *source, int ac, char **av)
895 {
896  if (ac != 3)
897  return MOD_CONT;
898  do_kick(source, ac, av);
899  return MOD_CONT;
900 }
901 
902 
903 int anope_event_join(char *source, int ac, char **av)
904 {
905  if (ac != 1)
906  return MOD_CONT;
907  do_join(source, ac, av);
908  return MOD_CONT;
909 }
910 
911 int anope_event_motd(char *source, int ac, char **av)
912 {
913  if (!source) {
914  return MOD_CONT;
915  }
916 
917  m_motd(source);
918  return MOD_CONT;
919 }
920 
921 int anope_event_setname(char *source, int ac, char **av)
922 {
923  User *u;
924 
925  if (ac != 1)
926  return MOD_CONT;
927 
928  u = finduser(source);
929  if (!u) {
930  if (debug) {
931  alog("debug: SETNAME for nonexistent user %s", source);
932  }
933  return MOD_CONT;
934  }
935 
936  change_user_realname(u, av[0]);
937  return MOD_CONT;
938 }
939 
940 int anope_event_chgname(char *source, int ac, char **av)
941 {
942  User *u;
943 
944  if (ac != 2)
945  return MOD_CONT;
946 
947  u = finduser(av[0]);
948  if (!u) {
949  if (debug) {
950  alog("debug: CHGNAME for nonexistent user %s", av[0]);
951  }
952  return MOD_CONT;
953  }
954 
955  change_user_realname(u, av[1]);
956  return MOD_CONT;
957 }
958 
959 int anope_event_setident(char *source, int ac, char **av)
960 {
961  User *u;
962 
963  if (ac != 1)
964  return MOD_CONT;
965 
966  u = finduser(source);
967  if (!u) {
968  if (debug) {
969  alog("debug: SETIDENT for nonexistent user %s", source);
970  }
971  return MOD_CONT;
972  }
973 
974  change_user_username(u, av[0]);
975  return MOD_CONT;
976 }
977 int anope_event_chgident(char *source, int ac, char **av)
978 {
979  User *u;
980 
981  if (ac != 2)
982  return MOD_CONT;
983 
984  u = finduser(av[0]);
985  if (!u) {
986  if (debug) {
987  alog("debug: CHGIDENT for nonexistent user %s", av[0]);
988  }
989  return MOD_CONT;
990  }
991 
992  change_user_username(u, av[1]);
993  return MOD_CONT;
994 }
995 
996 /* EVENT: SERVER */
997 int anope_event_server(char *source, int ac, char **av)
998 {
999  if (!stricmp(av[1], "1")) {
1000  uplink = sstrdup(av[0]);
1001  }
1002  do_server(source, av[0], av[1], av[2], NULL);
1003  return MOD_CONT;
1004 }
1005 
1006 
1007 int anope_event_privmsg(char *source, int ac, char **av)
1008 {
1009  if (ac != 2)
1010  return MOD_CONT;
1011  m_privmsg(source, av[0], av[1]);
1012  return MOD_CONT;
1013 }
1014 
1015 int anope_event_part(char *source, int ac, char **av)
1016 {
1017  if (ac < 1 || ac > 2)
1018  return MOD_CONT;
1019  do_part(source, ac, av);
1020  return MOD_CONT;
1021 }
1022 
1023 int anope_event_whois(char *source, int ac, char **av)
1024 {
1025  if (source && ac >= 1) {
1026  m_whois(source, av[0]);
1027  }
1028  return MOD_CONT;
1029 }
1030 
1031 void ultimate3_cmd_topic(char *whosets, char *chan, char *whosetit,
1032  char *topic, time_t when)
1033 {
1034  send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
1035  (unsigned long int) when, topic);
1036 }
1037 
1038 void ultimate3_cmd_372(char *source, char *msg)
1039 {
1040  send_cmd(ServerName, "372 %s :- %s", source, msg);
1041 }
1042 
1043 void ultimate3_cmd_372_error(char *source)
1044 {
1045  send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
1046  "contact your IRC administrator.", source);
1047 }
1048 
1049 void ultimate3_cmd_375(char *source)
1050 {
1051  send_cmd(ServerName, "375 %s :- %s Message of the Day",
1052  source, ServerName);
1053 }
1054 
1055 void ultimate3_cmd_376(char *source)
1056 {
1057  send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
1058 }
1059 
1060 void ultimate3_cmd_nick(char *nick, char *name, char *modes)
1061 {
1062  EnforceQlinedNick(nick, NULL);
1063  send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
1064  (long int) time(NULL), modes, ServiceUser, ServiceHost,
1065  ServerName, name);
1066  ultimate3_cmd_sqline(nick, "Reserved for services");
1067 }
1068 
1069 void ultimate3_cmd_guest_nick(char *nick, char *user, char *host,
1070  char *real, char *modes)
1071 {
1072  send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
1073  (long int) time(NULL), modes, user, host, ServerName, real);
1074 }
1075 
1076 void ultimate3_cmd_mode(char *source, char *dest, char *buf)
1077 {
1078  if (!buf) {
1079  return;
1080  }
1081 
1082  send_cmd(source, "MODE %s %s", dest, buf);
1083 }
1084 
1085 void ultimate3_cmd_bot_nick(char *nick, char *user, char *host, char *real,
1086  char *modes)
1087 {
1089  send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
1090  (long int) time(NULL), modes, user, host, ServerName, real);
1091  ultimate3_cmd_sqline(nick, "Reserved for services");
1092 }
1093 
1094 void ultimate3_cmd_kick(char *source, char *chan, char *user, char *buf)
1095 {
1096  if (buf) {
1097  send_cmd(source, "KICK %s %s :%s", chan, user, buf);
1098  } else {
1099  send_cmd(source, "KICK %s %s", chan, user);
1100  }
1101 }
1102 
1103 void ultimate3_cmd_notice_ops(char *source, char *dest, char *buf)
1104 {
1105  if (!buf) {
1106  return;
1107  }
1108 
1109  send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
1110 }
1111 
1112 
1113 void ultimate3_cmd_notice(char *source, char *dest, char *buf)
1114 {
1115  if (!buf) {
1116  return;
1117  }
1118 
1119  if (NSDefFlags & NI_MSG) {
1120  ultimate3_cmd_privmsg2(source, dest, buf);
1121  } else {
1122  send_cmd(source, "NOTICE %s :%s", dest, buf);
1123  }
1124 }
1125 
1126 void ultimate3_cmd_notice2(char *source, char *dest, char *msg)
1127 {
1128  send_cmd(source, "NOTICE %s :%s", dest, msg);
1129 }
1130 
1131 void ultimate3_cmd_privmsg(char *source, char *dest, char *buf)
1132 {
1133  if (!buf) {
1134  return;
1135  }
1136 
1137  send_cmd(source, "PRIVMSG %s :%s", dest, buf);
1138 }
1139 
1140 void ultimate3_cmd_privmsg2(char *source, char *dest, char *msg)
1141 {
1142  send_cmd(source, "PRIVMSG %s :%s", dest, msg);
1143 }
1144 
1145 void ultimate3_cmd_serv_notice(char *source, char *dest, char *msg)
1146 {
1147  send_cmd(source, "NOTICE $%s :%s", dest, msg);
1148 }
1149 
1150 void ultimate3_cmd_serv_privmsg(char *source, char *dest, char *msg)
1151 {
1152  send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
1153 }
1154 
1155 void ultimate3_cmd_bot_chan_mode(char *nick, char *chan)
1156 {
1157  anope_cmd_mode(nick, chan, "%s %s %s", ircd->botchanumode, nick, nick);
1158 }
1159 
1160 void ultimate3_cmd_351(char *source)
1161 {
1162  send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
1165 
1166 }
1167 
1168 /* QUIT */
1169 void ultimate3_cmd_quit(char *source, char *buf)
1170 {
1171  if (!buf) {
1172  return;
1173  }
1174 
1175  if (buf) {
1176  send_cmd(source, "QUIT :%s", buf);
1177  } else {
1178  send_cmd(source, "QUIT");
1179  }
1180 }
1181 
1182 /* PROTOCTL */
1184 {
1185  send_cmd(NULL,
1186  "CAPAB TS5 NOQUIT SSJ5 BURST UNCONNECT TSMODE NICKIP CLIENT");
1187 }
1188 
1189 /* PASS */
1190 void ultimate3_cmd_pass(char *pass)
1191 {
1192  send_cmd(NULL, "PASS %s :TS", pass);
1193 }
1194 
1195 /* SERVER name hop descript */
1196 /* Unreal 3.2 actually sends some info about itself in the descript area */
1197 void ultimate3_cmd_server(char *servname, int hop, char *descript)
1198 {
1199  send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
1200 }
1201 
1202 /* PONG */
1203 void ultimate3_cmd_pong(char *servname, char *who)
1204 {
1205  send_cmd(servname, "PONG %s", who);
1206 }
1207 
1208 /* UNSQLINE */
1209 void ultimate3_cmd_unsqline(char *user)
1210 {
1211  if (!user) {
1212  return;
1213  }
1214  send_cmd(NULL, "UNSQLINE %s", user);
1215 }
1216 
1217 /* CHGHOST */
1218 void ultimate3_cmd_chghost(char *nick, char *vhost)
1219 {
1220  if (!nick || !vhost) {
1221  return;
1222  }
1223  send_cmd(ServerName, "CHGHOST %s %s", nick, vhost);
1224 }
1225 
1226 /* CHGIDENT */
1227 void ultimate3_cmd_chgident(char *nick, char *vIdent)
1228 {
1229  if (!nick || !vIdent) {
1230  return;
1231  }
1232  send_cmd(ServerName, "CHGIDENT %s %s", nick, vIdent);
1233 }
1234 
1235 /* INVITE */
1236 void ultimate3_cmd_invite(char *source, char *chan, char *nick)
1237 {
1238  if (!source || !chan || !nick) {
1239  return;
1240  }
1241 
1242  send_cmd(source, "INVITE %s %s", nick, chan);
1243 }
1244 
1245 /* PART */
1246 void ultimate3_cmd_part(char *nick, char *chan, char *buf)
1247 {
1248 
1249  if (!nick || !chan) {
1250  return;
1251  }
1252 
1253  if (buf) {
1254  send_cmd(nick, "PART %s :%s", chan, buf);
1255  } else {
1256  send_cmd(nick, "PART %s", chan);
1257  }
1258 }
1259 
1260 /* 391 */
1261 void ultimate3_cmd_391(char *source, char *timestr)
1262 {
1263  if (!timestr) {
1264  return;
1265  }
1266  send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
1267 }
1268 
1269 /* 250 */
1270 void ultimate3_cmd_250(char *buf)
1271 {
1272  if (!buf) {
1273  return;
1274  }
1275 
1276  send_cmd(NULL, "250 %s", buf);
1277 }
1278 
1279 /* 307 */
1280 void ultimate3_cmd_307(char *buf)
1281 {
1282  if (!buf) {
1283  return;
1284  }
1285 
1286  send_cmd(ServerName, "307 %s", buf);
1287 }
1288 
1289 /* 311 */
1290 void ultimate3_cmd_311(char *buf)
1291 {
1292  if (!buf) {
1293  return;
1294  }
1295 
1296  send_cmd(ServerName, "311 %s", buf);
1297 }
1298 
1299 /* 312 */
1300 void ultimate3_cmd_312(char *buf)
1301 {
1302  if (!buf) {
1303  return;
1304  }
1305 
1306  send_cmd(ServerName, "312 %s", buf);
1307 }
1308 
1309 /* 317 */
1310 void ultimate3_cmd_317(char *buf)
1311 {
1312  if (!buf) {
1313  return;
1314  }
1315 
1316  send_cmd(ServerName, "317 %s", buf);
1317 }
1318 
1319 /* 219 */
1320 void ultimate3_cmd_219(char *source, char *letter)
1321 {
1322  if (!source) {
1323  return;
1324  }
1325 
1326  if (letter) {
1327  send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
1328  *letter);
1329  } else {
1330  send_cmd(NULL, "219 %s l :End of /STATS report.", source);
1331  }
1332 }
1333 
1334 /* 401 */
1335 void ultimate3_cmd_401(char *source, char *who)
1336 {
1337  if (!source || !who) {
1338  return;
1339  }
1340  send_cmd(ServerName, "401 %s %s :No such service.", source, who);
1341 }
1342 
1343 /* 318 */
1344 void ultimate3_cmd_318(char *source, char *who)
1345 {
1346  if (!source || !who) {
1347  return;
1348  }
1349 
1350  send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
1351 }
1352 
1353 /* 242 */
1354 void ultimate3_cmd_242(char *buf)
1355 {
1356  if (!buf) {
1357  return;
1358  }
1359 
1360  send_cmd(NULL, "242 %s", buf);
1361 }
1362 
1363 /* 243 */
1364 void ultimate3_cmd_243(char *buf)
1365 {
1366  if (!buf) {
1367  return;
1368  }
1369 
1370  send_cmd(NULL, "243 %s", buf);
1371 }
1372 
1373 /* 211 */
1374 void ultimate3_cmd_211(char *buf)
1375 {
1376  if (!buf) {
1377  return;
1378  }
1379 
1380  send_cmd(NULL, "211 %s", buf);
1381 }
1382 
1383 /* GLOBOPS */
1384 void ultimate3_cmd_global(char *source, char *buf)
1385 {
1386  if (!buf) {
1387  return;
1388  }
1389 
1390  send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
1391 }
1392 
1393 /* SQUIT */
1394 void ultimate3_cmd_squit(char *servname, char *message)
1395 {
1396  if (!servname || !message) {
1397  return;
1398  }
1399 
1400  send_cmd(NULL, "SQUIT %s :%s", servname, message);
1401 }
1402 
1403 /* SVSO */
1404 void ultimate3_cmd_svso(char *source, char *nick, char *flag)
1405 {
1406  if (!source || !nick || !flag) {
1407  return;
1408  }
1409 
1410  send_cmd(source, "SVSO %s %s", nick, flag);
1411 }
1412 
1413 /* NICK <newnick> */
1414 void ultimate3_cmd_chg_nick(char *oldnick, char *newnick)
1415 {
1416  if (!oldnick || !newnick) {
1417  return;
1418  }
1419 
1420  send_cmd(oldnick, "NICK %s", newnick);
1421 }
1422 
1423 /* SVSNICK */
1424 void ultimate3_cmd_svsnick(char *source, char *guest, time_t when)
1425 {
1426  if (!source || !guest) {
1427  return;
1428  }
1429  send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
1430 }
1431 
1432 /* Functions that use serval cmd functions */
1433 /*
1434  * SVINFO
1435  * parv[0] = sender prefix
1436  * parv[1] = TS_CURRENT for the server
1437  * parv[2] = TS_MIN for the server
1438  * parv[3] = server is standalone or connected to non-TS only
1439  * parv[4] = server's idea of UTC time
1440  */
1442 {
1443  send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
1444 }
1445 
1447 {
1448  send_cmd(NULL, "BURST");
1449 }
1450 
1451 
1453 {
1454  me_server =
1456 
1457  if (servernum == 1) {
1459  }
1460  if (servernum == 2) {
1462  }
1463  if (servernum == 3) {
1465  }
1470 }
1471 
1473 {
1474  /* Not used */
1475 }
1476 
1477 /* SVSHOLD - set */
1478 void ultimate3_cmd_svshold(char *nick)
1479 {
1480  /* Not supported by this IRCD */
1481 }
1482 
1483 /* SVSHOLD - release */
1485 {
1486  /* Not Supported by this IRCD */
1487 }
1488 
1489 /* SVSMODE +d */
1490 /* sent if svid is something weird */
1491 void ultimate3_cmd_svid_umode(char *nick, time_t ts)
1492 {
1493  send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
1494  (unsigned long int) ts);
1495 }
1496 
1497 /* SVSMODE +d */
1498 /* nc_change was = 1, and there is no na->status */
1500 {
1501  common_svsmode(u, "+d", "1");
1502 }
1503 
1504 /* SVSMODE +d */
1505 void ultimate3_cmd_svid_umode2(User * u, char *ts)
1506 {
1507  /* not used by bahamut ircds */
1508 }
1509 
1510 void ultimate3_cmd_svid_umode3(User * u, char *ts)
1511 {
1512  if (u->svid != u->timestamp) {
1513  common_svsmode(u, "+rd", ts);
1514  } else {
1515  common_svsmode(u, "+r", NULL);
1516  }
1517 
1518 }
1519 
1520 int anope_event_svinfo(char *source, int ac, char **av)
1521 {
1522  /* currently not used but removes the message : unknown message from server */
1523  return MOD_CONT;
1524 }
1525 
1526 int anope_event_pass(char *source, int ac, char **av)
1527 {
1528  /* currently not used but removes the message : unknown message from server */
1529  return MOD_CONT;
1530 }
1531 
1532 int anope_event_gnotice(char *source, int ac, char **av)
1533 {
1534  /* currently not used but removes the message : unknown message from server */
1535  return MOD_CONT;
1536 }
1537 
1538 int anope_event_netctrl(char *source, int ac, char **av)
1539 {
1540  /* currently not used but removes the message : unknown message from server */
1541  return MOD_CONT;
1542 }
1543 
1544 int anope_event_notice(char *source, int ac, char **av)
1545 {
1546  /* currently not used but removes the message : unknown message from server */
1547  return MOD_CONT;
1548 }
1549 
1550 int anope_event_sqline(char *source, int ac, char **av)
1551 {
1552  /* currently not used but removes the message : unknown message from server */
1553  return MOD_CONT;
1554 }
1555 
1556 /*
1557  * svsjoin
1558  *
1559  * parv[0] - sender
1560  * parv[1] - nick to make join
1561  * parv[2] - channel(s) to join
1562  */
1563 void ultimate3_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
1564 {
1565  send_cmd(source, "SVSJOIN %s %s", nick, chan);
1566 }
1567 
1568 /*
1569  * svspart
1570  *
1571  * parv[0] - sender
1572  * parv[1] - nick to make part
1573  * parv[2] - channel(s) to part
1574  */
1575 void ultimate3_cmd_svspart(char *source, char *nick, char *chan)
1576 {
1577  send_cmd(source, "SVSPART %s %s", nick, chan);
1578 }
1579 
1580 void ultimate3_cmd_swhois(char *source, char *who, char *mask)
1581 {
1582  /* not supported */
1583 }
1584 
1585 
1587 {
1588  send_cmd(NULL, "BURST 0");
1589 }
1590 
1591 int anope_event_error(char *source, int ac, char **av)
1592 {
1593  if (ac >= 1) {
1594  if (debug) {
1595  alog("debug: %s", av[0]);
1596  }
1597  }
1598  return MOD_CONT;
1599 }
1600 
1601 
1602 int anope_event_eob(char *source, int ac, char **av)
1603 {
1604  Server *s;
1605 
1606  if (ac == 1) {
1607  s = findserver(servlist, av[0]);
1608  /* If we found a server with the given source, that one just
1609  * finished bursting. If there was no source, then our uplink
1610  * server finished bursting. -GD
1611  */
1612  if (!s && serv_uplink)
1613  s = serv_uplink;
1614  finish_sync(s, 1);
1615  }
1616  return MOD_CONT;
1617 }
1618 
1619 
1620 int anope_event_burst(char *source, int ac, char **av)
1621 {
1622  Server *s;
1623  s = findserver(servlist, source);
1624  if (!ac) {
1625  /* for future use - start burst */
1626  } else {
1627  /* If we found a server with the given source, that one just
1628  * finished bursting. If there was no source, then our uplink
1629  * server finished bursting. -GD
1630  */
1631  if (!s && serv_uplink)
1632  s = serv_uplink;
1633  finish_sync(s, 1);
1634  }
1635  return MOD_CONT;
1636 }
1637 
1638 int anope_event_rehash(char *source, int ac, char **av)
1639 {
1640  return MOD_CONT;
1641 }
1642 
1643 int anope_event_credits(char *source, int ac, char **av)
1644 {
1645  return MOD_CONT;
1646 }
1647 
1648 int anope_event_admin(char *source, int ac, char **av)
1649 {
1650  return MOD_CONT;
1651 }
1652 
1653 int anope_event_netglobal(char *source, int ac, char **av)
1654 {
1655  return MOD_CONT;
1656 }
1657 
1658 int anope_event_invite(char *source, int ac, char **av)
1659 {
1660  return MOD_CONT;
1661 }
1662 
1664 {
1665  return 0;
1666 }
1667 
1668 void ultimate3_cmd_jupe(char *jserver, char *who, char *reason)
1669 {
1670  char rbuf[256];
1671 
1672  snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
1673  reason ? ": " : "", reason ? reason : "");
1674 
1675  if (findserver(servlist, jserver))
1676  ultimate3_cmd_squit(jserver, rbuf);
1677  ultimate3_cmd_server(jserver, 2, rbuf);
1678  new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
1679 }
1680 
1681 /* GLOBOPS - to handle old WALLOPS */
1682 void ultimate3_cmd_global_legacy(char *source, char *fmt)
1683 {
1684  send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
1685 }
1686 
1687 /*
1688  1 = valid nick
1689  0 = nick is in valid
1690 */
1691 int ultiamte3_valid_nick(char *nick)
1692 {
1693  /* no hard coded invalid nicks */
1694  return 1;
1695 }
1696 
1697 /*
1698  1 = valid chan
1699  0 = chan is in valid
1700 */
1701 int ultiamte3_valid_chan(char *chan)
1702 {
1703  /* no hard coded invalid chans */
1704  return 1;
1705 }
1706 
1707 
1708 void ultimate3_cmd_ctcp(char *source, char *dest, char *buf)
1709 {
1710  char *s;
1711 
1712  if (!buf) {
1713  return;
1714  } else {
1715  s = normalizeBuffer(buf);
1716  }
1717 
1718  send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
1719  free(s);
1720 }
1721 
1722 
1728 {
1804 }
1805 
1809 int AnopeInit(int argc, char **argv)
1810 {
1811 
1812  moduleAddAuthor("Anope");
1814  (VERSION_STRING);
1816 
1817  pmodule_ircd_version("UltimateIRCd 3.0.0.a26+");
1818  pmodule_ircd_cap(myIrcdcap);
1819  pmodule_ircd_var(myIrcd);
1820  pmodule_ircd_cbmodeinfos(myCbmodeinfos);
1821  pmodule_ircd_cumodes(myCumodes);
1824  pmodule_ircd_cbmodes(myCbmodes);
1825  pmodule_ircd_cmmodes(myCmmodes);
1828 
1838 
1841 
1842  return MOD_CONT;
1843 }
E void pmodule_cmd_vhost_off(void(*func)(User *u))
Definition: ircd.c:713
void ultimate3_cmd_svsnick(char *source, char *guest, time_t when)
Definition: ultimate3.c:1424
E void pmodule_permchan_mode(int mode)
Definition: ircd.c:1206
E int32 opcnt
Definition: extern.h:1140
E char * RemotePassword3
Definition: extern.h:270
E void pmodule_cmd_svspart(void(*func)(char *source, char *nick, char *chan))
Definition: ircd.c:1056
int ultiamte3_valid_nick(char *nick)
Definition: ultimate3.c:1691
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
E char * RemotePassword
Definition: extern.h:264
void ultimate3_cmd_global_legacy(char *source, char *fmt)
Definition: ultimate3.c:1682
void ultimate3_cmd_372(char *source, char *msg)
Definition: ultimate3.c:1038
#define CAPAB_DODKEY
Definition: services.h:1377
int anope_event_mode(char *source, int ac, char **av)
Definition: ultimate3.c:826
int anope_event_invite(char *source, int ac, char **av)
Definition: ultimate3.c:1658
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
Definition: ircd.c:827
#define UMODE_R
Definition: bahamut.h:42
int anope_event_436(char *source, int ac, char **av)
Definition: ultimate3.c:783
#define CAPAB_SSJ5
Definition: services.h:1385
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
int anope_event_cs(char *source, int ac, char **av)
Definition: ultimate3.c:876
int anope_event_netglobal(char *source, int ac, char **av)
Definition: ultimate3.c:1653
void anope_squit(char *servname, char *message)
Definition: ultimate3.c:763
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
int anope_event_setname(char *source, int ac, char **av)
Definition: ultimate3.c:921
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
int anope_event_topic(char *source, int ac, char **av)
Definition: ultimate3.c:801
void ultimate3_cmd_375(char *source)
Definition: ultimate3.c:1049
void ultimate3_cmd_mode(char *source, char *dest, char *buf)
Definition: ultimate3.c:1076
int anope_event_chgident(char *source, int ac, char **av)
Definition: ultimate3.c:977
#define UMODE_w
Definition: bahamut.h:21
void ultimate3_cmd_svsnoop(char *server, int set)
Definition: ultimate3.c:702
void ultimate3_cmd_notice2(char *source, char *dest, char *msg)
Definition: ultimate3.c:1126
#define CBM_MINUS_NO_ARG
Definition: services.h:928
E void change_user_username(User *user, const char *username)
Definition: users.c:170
E char * s_BotServ
Definition: extern.h:287
E IRCDVar * ircd
Definition: extern.h:39
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
#define CMODE_p
Definition: bahamut.h:47
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
Definition: modules.c:1597
#define CAPAB_DKEY
Definition: services.h:1375
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
E int nick_identified(User *u)
Definition: nickserv.c:1111
void ultimate3_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: ultimate3.c:490
void ultimate3_cmd_243(char *buf)
Definition: ultimate3.c:1364
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
E void pmodule_cmd_vhost_on(void(*func)(char *nick, char *vIdent, char *vhost))
Definition: ircd.c:966
void ultimate3_cmd_svspart(char *source, char *nick, char *chan)
Definition: ultimate3.c:1575
int anope_event_squit(char *source, int ac, char **av)
Definition: ultimate3.c:809
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
E void pmodule_cmd_pong(void(*func)(char *servname, char *who))
Definition: ircd.c:842
E void pmodule_cmd_307(void(*func)(char *buf))
Definition: ircd.c:879
E char * get_limit(Channel *chan)
Definition: channels.c:1881
void ultimate3_cmd_317(char *buf)
Definition: ultimate3.c:1310
E void pmodule_cmd_211(void(*func)(char *buf))
Definition: ircd.c:924
void ultimate3_cmd_swhois(char *source, char *who, char *mask)
Definition: ultimate3.c:1580
#define UMODE_D
Definition: bahamut.h:40
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
E void pmodule_ircd_cap(IRCDCAPAB *cap)
Definition: ircd.c:1102
#define CMODE_l
Definition: bahamut.h:51
char * name
Definition: services.h:277
#define CMODE_N
Definition: inspircd11.h:48
void ultimate3_cmd_unsqline(char *user)
Definition: ultimate3.c:1209
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 ultimate3_cmd_sgline(char *mask, char *reason)
Definition: ultimate3.c:712
E char * ServerDesc
Definition: extern.h:275
E void pmodule_cmd_bob(void(*func)())
Definition: ircd.c:976
E void pmodule_ircd_flood_mode_char_remove(char *mode)
Definition: ircd.c:1130
void ultimate3_cmd_bot_chan_mode(char *nick, char *chan)
Definition: ultimate3.c:1155
unsigned long umodes[128]
Definition: ultimate3.c:245
int anope_event_setident(char *source, int ac, char **av)
Definition: ultimate3.c:959
uint32 svid
Definition: services.h:888
void ultimate3_cmd_nick(char *nick, char *name, char *modes)
Definition: ultimate3.c:1060
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 ultimate3_cmd_250(char *buf)
Definition: ultimate3.c:1270
int anope_event_part(char *source, int ac, char **av)
Definition: ultimate3.c:1015
#define CMODE_M
Definition: bahamut.h:55
E void pmodule_ircd_var(IRCDVar *ircdvar)
Definition: ircd.c:1097
void ultimate3_cmd_bob()
Definition: ultimate3.c:1472
E void do_umode(const char *source, int ac, char **av)
Definition: users.c:816
int anope_event_notice(char *source, int ac, char **av)
Definition: ultimate3.c:1544
int anope_event_pass(char *source, int ac, char **av)
Definition: ultimate3.c:1526
void ultimate3_cmd_svinfo()
Definition: ultimate3.c:1441
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
Definition: modules.c:1470
void ultimate3_cmd_notice(char *source, char *dest, char *buf)
Definition: ultimate3.c:1113
int anope_event_eob(char *source, int ac, char **av)
Definition: ultimate3.c:1602
#define CUS_VOICE
Definition: services.h:1342
#define IRCD
Definition: modules.h:63
#define CMODE_A
Definition: inspircd11.h:35
#define UMODE_i
Definition: bahamut.h:18
E void pmodule_cmd_svsnoop(void(*func)(char *server, int set))
Definition: ircd.c:696
void ultimate3_cmd_211(char *buf)
Definition: ultimate3.c:1374
E void pmodule_cmd_squit(void(*func)(char *servname, char *message))
Definition: ircd.c:944
#define UMODE_W
Definition: inspircd12.h:38
#define CMODE_n
Definition: bahamut.h:46
void ultimate3_cmd_401(char *source, char *who)
Definition: ultimate3.c:1335
void ultimate3_cmd_unszline(char *mask)
Definition: ultimate3.c:684
#define CMODE_R
Definition: bahamut.h:52
E void pmodule_cmd_unsgline(void(*func)(char *mask))
Definition: ircd.c:991
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
int anope_event_motd(char *source, int ac, char **av)
Definition: ultimate3.c:911
int anope_event_rehash(char *source, int ac, char **av)
Definition: ultimate3.c:1638
E void EnforceQlinedNick(char *nick, char *killer)
Definition: misc.c:837
void ultimate3_cmd_svid_umode2(User *u, char *ts)
Definition: ultimate3.c:1505
#define CMODE_t
Definition: bahamut.h:49
int anope_event_kick(char *source, int ac, char **av)
Definition: ultimate3.c:894
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
MDE void moduleSetType(MODType type)
Definition: modules.c:818
void ultimate3_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: ultimate3.c:1150
E void pmodule_cmd_jupe(void(*func)(char *jserver, char *who, char *reason))
Definition: ircd.c:1072
char * botchanumode
Definition: services.h:299
E void update_host(User *user)
Definition: users.c:104
E void pmodule_cmd_243(void(*func)(char *buf))
Definition: ircd.c:919
E void do_sjoin(const char *source, int ac, char **av)
Definition: channels.c:803
void ultimate3_cmd_unban(char *name, char *nick)
Definition: ultimate3.c:482
int ultiamte3_flood_mode_check(char *value)
Definition: ultimate3.c:1663
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
E void do_join(const char *source, int ac, char **av)
Definition: channels.c:556
void ultimate3_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: ultimate3.c:1103
int anope_event_chgname(char *source, int ac, char **av)
Definition: ultimate3.c:940
void ultimate3_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: ultimate3.c:1140
void ultimate3_cmd_unsgline(char *mask)
Definition: ultimate3.c:679
int anope_event_quit(char *source, int ac, char **av)
Definition: ultimate3.c:817
void ultimate3_cmd_318(char *source, char *who)
Definition: ultimate3.c:1344
CMMode myCmmodes[128]
Definition: ultimate3.c:319
E int is_services_root(User *u)
Definition: operserv.c:577
int anope_event_kill(char *source, int ac, char **av)
Definition: ultimate3.c:885
void ultimate3_cmd_release_svshold(char *nick)
Definition: ultimate3.c:1484
E int m_nickcoll(char *user)
Definition: messages.c:20
void ultimate3_cmd_part(char *nick, char *chan, char *buf)
Definition: ultimate3.c:1246
E void pmodule_cmd_375(void(*func)(char *source))
Definition: ircd.c:746
void ultimate3_set_umode(User *user, int ac, char **av)
Definition: ultimate3.c:151
E void pmodule_key_mode(int mode)
Definition: ircd.c:1196
int anope_event_hs(char *source, int ac, char **av)
Definition: ultimate3.c:867
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
char myCsmodes[128]
Definition: ultimate3.c:297
void ultimate3_cmd_svshold(char *nick)
Definition: ultimate3.c:1478
CBMode myCbmodes[128]
Definition: ultimate3.c:346
E char * s_MemoServ
Definition: extern.h:286
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
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
#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
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
int anope_event_capab(char *source, int ac, char **av)
Definition: ultimate3.c:559
E char * uplink
Definition: extern.h:35
void ultimate3_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: ultimate3.c:1085
E User * finduser(const char *nick)
Definition: users.c:323
int AnopeInit(int argc, char **argv)
Definition: ultimate3.c:1809
void ultimate3_cmd_376(char *source)
Definition: ultimate3.c:1055
E int m_kill(char *nick, char *msg)
Definition: messages.c:49
CUMode myCumodes[128]
Definition: ultimate3.c:434
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_join(char *source, int ac, char **av)
Definition: ultimate3.c:903
void ultimate3_cmd_svsmode(User *u, int ac, char **av)
Definition: ultimate3.c:756
#define CAPAB_TSMODE
Definition: services.h:1367
void ultimate3_cmd_svsadmin(char *server, int set)
Definition: ultimate3.c:707
void ultimate3_cmd_351(char *source)
Definition: ultimate3.c:1160
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
#define UMODE_a
Definition: bahamut.h:16
void ultimate3_cmd_svid_umode(char *nick, time_t ts)
Definition: ultimate3.c:1491
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
IRCDCAPAB myIrcdcap[]
Definition: ultimate3.c:118
void ultimate3_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: ultimate3.c:1094
void ultimate3_cmd_szline(char *mask, char *reason, char *whom)
Definition: ultimate3.c:694
IRCDVar myIrcd[]
Definition: ultimate3.c:19
#define CUS_PROTECT
Definition: services.h:1345
E void pmodule_ircd_cumodes(CUMode modes[128])
Definition: ircd.c:1117
E const char version_flags[]
Definition: extern.h:771
void ultimate3_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: ultimate3.c:1069
int anope_event_ms(char *source, int ac, char **av)
Definition: ultimate3.c:858
E int check_valid_admin(User *user, Channel *chan, int servermode)
Definition: chanserv.c:1255
void ultimate3_cmd_quit(char *source, char *buf)
Definition: ultimate3.c:1169
void ultimate3_cmd_pong(char *servname, char *who)
Definition: ultimate3.c:1203
void moduleAddAnopeCmds()
Definition: ultimate3.c:1727
int anope_event_ns(char *source, int ac, char **av)
Definition: ultimate3.c:849
E void alog(const char *fmt,...) FORMAT(printf
E int servernum
Definition: extern.h:615
#define UMODE_P
Definition: ultimate2.h:23
void ultimate3_cmd_chgident(char *nick, char *vIdent)
Definition: ultimate3.c:1227
void ultimate3_cmd_squit(char *servname, char *message)
Definition: ultimate3.c:1394
#define MOD_CONT
Definition: modules.h:54
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_UNCONNECT
Definition: services.h:1368
void ultimate3_cmd_capab()
Definition: ultimate3.c:1183
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 void display_news(User *u, int16 type)
Definition: news.c:269
#define CMODE_K
Definition: inspircd11.h:37
#define CAPAB_NSJOIN
Definition: services.h:1370
E Server * findserver(Server *s, const char *name)
Definition: servers.c:261
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
void ultimate3_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: ultimate3.c:1031
void ultimate3_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: ultimate3.c:739
#define CAPAB_CLIENT
Definition: services.h:1383
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
int anope_event_sethost(char *source, int ac, char **av)
Definition: ultimate3.c:540
#define NI_MSG
Definition: services.h:1292
E int debug
Definition: extern.h:775
E int is_services_admin(User *u)
Definition: operserv.c:591
E void set_limit(Channel *chan, char *value)
Definition: channels.c:2011
E void finish_sync(Server *serv, int sync_links)
Definition: servers.c:531
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
void anope_pong(char *servname)
Definition: ultimate3.c:768
#define UMODE_0
Definition: ultimate3.h:21
E int NSDefFlags
Definition: extern.h:377
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
#define CAPAB_BURST
Definition: services.h:1372
E char * s_HostServ
Definition: extern.h:303
void ultimate3_cmd_391(char *source, char *timestr)
Definition: ultimate3.c:1261
E void pmodule_cmd_250(void(*func)(char *buf))
Definition: ircd.c:874
void ultimate3_cmd_372_error(char *source)
Definition: ultimate3.c:1043
int anope_event_netctrl(char *source, int ac, char **av)
Definition: ultimate3.c:1538
E void pmodule_ircd_version(char *version)
Definition: ircd.c:1107
E const char version_number[]
Definition: extern.h:767
void ultimate3_cmd_remove_akill(char *user, char *host)
Definition: ultimate3.c:717
#define CAPAB_DOZIP
Definition: services.h:1376
void ultimate3_cmd_ctcp(char *source, char *dest, char *buf)
Definition: ultimate3.c:1708
#define CMODE_m
Definition: bahamut.h:45
void ultimate3_cmd_chg_nick(char *oldnick, char *newnick)
Definition: ultimate3.c:1414
int anope_event_os(char *source, int ac, char **av)
Definition: ultimate3.c:840
E void pmodule_cmd_unszline(void(*func)(char *mask))
Definition: ircd.c:996
E void cs_set_key(ChannelInfo *ci, char *value)
Definition: chanserv.c:2538
int anope_event_ping(char *source, int ac, char **av)
Definition: ultimate3.c:775
E void anope_cmd_mode(char *source, char *dest, const char *fmt,...)
Definition: ircd.c:211
void ultimate3_cmd_sqline(char *mask, char *reason)
Definition: ultimate3.c:670
E void pmodule_cmd_401(void(*func)(char *source, char *who))
Definition: ircd.c:904
E Server * serv_uplink
Definition: extern.h:1053
void ultimate3_cmd_pass(char *pass)
Definition: ultimate3.c:1190
E int WallOper
Definition: extern.h:448
E void pmodule_cmd_svso(void(*func)(char *source, char *nick, char *flag))
Definition: ircd.c:949
void ultimate3_cmd_join(char *user, char *channel, time_t chantime)
Definition: ultimate3.c:734
void ultimate3_cmd_312(char *buf)
Definition: ultimate3.c:1300
void ultimate3_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: ultimate3.c:1145
E void pmodule_cmd_serv_privmsg(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:821
int anope_event_burst(char *source, int ac, char **av)
Definition: ultimate3.c:1620
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
int anope_event_server(char *source, int ac, char **av)
Definition: ultimate3.c:997
E void pmodule_cmd_391(void(*func)(char *source, char *timestr))
Definition: ircd.c:869
E void pmodule_cmd_remove_akill(void(*func)(char *user, char *host))
Definition: ircd.c:701
E void pmodule_ircd_cbmodes(CBMode modes[128])
Definition: ircd.c:1135
#define SERVER_JUPED
Definition: services.h:866
void ultimate3_cmd_svso(char *source, char *nick, char *flag)
Definition: ultimate3.c:1404
E void pmodule_cmd_szline(void(*func)(char *mask, char *reason, char *whom))
Definition: ircd.c:1002
void ultimate3_cmd_global(char *source, char *buf)
Definition: ultimate3.c:1384
void ultimate3_cmd_nc_change(User *u)
Definition: ultimate3.c:1499
#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
int anope_event_nick(char *source, int ac, char **av)
Definition: ultimate3.c:524
#define UMODE_A
Definition: bahamut.h:22
E void add_exception(Channel *chan, char *mask)
Definition: channels.c:1377
void ultimate3_cmd_svid_umode3(User *u, char *ts)
Definition: ultimate3.c:1510
void ultimate3_cmd_privmsg(char *source, char *dest, char *buf)
Definition: ultimate3.c:1131
#define CAPAB_TS5
Definition: services.h:1374
int anope_event_whois(char *source, int ac, char **av)
Definition: ultimate3.c:1023
int anope_event_admin(char *source, int ac, char **av)
Definition: ultimate3.c:1648
#define CBM_NO_USER_MLOCK
Definition: services.h:930
#define UMODE_S
Definition: charybdis.h:23
#define CMODE_k
Definition: bahamut.h:50
E int is_services_oper(User *u)
Definition: operserv.c:606
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
void ultimate3_cmd_vhost_off(User *u)
Definition: ultimate3.c:722
E Server * servlist
Definition: extern.h:1051
#define UMODE_h
Definition: bahamut.h:17
#define DEFAULT_MLOCK
Definition: bahamut.h:59
void ultimate3_cmd_chghost(char *nick, char *vhost)
Definition: ultimate3.c:1218
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 ultimate3_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: ultimate3.c:728
void ultimate3_cmd_219(char *source, char *letter)
Definition: ultimate3.c:1320
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
CBModeInfo myCbmodeinfos[]
Definition: ultimate3.c:412
E char * cs_get_limit(ChannelInfo *ci)
Definition: chanserv.c:2458
uint32 mode
Definition: services.h:889
E void pmodule_cmd_guest_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
Definition: ircd.c:761
void ultimate3_cmd_307(char *buf)
Definition: ultimate3.c:1280
E void common_svsmode(User *u, char *modes, char *arg)
Definition: actions.c:228
void ultimate3_cmd_invite(char *source, char *chan, char *nick)
Definition: ultimate3.c:1236
E char * ServerName
Definition: extern.h:274
#define CMODE_c
Definition: bahamut.h:54
int anope_event_away(char *source, int ac, char **av)
Definition: ultimate3.c:792
int anope_event_credits(char *source, int ac, char **av)
Definition: ultimate3.c:1643
void ultimate3_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
Definition: ultimate3.c:1563
int anope_event_error(char *source, int ac, char **av)
Definition: ultimate3.c:1591
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 ultimate3_cmd_connect(int servernum)
Definition: ultimate3.c:1452
E char * s_ChanServ
Definition: extern.h:285
E void pmodule_cmd_svshold(void(*func)(char *nick))
Definition: ircd.c:981
#define SERVER_ISME
Definition: services.h:865
void ultimate3_cmd_242(char *buf)
Definition: ultimate3.c:1354
void ultimate3_cmd_jupe(char *jserver, char *who, char *reason)
Definition: ultimate3.c:1668
void ultimate3_cmd_svskill(char *source, char *user, char *buf)
Definition: ultimate3.c:746
int ultiamte3_valid_chan(char *chan)
Definition: ultimate3.c:1701
char * vhostchar
Definition: services.h:365
E void pmodule_cmd_serv_notice(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:816
E char * s_NickServ
Definition: extern.h:284
int anope_event_gnotice(char *source, int ac, char **av)
Definition: ultimate3.c:1532
E char * get_key(Channel *chan)
Definition: channels.c:1874
E int m_whois(char *source, char *who)
Definition: messages.c:366
void ultimate3_cmd_311(char *buf)
Definition: ultimate3.c:1290
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
time_t timestamp
Definition: services.h:886
#define CAPAB_IPV6
Definition: services.h:1384
E void pmodule_ircd_useTSMode(int use)
Definition: ircd.c:1164
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
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 ultimate3_cmd_eob()
Definition: ultimate3.c:1586
int anope_event_svinfo(char *source, int ac, char **av)
Definition: ultimate3.c:1520
E void pmodule_cmd_sqline(void(*func)(char *mask, char *reason))
Definition: ircd.c:939
void ultimate3_cmd_burst()
Definition: ultimate3.c:1446
E void pmodule_cmd_privmsg2(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:810
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
#define CAPAB_ZIP
Definition: services.h:1371
E void pmodule_limit_mode(int mode)
Definition: ircd.c:1201
#define CMODE_i
Definition: bahamut.h:44
#define CMODE_S
Definition: hybrid.h:46
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
int anope_event_privmsg(char *source, int ac, char **av)
Definition: ultimate3.c:1007
E void pmodule_ircd_flood_mode_char_set(char *mode)
Definition: ircd.c:1125
int anope_event_sjoin(char *source, int ac, char **av)
Definition: ultimate3.c:499
#define UMODE_Z
Definition: ratbox.h:33
E void pmodule_cmd_312(void(*func)(char *buf))
Definition: ircd.c:889
E const char version_build[]
Definition: extern.h:769
E void change_user_host(User *user, const char *host)
Definition: users.c:129
void moduleAddIRCDMsgs(void)
Definition: ultimate3.c:596
#define CMODE_s
Definition: bahamut.h:48
#define CUS_OP
Definition: services.h:1341
E char * normalizeBuffer(char *)
Definition: botserv.c:1101
void ultimate3_cmd_server(char *servname, int hop, char *descript)
Definition: ultimate3.c:1197
int anope_event_sqline(char *source, int ac, char **av)
Definition: ultimate3.c:1550
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
#define UMODE_o
Definition: bahamut.h:19
E void pmodule_cmd_219(void(*func)(char *source, char *letter))
Definition: ircd.c:899
int anope_event_client(char *source, int ac, char **av)
Definition: ultimate3.c:581