Anope IRC Services  Version 1.8
plexus3.c
Go to the documentation of this file.
1 /* PlexusIRCD IRCD 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 #include "services.h"
13 #include "pseudo.h"
14 #include "plexus3.h"
15 #include "version.h"
16 
18  {"hybrid-7.2.1+plexus-3.0.0+",/* ircd name */
19  "+i", /* nickserv mode */
20  "+i", /* chanserv mode */
21  "+i", /* memoserv mode */
22  "+i", /* hostserv mode */
23  "+oai", /* operserv mode */
24  "+i", /* botserv mode */
25  "+i", /* helpserv mode */
26  "+i", /* Dev/Null mode */
27  "+i", /* Global mode */
28  "+i", /* nickserv alias mode */
29  "+i", /* chanserv alias mode */
30  "+i", /* memoserv alias mode */
31  "+i", /* hostserv alias mode */
32  "+oai", /* operserv alias mode */
33  "+i", /* botserv alias mode */
34  "+i", /* helpserv alias mode */
35  "+i", /* Dev/Null alias mode */
36  "+i", /* Global alias mode */
37  "+i", /* Used by BotServ Bots */
38  5, /* Chan Max Symbols */
39  "-cilmnpstBMNORS", /* Modes to Remove */
40  "+ao", /* Channel Umode used by Botserv bots */
41  1, /* SVSNICK */
42  1, /* Vhost */
43  1, /* Has Owner */
44  "+q", /* Mode to set for an owner */
45  "-q", /* Mode to unset for an owner */
46  "+a", /* Mode to set for chan admin */
47  "-a", /* Mode to unset for chan admin */
48  "+rd", /* Mode On Reg */
49  "N", /* Mode on ID for Roots */
50  NULL, /* Mode on ID for Admins */
51  NULL, /* Mode on ID for Opers */
52  "-r+d", /* Mode on UnReg */
53  "+d", /* Mode on Nick Change */
54  1, /* Supports SGlines */
55  1, /* Supports SQlines */
56  0, /* Supports SZlines */
57  1, /* Supports Halfop +h */
58  3, /* Number of server args */
59  0, /* Join 2 Set */
60  0, /* Join 2 Message */
61  1, /* Has exceptions +e */
62  0, /* TS Topic Forward */
63  0, /* TS Topci Backward */
64  UMODE_N, /* Protected Umode */
65  0, /* Has Admin */
66  1, /* Chan SQlines */
67  0, /* Quit on Kill */
68  0, /* SVSMODE unban */
69  1, /* Has Protect */
70  0, /* Reverse */
71  1, /* Chan Reg */
72  CMODE_z, /* Channel Mode */
73  0, /* vidents */
74  1, /* svshold */
75  1, /* time stamp on mode */
76  0, /* NICKIP */
77  0, /* O:LINE */
78  1, /* UMODE */
79  1, /* VHOST ON NICK */
80  0, /* Change RealName */
81  CMODE_p, /* No Knock */
82  0, /* Admin Only */
83  DEFAULT_MLOCK, /* Default MLOCK */
84  UMODE_x, /* Vhost Mode */
85  0, /* +f */
86  0, /* +L */
87  0, /* +f Mode */
88  0, /* +L Mode */
89  1, /* On nick change check if they could be identified */
90  0, /* No Knock requires +i */
91  NULL, /* CAPAB Chan Modes */
92  0, /* We support TOKENS */
93  1, /* TOKENS are CASE inSensitive */
94  0, /* TIME STAMPS are BASE64 */
95  1, /* +I support */
96  0, /* SJOIN ban char */
97  0, /* SJOIN except char */
98  0, /* SJOIN invite char */
99  0, /* Can remove User Channel Modes with SVSMODE */
100  0, /* Sglines are not enforced until user reconnects */
101  "x", /* vhost char */
102  0, /* ts6 */
103  0, /* support helper umode */
104  0, /* p10 */
105  NULL, /* character set */
106  1, /* reports sync state */
107  0, /* CIDR channelbans */
108  0, /* +j */
109  0, /* +j mode */
110  0, /* Use delayed client introduction. */
111  }
112  ,
113  {NULL}
114 };
115 
117  {
118  0, /* NOQUIT */
119  0, /* TSMODE */
120  0, /* UNCONNECT */
121  0, /* NICKIP */
122  0, /* SJOIN */
123  CAPAB_ZIP, /* ZIP */
124  0, /* BURST */
125  CAPAB_TS5, /* TS5 */
126  0, /* TS3 */
127  0, /* DKEY */
128  0, /* PT4 */
129  0, /* SCS */
130  CAPAB_QS, /* QS */
131  CAPAB_UID, /* UID */
132  CAPAB_KNOCK, /* KNOCK */
133  0, /* CLIENT */
134  0, /* IPV6 */
135  0, /* SSJ5 */
136  0, /* SN2 */
137  0, /* TOKEN */
138  0, /* VHOST */
139  0, /* SSJ3 */
140  0, /* NICK2 */
141  0, /* UMODE2 */
142  0, /* VL */
143  0, /* TLKEXT */
144  0, /* DODKEY */
145  0, /* DOZIP */
146  0, 0, 0}
147 };
148 
149 
150 
151 void
152 plexus_set_umode (User * user, int ac, char **av)
153 {
154  int add = 1; /* 1 if adding modes, 0 if deleting */
155  char *modes = av[0];
156 
157  ac--;
158 
159  if (debug)
160  alog ("debug: Changing mode for %s to %s", user->nick, modes);
161 
162  while (*modes)
163  {
164 
165  /* This looks better, much better than "add ? (do_add) : (do_remove)".
166  * At least this is readable without paying much attention :) -GD
167  */
168  if (add)
169  user->mode |= umodes[(int) *modes];
170  else
171  user->mode &= ~umodes[(int) *modes];
172 
173  switch (*modes++)
174  {
175  case '+':
176  add = 1;
177  break;
178  case '-':
179  add = 0;
180  break;
181  case 'd':
182  if (ac == 0)
183  {
184  alog ("user: umode +d with no parameter (?) for user %s",
185  user->nick);
186  break;
187  }
188 
189  ac--;
190  av++;
191  user->svid = strtoul (*av, NULL, 0);
192  break;
193  case 'x':
194  update_host (user);
195  break;
196  case 'o':
197  if (add)
198  {
199  opcnt++;
200 
201  if (WallOper)
203  "\2%s\2 is now an IRC operator.",
204  user->nick);
205  display_news (user, NEWS_OPER);
206 
207  }
208  else
209  {
210  opcnt--;
211  }
212  break;
213  case 'r':
214  if (add && !nick_identified (user))
215  {
216  common_svsmode (user, "-r", NULL);
217  user->mode &= ~UMODE_r;
218  }
219  break;
220  }
221  }
222 }
223 
224 unsigned long umodes[128] = {
225  0, 0, 0, /* Unused */
226  0, 0, 0, /* Unused */
227  0, 0, 0, /* Unused, Unused, Horzontal Tab */
228  0, 0, 0, /* Line Feed, Unused, Unused */
229  0, 0, 0, /* Carriage Return, Unused, Unused */
230  0, 0, 0, /* Unused */
231  0, 0, 0, /* Unused */
232  0, 0, 0, /* Unused */
233  0, 0, 0, /* Unused */
234  0, 0, 0, /* Unused */
235  0, 0, 0, /* Unused, Unused, Space */
236  0, 0, 0, /* ! " # */
237  0, 0, 0, /* $ % & */
238  0, 0, 0, /* ! ( ) */
239  0, 0, 0, /* * + , */
240  0, 0, 0, /* - . / */
241  0, 0, /* 0 1 */
242  0, 0, /* 2 3 */
243  0, 0, /* 4 5 */
244  0, 0, /* 6 7 */
245  0, 0, /* 8 9 */
246  0, 0, /* : ; */
247  0, 0, 0, /* < = > */
248  0, 0, /* ? @ */
249  0, 0, 0, /* A B C */
250  0, 0, 0, /* D E F */
251  0, 0, 0, /* G H I */
252  0, 0, 0, /* J K L */
253  0, UMODE_N, 0, /* M N O */
254  0, 0, UMODE_R, /* P Q R */
255  UMODE_S, 0, 0, /* S T U */
256  0, 0, 0, /* V W X */
257  0, /* Y */
258  0, /* Z */
259  0, 0, 0, /* [ \ ] */
260  0, 0, 0, /* ^ _ ` */
261  UMODE_a, 0, 0, /* a b c */
262  0, 0, 0, /* d e f */
263  0, 0, UMODE_i, /* g h i */
264  0, 0, 0, /* j k l */
265  0, 0, UMODE_o, /* m n o */
266  0, 0, UMODE_r, /* p q r */
267  0, 0, 0, /* s t u */
268  0, UMODE_w, UMODE_x, /* v w x */
269  0, /* y */
270  0, /* z */
271  0, 0, 0, /* { | } */
272  0, 0 /* ~ � */
273 };
274 
275 
276 char myCsmodes[128] = {
277  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
278  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
279 
280  0,
281  0,
282  0, 0, 0,
283  'h', /* (37) % Channel halfops */
284  'a',
285  0, 0, 0, 0,
286 
287  'v', 0, 0, 0, 0,
288  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
289 
290  'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
291  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
292 
293  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
294  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'q', 0
295 };
296 
298  {NULL}, {NULL}, {NULL},
299  {NULL}, {NULL}, {NULL},
300  {NULL}, {NULL}, {NULL},
301  {NULL}, {NULL}, {NULL},
302  {NULL}, {NULL}, {NULL},
303  {NULL}, {NULL}, {NULL},
304  {NULL}, {NULL}, {NULL},
305  {NULL}, {NULL}, {NULL},
306  {NULL}, {NULL}, {NULL},
307  {NULL}, {NULL}, {NULL},
308  {NULL}, {NULL}, {NULL},
309  {NULL}, {NULL}, {NULL},
310  {NULL}, {NULL}, {NULL},
311  {NULL}, {NULL}, {NULL},
312  {NULL}, {NULL}, {NULL},
313  {NULL}, {NULL}, {NULL},
314  {NULL}, {NULL}, {NULL},
315  {NULL}, {NULL}, {NULL},
316  {NULL}, {NULL}, {NULL},
317  {NULL}, {NULL}, {NULL},
318  {NULL}, {NULL}, {NULL},
319  {NULL}, {NULL}, {NULL},
320  {NULL}, {NULL}, {NULL}, /* BCD */
321  {NULL}, {NULL}, {NULL}, /* EFG */
322  {NULL}, /* H */
324  {NULL}, /* J */
325  {NULL}, {NULL}, {NULL}, /* KLM */
326  {NULL}, {NULL}, {NULL}, /* NOP */
327  {NULL}, {NULL}, {NULL}, /* QRS */
328  {NULL}, {NULL}, {NULL}, /* TUV */
329  {NULL}, {NULL}, {NULL}, /* WXY */
330  {NULL}, /* Z */
331  {NULL}, {NULL}, /* (char 91 - 92) */
332  {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */
333  {NULL}, /* ` (char 96) */
334  {NULL}, /* a (char 97) */
335  {add_ban, del_ban},
336  {NULL},
337  {NULL},
339  {NULL},
340  {NULL},
341  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
342  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
343  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
344 };
345 
346 
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}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
356  {0},
357  {0}, /* A */
358  {CMODE_B, CBM_NO_USER_MLOCK, NULL, NULL}, /* B */
359  {0}, /* C */
360  {0}, /* D */
361  {0}, /* E */
362  {0}, /* F */
363  {0}, /* G */
364  {0}, /* H */
365  {0}, /* I */
366  {0}, /* J */
367  {0}, /* K */
368  {0}, /* L */
369  {CMODE_M, 0, NULL, NULL}, /* M */
370  {CMODE_N, 0, NULL, NULL}, /* N */
371  {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL}, /* O */
372  {0}, /* P */
373  {0}, /* Q */
374  {CMODE_R, 0, NULL, NULL}, /* R */
375  {CMODE_S, 0, NULL, NULL}, /* S */
376  {0}, /* T */
377  {0}, /* U */
378  {0}, /* V */
379  {0}, /* W */
380  {0}, /* X */
381  {0}, /* Y */
382  {0}, /* Z */
383  {0}, {0}, {0}, {0}, {0}, {0},
384  {0}, /* a */
385  {0}, /* b */
386  {CMODE_c, 0, NULL, NULL}, /* c */
387  {0}, /* d */
388  {0}, /* e */
389  {0}, /* f */
390  {0}, /* g */
391  {0}, /* h */
392  {CMODE_i, 0, NULL, NULL},
393  {0}, /* j */
396  {CMODE_m, 0, NULL, NULL},
397  {CMODE_n, 0, NULL, NULL},
398  {0}, /* o */
399  {CMODE_p, 0, NULL, NULL},
400  {0}, /* q */
401  {0},
402  {CMODE_s, 0, NULL, NULL},
403  {CMODE_t, 0, NULL, NULL},
404  {0},
405  {0}, /* v */
406  {0}, /* w */
407  {0}, /* x */
408  {0}, /* y */
409  {CMODE_z, CBM_NO_MLOCK, NULL, NULL}, /* z */
410  {0}, {0}, {0}, {0}
411 };
412 
414  {'c', CMODE_c, 0, NULL, NULL},
415  {'i', CMODE_i, 0, NULL, NULL},
416  {'k', CMODE_k, 0, get_key, cs_get_key},
418  {'m', CMODE_m, 0, NULL, NULL},
419  {'n', CMODE_n, 0, NULL, NULL},
420  {'p', CMODE_p, 0, NULL, NULL},
421  {'s', CMODE_s, 0, NULL, NULL},
422  {'t', CMODE_t, 0, NULL, NULL},
423  {'z', CMODE_z, 0, NULL, NULL},
424  {'B', CMODE_B, 0, NULL, NULL},
425  {'M', CMODE_M, 0, NULL, NULL},
426  {'N', CMODE_N, 0, NULL, NULL},
427  {'O', CMODE_O, 0, NULL, NULL},
428  {'R', CMODE_R, 0, NULL, NULL},
429  {'S', CMODE_S, 0, NULL, NULL},
430  {0}
431 };
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  {CUS_OWNER, 0, check_valid_op}, /* 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 
482 
483 void
484 plexus_cmd_notice (char *source, char *dest, char *buf)
485 {
486  if (!buf)
487  {
488  return;
489  }
490 
491  if (NSDefFlags & NI_MSG)
492  {
493  plexus_cmd_privmsg2 (source, dest, buf);
494  }
495  else
496  {
497  send_cmd (source, "NOTICE %s :%s", dest, buf);
498  }
499 }
500 
501 void
502 plexus_cmd_notice2 (char *source, char *dest, char *msg)
503 {
504  send_cmd (source, "NOTICE %s :%s", dest, msg);
505 }
506 
507 void
508 plexus_cmd_privmsg (char *source, char *dest, char *buf)
509 {
510  if (!buf)
511  {
512  return;
513  }
514 
515  send_cmd (source, "PRIVMSG %s :%s", dest, buf);
516 }
517 
518 void
519 plexus_cmd_privmsg2 (char *source, char *dest, char *msg)
520 {
521  send_cmd (source, "PRIVMSG %s :%s", dest, msg);
522 }
523 
524 void
525 plexus_cmd_serv_notice (char *source, char *dest, char *msg)
526 {
527  send_cmd (source, "NOTICE $$%s :%s", dest, msg);
528 }
529 
530 void
531 plexus_cmd_serv_privmsg (char *source, char *dest, char *msg)
532 {
533  send_cmd (source, "PRIVMSG $$%s :%s", dest, msg);
534 }
535 
536 
537 void
538 plexus_cmd_global (char *source, char *buf)
539 {
540  if (!buf)
541  {
542  return;
543  }
544 
545  send_cmd (source ? source : ServerName, "OPERWALL :%s", buf);
546 }
547 
548 /* GLOBOPS - to handle old WALLOPS */
549 void
550 plexus_cmd_global_legacy (char *source, char *fmt)
551 {
552  send_cmd (source ? source : ServerName, "OPERWALL :%s", fmt);
553 }
554 
555 int
556 anope_event_sjoin (char *source, int ac, char **av)
557 {
558  do_sjoin (source, ac, av);
559  return MOD_CONT;
560 }
561 
562 int
563 anope_event_nick (char *source, int ac, char **av)
564 {
565  if (ac != 2)
566  {
567  User *user = do_nick (source, av[0], av[4], av[8], av[6], av[9],
568  strtoul (av[2], NULL, 10),
569  strtoul (av[7], NULL, 0), 0, av[5], NULL);
570  if (user)
571  anope_set_umode (user, 1, &av[3]);
572  }
573  else
574  {
575  do_nick (source, av[0], NULL, NULL, NULL, NULL,
576  strtoul (av[1], NULL, 10), 0, 0, NULL, NULL);
577  }
578  return MOD_CONT;
579 }
580 
581 int
582 anope_event_topic (char *source, int ac, char **av)
583 {
584  if (ac == 4)
585  {
586  do_topic (source, ac, av);
587  }
588  else
589  {
590  Channel *c = findchan (av[0]);
591  time_t topic_time = time (NULL);
592 
593  if (!c)
594  {
595  if (debug)
596  {
597  alog ("debug: TOPIC %s for nonexistent channel %s",
598  merge_args (ac - 1, av + 1), av[0]);
599  }
600  return MOD_CONT;
601  }
602 
603  if (check_topiclock (c, topic_time))
604  return MOD_CONT;
605 
606  if (c->topic)
607  {
608  free (c->topic);
609  c->topic = NULL;
610  }
611  if (ac > 1 && *av[1])
612  c->topic = sstrdup (av[1]);
613 
614  strscpy (c->topic_setter, source, sizeof (c->topic_setter));
615  c->topic_time = topic_time;
616 
617  record_topic (av[0]);
618 
619  if (ac > 1 && *av[1])
620  send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
621  else
622  send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
623 
624  }
625  return MOD_CONT;
626 }
627 
628 int
629 anope_event_tburst (char *source, int ac, char **av)
630 {
631  if (ac != 5)
632  return MOD_CONT;
633 
634  av[0] = av[1];
635  av[1] = av[3];
636  av[3] = av[4];
637  do_topic (source, 4, av);
638  return MOD_CONT;
639 }
640 
641 /*
642  * ENCAP handler
643  * av[0] = servermask (not used)
644  * av[1] = command
645  * av[2] and beyond are dynamic.
646  */
647 int
648 anope_event_encap (char *source, int ac, char **av)
649 {
650  if (ac < 2)
651  return MOD_CONT;
652 
653  if (!stricmp (av[1], "CHGHOST"))
654  {
655  User *u;
656 
657  if (ac != 4)
658  return MOD_CONT;
659 
660  u = finduser (av[2]);
661  if (!u)
662  {
663  if (debug)
664  {
665  alog ("debug: CHGHOST for nonexistent user %s", av[2]);
666  }
667  return MOD_CONT;
668  }
669 
670  change_user_host (u, av[3]);
671  return MOD_CONT;
672  }
673  return MOD_CONT;
674 }
675 
676 int
677 anope_event_436 (char *source, int ac, char **av)
678 {
679  if (ac < 1)
680  return MOD_CONT;
681 
682  m_nickcoll (av[0]);
683  return MOD_CONT;
684 }
685 
686 
687 void
689 {
690  Message *m;
691 
692  updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a");
693 
694  m = createMessage ("401", anope_event_null);
695  addCoreMessage (IRCD, m);
696  m = createMessage ("402", anope_event_null);
697  addCoreMessage (IRCD, m);
698  m = createMessage ("436", anope_event_436);
699  addCoreMessage (IRCD, m);
700  m = createMessage ("AWAY", anope_event_away);
701  addCoreMessage (IRCD, m);
702  m = createMessage ("INVITE", anope_event_invite);
703  addCoreMessage (IRCD, m);
704  m = createMessage ("JOIN", anope_event_join);
705  addCoreMessage (IRCD, m);
706  m = createMessage ("KICK", anope_event_kick);
707  addCoreMessage (IRCD, m);
708  m = createMessage ("KILL", anope_event_kill);
709  addCoreMessage (IRCD, m);
710  m = createMessage ("MODE", anope_event_mode);
711  addCoreMessage (IRCD, m);
712  m = createMessage ("MOTD", anope_event_motd);
713  addCoreMessage (IRCD, m);
714  m = createMessage ("NICK", anope_event_nick);
715  addCoreMessage (IRCD, m);
716  m = createMessage ("NOTICE", anope_event_notice);
717  addCoreMessage (IRCD, m);
718  m = createMessage ("PART", anope_event_part);
719  addCoreMessage (IRCD, m);
720  m = createMessage ("PASS", anope_event_pass);
721  addCoreMessage (IRCD, m);
722  m = createMessage ("PING", anope_event_ping);
723  addCoreMessage (IRCD, m);
724  m = createMessage ("PRIVMSG", anope_event_privmsg);
725  addCoreMessage (IRCD, m);
726  m = createMessage ("QUIT", anope_event_quit);
727  addCoreMessage (IRCD, m);
728  m = createMessage ("SERVER", anope_event_server);
729  addCoreMessage (IRCD, m);
730  m = createMessage ("SQUIT", anope_event_squit);
731  addCoreMessage (IRCD, m);
732  m = createMessage ("TOPIC", anope_event_topic);
733  addCoreMessage (IRCD, m);
734  m = createMessage ("TBURST", anope_event_tburst);
735  addCoreMessage (IRCD, m);
736  m = createMessage ("USER", anope_event_null);
737  addCoreMessage (IRCD, m);
738  m = createMessage ("WALLOPS", anope_event_null);
739  addCoreMessage (IRCD, m);
740  m = createMessage ("WHOIS", anope_event_whois);
741  addCoreMessage (IRCD, m);
742  m = createMessage ("CAPAB", anope_event_capab);
743  addCoreMessage (IRCD, m);
744  m = createMessage ("SJOIN", anope_event_sjoin);
745  addCoreMessage (IRCD, m);
746  m = createMessage ("SVINFO", anope_event_svinfo);
747  addCoreMessage (IRCD, m);
748  m = createMessage ("EOB", anope_event_eob);
749  addCoreMessage (IRCD, m);
750  m = createMessage ("ADMIN", anope_event_admin);
751  addCoreMessage (IRCD, m);
752  m = createMessage ("ERROR", anope_event_error);
753  addCoreMessage (IRCD, m);
754  m = createMessage ("ENCAP", anope_event_encap);
755  addCoreMessage (IRCD, m);
756  m = createMessage ("SVSMODE", anope_event_mode);
757  addCoreMessage (IRCD, m);
758 }
759 
760 void
761 plexus_cmd_sqline (char *mask, char *reason)
762 {
763  send_cmd (s_OperServ, "RESV * %s :%s", mask, reason);
764 }
765 
766 void
768 {
769  send_cmd (s_OperServ, "UNXLINE * %s", mask);
770 }
771 
772 void
774 {
775  /* Does not support */
776 }
777 
778 void
779 plexus_cmd_szline (char *mask, char *reason, char *whom)
780 {
781  /* Does not support */
782 }
783 
784 void
785 plexus_cmd_svsnoop (char *server, int set)
786 {
787  send_cmd(ServerName, "ENCAP %s SVSNOOP %s",
788  server, (set ? "+" : "-"));
789 }
790 
791 void
792 plexus_cmd_svsadmin (char *server, int set)
793 {
794  plexus_cmd_svsnoop (server, set);
795 }
796 
797 void
798 plexus_cmd_sgline (char *mask, char *reason)
799 {
800  send_cmd (s_OperServ, "XLINE * %s 0 :%s", mask, reason);
801 }
802 
803 void
804 plexus_cmd_remove_akill (char *user, char *host)
805 {
806  send_cmd (s_OperServ, "UNKLINE * %s %s", user, host);
807 }
808 
809 void
810 plexus_cmd_topic (char *whosets, char *chan, char *whosetit,
811  char *topic, time_t when)
812 {
813  send_cmd (whosets, "ENCAP * TOPIC %s %s %lu :%s", chan, whosetit,
814  (unsigned long int) when, topic);
815 }
816 
817 void
819 {
820  common_svsmode (u, "-x", NULL);
821 }
822 
823 void
824 plexus_cmd_vhost_on (char *nick, char *vIdent, char *vhost)
825 {
826  User *u;
827 
828  if (!nick)
829  {
830  return;
831  }
832 
833  u = finduser (nick);
834 
835  if (u)
836  {
837  send_cmd (ServerName, "ENCAP * CHGHOST %s %s", u->nick, vhost);
838  common_svsmode (u, "+x", NULL);
839  u->mode |= UMODE_x;
840  }
841 }
842 
843 void
845 {
846  send_cmd (s_OperServ, "UNRESV * %s", user);
847 }
848 
849 void
850 plexus_cmd_join (char *user, char *channel, time_t chantime)
851 {
852  send_cmd (ServerName, "SJOIN %ld %s + :%s", (long int) chantime, channel,
853  user);
854 }
855 
856 /*
857 oper: the nick of the oper performing the kline
858 target.server: the server(s) this kline is destined for
859 duration: the duration if a tkline, 0 if permanent.
860 user: the 'user' portion of the kline
861 host: the 'host' portion of the kline
862 reason: the reason for the kline.
863 */
864 
865 void
866 plexus_cmd_akill (char *user, char *host, char *who, time_t when,
867  time_t expires, char *reason)
868 {
869  send_cmd (s_OperServ, "KLINE * %ld %s %s :%s",
870  (long int) (expires - (long) time (NULL)), user, host, reason);
871 }
872 
873 void
874 plexus_cmd_svskill (char *source, char *user, char *buf)
875 {
876  if (!buf)
877  {
878  return;
879  }
880 
881  if (!source || !user)
882  {
883  return;
884  }
885 
886  send_cmd (source, "KILL %s :%s", user, buf);
887 }
888 
889 void
890 plexus_cmd_svsmode (User * u, int ac, char **av)
891 {
892  send_cmd (ServerName, "ENCAP * SVSMODE %s %ld %s%s%s", u->nick,
893  (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
894  (ac == 2 ? av[1] : ""));
895 }
896 
897 /*
898  * SVINFO
899  * parv[0] = sender prefix
900  * parv[1] = TS_CURRENT for the server
901  * parv[2] = TS_MIN for the server
902  * parv[3] = server is standalone or connected to non-TS only
903  * parv[4] = server's idea of UTC time
904  */
905 void
907 {
908  send_cmd (NULL, "SVINFO 5 5 0 :%ld", (long int) time (NULL));
909 }
910 
911 /* CAPAB */
912 /*
913  QS - Can handle quit storm removal
914  EX - Can do channel +e exemptions
915  CHW - Can do channel wall @#
916  LL - Can do lazy links
917  IE - Can do invite exceptions
918  EOB - Can do EOB message
919  KLN - Can do KLINE message
920  GLN - Can do GLINE message
921  HOPS - can do half ops (+h)
922  HUB - This server is a HUB
923  AOPS - Can do anon ops (+a)
924  UID - Can do UIDs
925  ZIP - Can do ZIPlinks
926  ENC - Can do ENCrypted links
927  KNOCK - supports KNOCK
928  TBURST - supports TBURST
929  PARA - supports invite broadcasting for +p
930  ENCAP - supports encapsulization of protocol messages
931  SVS - supports services protocol extensions
932 */
933 void
935 {
936  send_cmd (NULL,
937  "CAPAB :QS EX CHW IE EOB KLN UNKLN GLN HUB KNOCK TBURST PARA ENCAP SVS");
938 }
939 
940 /* PASS */
941 void
942 plexus_cmd_pass (char *pass)
943 {
944  send_cmd (NULL, "PASS %s :TS", pass);
945 }
946 
947 /* SERVER name hop descript */
948 void
949 plexus_cmd_server (char *servname, int hop, char *descript)
950 {
951  send_cmd (NULL, "SERVER %s %d :%s", servname, hop, descript);
952 }
953 
954 void
956 {
958 
959  if (servernum == 1)
961  else if (servernum == 2)
963  else if (servernum == 3)
965 
966  plexus_cmd_capab ();
969 }
970 
971 void
973 {
974  /* not used */
975 }
976 
977 void
979 {
980  /* not used */
981 }
982 
983 
984 
985 void
986 plexus_cmd_bot_nick (char *nick, char *user, char *host, char *real,
987  char *modes)
988 {
989  EnforceQlinedNick (nick, NULL);
990  send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
991  (long int) time (NULL), modes, user, host, ServerName, host,
992  real);
993  plexus_cmd_sqline (nick, "Reserved for services");
994 
995 }
996 
997 void
998 plexus_cmd_part (char *nick, char *chan, char *buf)
999 {
1000  if (buf)
1001  {
1002  send_cmd (nick, "PART %s :%s", chan, buf);
1003  }
1004  else
1005  {
1006  send_cmd (nick, "PART %s", chan);
1007  }
1008 }
1009 
1010 int
1011 anope_event_ping (char *source, int ac, char **av)
1012 {
1013  if (ac < 1)
1014  return MOD_CONT;
1015  plexus_cmd_pong (ac > 1 ? av[1] : ServerName, av[0]);
1016  return MOD_CONT;
1017 }
1018 
1019 int
1020 anope_event_away (char *source, int ac, char **av)
1021 {
1022  if (!source)
1023  {
1024  return MOD_CONT;
1025  }
1026  m_away (source, (ac ? av[0] : NULL));
1027  return MOD_CONT;
1028 }
1029 
1030 int
1031 anope_event_kill (char *source, int ac, char **av)
1032 {
1033  if (ac != 2)
1034  return MOD_CONT;
1035 
1036  m_kill (av[0], av[1]);
1037  return MOD_CONT;
1038 }
1039 
1040 int
1041 anope_event_kick (char *source, int ac, char **av)
1042 {
1043  if (ac != 3)
1044  return MOD_CONT;
1045  do_kick (source, ac, av);
1046  return MOD_CONT;
1047 }
1048 
1049 int
1050 anope_event_eob (char *source, int ac, char **av)
1051 {
1052  Server *s;
1053  s = findserver (servlist, source);
1054  /* If we found a server with the given source, that one just
1055  * finished bursting. If there was no source, then our uplink
1056  * server finished bursting. -GD
1057  */
1058  if (!s && serv_uplink)
1059  s = serv_uplink;
1060  finish_sync (s, 1);
1061 
1062  return MOD_CONT;
1063 }
1064 
1065 void
1067 {
1068  send_cmd (ServerName, "EOB");
1069 }
1070 
1071 
1072 int
1073 anope_event_join (char *source, int ac, char **av)
1074 {
1075  if (ac != 1)
1076  return MOD_CONT;
1077  do_join (source, ac, av);
1078  return MOD_CONT;
1079 }
1080 
1081 int
1082 anope_event_motd (char *source, int ac, char **av)
1083 {
1084  if (!source)
1085  {
1086  return MOD_CONT;
1087  }
1088 
1089  m_motd (source);
1090  return MOD_CONT;
1091 }
1092 
1093 int
1094 anope_event_privmsg (char *source, int ac, char **av)
1095 {
1096  if (ac != 2)
1097  return MOD_CONT;
1098  m_privmsg (source, av[0], av[1]);
1099  return MOD_CONT;
1100 }
1101 
1102 int
1103 anope_event_part (char *source, int ac, char **av)
1104 {
1105  if (ac < 1 || ac > 2)
1106  return MOD_CONT;
1107  do_part (source, ac, av);
1108  return MOD_CONT;
1109 }
1110 
1111 int
1112 anope_event_whois (char *source, int ac, char **av)
1113 {
1114  if (source && ac >= 1)
1115  {
1116  m_whois (source, av[0]);
1117  }
1118  return MOD_CONT;
1119 }
1120 
1121 /* EVENT: SERVER */
1122 int
1123 anope_event_server (char *source, int ac, char **av)
1124 {
1125  if (!stricmp (av[1], "1"))
1126  {
1127  uplink = sstrdup (av[0]);
1128  }
1129  do_server (source, av[0], av[1], av[2], NULL);
1130  return MOD_CONT;
1131 }
1132 
1133 int
1134 anope_event_squit (char *source, int ac, char **av)
1135 {
1136  if (ac != 2)
1137  return MOD_CONT;
1138  do_squit (source, ac, av);
1139  return MOD_CONT;
1140 }
1141 
1142 int
1143 anope_event_quit (char *source, int ac, char **av)
1144 {
1145  if (ac != 1)
1146  return MOD_CONT;
1147  do_quit (source, ac, av);
1148  return MOD_CONT;
1149 }
1150 
1151 void
1152 plexus_cmd_372 (char *source, char *msg)
1153 {
1154  send_cmd (ServerName, "372 %s :- %s", source, msg);
1155 }
1156 
1157 void
1158 plexus_cmd_372_error (char *source)
1159 {
1160  send_cmd (ServerName, "422 %s :- MOTD file not found! Please "
1161  "contact your IRC administrator.", source);
1162 }
1163 
1164 void
1165 plexus_cmd_375 (char *source)
1166 {
1167  send_cmd (ServerName, "375 %s :- %s Message of the Day",
1168  source, ServerName);
1169 }
1170 
1171 void
1172 plexus_cmd_376 (char *source)
1173 {
1174  send_cmd (ServerName, "376 %s :End of /MOTD command.", source);
1175 }
1176 
1177 /* 391 */
1178 void
1179 plexus_cmd_391 (char *source, char *timestr)
1180 {
1181  if (!timestr)
1182  {
1183  return;
1184  }
1185  send_cmd (ServerName, "391 :%s %s :%s", source, ServerName, timestr);
1186 }
1187 
1188 /* 250 */
1189 void
1190 plexus_cmd_250 (char *buf)
1191 {
1192  if (!buf)
1193  {
1194  return;
1195  }
1196 
1197  send_cmd (ServerName, "250 %s", buf);
1198 }
1199 
1200 /* 307 */
1201 void
1202 plexus_cmd_307 (char *buf)
1203 {
1204  if (!buf)
1205  {
1206  return;
1207  }
1208 
1209  send_cmd (ServerName, "307 %s", buf);
1210 }
1211 
1212 /* 311 */
1213 void
1214 plexus_cmd_311 (char *buf)
1215 {
1216  if (!buf)
1217  {
1218  return;
1219  }
1220 
1221  send_cmd (ServerName, "311 %s", buf);
1222 }
1223 
1224 /* 312 */
1225 void
1226 plexus_cmd_312 (char *buf)
1227 {
1228  if (!buf)
1229  {
1230  return;
1231  }
1232 
1233  send_cmd (ServerName, "312 %s", buf);
1234 }
1235 
1236 /* 317 */
1237 void
1238 plexus_cmd_317 (char *buf)
1239 {
1240  if (!buf)
1241  {
1242  return;
1243  }
1244 
1245  send_cmd (ServerName, "317 %s", buf);
1246 }
1247 
1248 /* 219 */
1249 void
1250 plexus_cmd_219 (char *source, char *letter)
1251 {
1252  if (!source)
1253  {
1254  return;
1255  }
1256 
1257  if (letter)
1258  {
1259  send_cmd (ServerName, "219 %s %c :End of /STATS report.", source,
1260  *letter);
1261  }
1262  else
1263  {
1264  send_cmd (ServerName, "219 %s l :End of /STATS report.", source);
1265  }
1266 }
1267 
1268 /* 401 */
1269 void
1270 plexus_cmd_401 (char *source, char *who)
1271 {
1272  if (!source || !who)
1273  {
1274  return;
1275  }
1276  send_cmd (ServerName, "401 %s %s :No such service.", source, who);
1277 }
1278 
1279 /* 318 */
1280 void
1281 plexus_cmd_318 (char *source, char *who)
1282 {
1283  if (!source || !who)
1284  {
1285  return;
1286  }
1287 
1288  send_cmd (ServerName, "318 %s %s :End of /WHOIS list.", source, who);
1289 }
1290 
1291 /* 242 */
1292 void
1293 plexus_cmd_242 (char *buf)
1294 {
1295  if (!buf)
1296  {
1297  return;
1298  }
1299 
1300  send_cmd (ServerName, "242 %s", buf);
1301 }
1302 
1303 /* 243 */
1304 void
1305 plexus_cmd_243 (char *buf)
1306 {
1307  if (!buf)
1308  {
1309  return;
1310  }
1311 
1312  send_cmd (ServerName, "243 %s", buf);
1313 }
1314 
1315 /* 211 */
1316 void
1317 plexus_cmd_211 (char *buf)
1318 {
1319  if (!buf)
1320  {
1321  return;
1322  }
1323 
1324  send_cmd (ServerName, "211 %s", buf);
1325 }
1326 
1327 void
1328 plexus_cmd_mode (char *source, char *dest, char *buf)
1329 {
1330  if (!buf)
1331  {
1332  return;
1333  }
1334 
1335  send_cmd (source, "MODE %s %s", dest, buf);
1336 }
1337 
1338 void
1339 plexus_cmd_nick (char *nick, char *name, char *mode)
1340 {
1341  EnforceQlinedNick (nick, NULL);
1342  send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
1343  (long int) time (NULL), mode, ServiceUser, ServiceHost,
1344  ServerName, ServiceHost, (name));
1345  send_cmd (nick, "RESV * %s :%s", nick, "Reserved for services");
1346 }
1347 
1348 void
1349 plexus_cmd_kick (char *source, char *chan, char *user, char *buf)
1350 {
1351  if (buf)
1352  {
1353  send_cmd (source, "KICK %s %s :%s", chan, user, buf);
1354  }
1355  else
1356  {
1357  send_cmd (source, "KICK %s %s", chan, user);
1358  }
1359 }
1360 
1361 void
1362 plexus_cmd_notice_ops (char *source, char *dest, char *buf)
1363 {
1364  if (!buf)
1365  {
1366  return;
1367  }
1368 
1369  send_cmd (ServerName, "NOTICE @%s :%s", dest, buf);
1370 }
1371 
1372 void
1373 plexus_cmd_bot_chan_mode (char *nick, char *chan)
1374 {
1375  anope_cmd_mode (nick, chan, "%s %s %s", myIrcd->botchanumode, nick, nick);
1376 }
1377 
1378 /* QUIT */
1379 void
1380 plexus_cmd_quit (char *source, char *buf)
1381 {
1382  if (buf)
1383  {
1384  send_cmd (source, "QUIT :%s", buf);
1385  }
1386  else
1387  {
1388  send_cmd (source, "QUIT");
1389  }
1390 }
1391 
1392 /* PONG */
1393 void
1394 plexus_cmd_pong (char *servname, char *who)
1395 {
1396  send_cmd (servname, "PONG %s", who);
1397 }
1398 
1399 /* INVITE */
1400 void
1401 plexus_cmd_invite (char *source, char *chan, char *nick)
1402 {
1403  if (!source || !chan || !nick)
1404  {
1405  return;
1406  }
1407 
1408  send_cmd (source, "INVITE %s %s", nick, chan);
1409 }
1410 
1411 /* SQUIT */
1412 void
1413 plexus_cmd_squit (char *servname, char *message)
1414 {
1415  if (!servname || !message)
1416  {
1417  return;
1418  }
1419 
1420  send_cmd (ServerName, "SQUIT %s :%s", servname, message);
1421 }
1422 
1423 int
1424 anope_event_mode (char *source, int ac, char **av)
1425 {
1426  if (ac < 2)
1427  return MOD_CONT;
1428 
1429  if (*av[0] == '#' || *av[0] == '&')
1430  {
1431  do_cmode (source, ac, av);
1432  }
1433  else
1434  {
1435  Server *s;
1436  s = findserver (servlist, source);
1437 
1438  if (s && *av[0])
1439  {
1440  do_umode (av[0], ac, av);
1441  }
1442  else
1443  {
1444  do_umode (source, ac, av);
1445  }
1446  }
1447  return MOD_CONT;
1448 }
1449 
1450 void
1451 plexus_cmd_351 (char *source)
1452 {
1453  send_cmd (ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
1456 }
1457 
1458 /* Event: PROTOCTL */
1459 int
1460 anope_event_capab (char *source, int ac, char **av)
1461 {
1462  int argvsize = 8;
1463  int argc;
1464  char **argv;
1465  char *str;
1466 
1467  if (ac < 1)
1468  return MOD_CONT;
1469 
1470  /* We get the params as one arg, we should split it for capab_parse */
1471  argv = scalloc (argvsize, sizeof (char *));
1472  argc = 0;
1473  while ((str = myStrGetToken (av[0], ' ', argc)))
1474  {
1475  if (argc == argvsize)
1476  {
1477  argvsize += 8;
1478  argv = srealloc (argv, argvsize * sizeof (char *));
1479  }
1480  argv[argc] = str;
1481  argc++;
1482  }
1483 
1484  capab_parse (argc, argv);
1485 
1486  /* Free our built ac/av */
1487  for (argvsize = 0; argvsize < argc; argvsize++)
1488  {
1489  free (argv[argvsize]);
1490  }
1491  free (argv);
1492 
1493  return MOD_CONT;
1494 }
1495 
1496 /* SVSHOLD - set */
1497 void
1499 {
1500  send_cmd (s_OperServ, "ENCAP * RESV %d %s 0 :%s", NSReleaseTimeout, nick,
1501  "This nick is being held for a registered user. "
1502  "For help with regaining nicknames please see /nickserv help release");
1503 }
1504 
1505 /* SVSHOLD - release */
1506 void
1508 {
1509  send_cmd (s_OperServ, "UNRESV * %s", nick);
1510 }
1511 
1512 /* SVSNICK */
1513 void
1514 plexus_cmd_svsnick (char *nick, char *newnick, time_t when)
1515 {
1516  User *u;
1517 
1518  if (!nick || !newnick)
1519  return;
1520 
1521  if( (u = finduser (nick))) {
1522  send_cmd (ServerName, "ENCAP * SVSNICK %s %ld %s %ld",
1523  u->nick, (long int) u->timestamp, newnick, (long int) when);
1524  }
1525 }
1526 
1527 void
1528 plexus_cmd_guest_nick (char *nick, char *user, char *host, char *real,
1529  char *modes)
1530 {
1531  send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
1532  (long int) time (NULL), modes, user, host, ServerName, host,
1533  real);
1534 }
1535 
1536 void
1537 plexus_cmd_svso (char *source, char *nick, char *flag)
1538 {
1539  /* Not Supported by this IRCD */
1540 }
1541 
1542 void
1543 plexus_cmd_unban (char *name, char *nick)
1544 {
1545  /* Not Supported by this IRCD */
1546 }
1547 
1548 /* SVSMODE channel modes */
1549 
1550 void
1551 plexus_cmd_svsmode_chan (char *name, char *mode, char *nick)
1552 {
1553  /* Not Supported by this IRCD */
1554 }
1555 
1556 /* SVSMODE +d */
1557 /* sent if svid is something weird */
1558 void
1559 plexus_cmd_svid_umode (char *nick, time_t ts)
1560 {
1561  send_cmd (ServerName, "ENCAP * SVSMODE %s %lu +d 1", nick,
1562  (unsigned long int) ts);
1563 }
1564 
1565 /* SVSMODE +d */
1566 /* nc_change was = 1, and there is no na->status */
1567 void
1569 {
1570  common_svsmode (u, "+d", "1");
1571 }
1572 
1573 /* SVSMODE +d */
1574 void
1576 {
1577  /* not used */
1578 }
1579 
1580 void
1582 {
1583  char modes[512];
1584 
1585  strlcpy(modes, "+r", sizeof(modes));
1586 
1587  if(ircd->rootmodeonid && is_services_root(u)) {
1588  strlcat(modes, ircd->rootmodeonid, sizeof(modes));
1589  } else if(ircd->adminmodeonid && is_services_admin(u)) {
1590  strlcat(modes, ircd->adminmodeonid, sizeof(modes));
1591  } else if(ircd->opermodeonid && is_services_oper(u)) {
1592  strlcat(modes, ircd->opermodeonid, sizeof(modes));
1593  }
1594  if (u->svid != u->timestamp) {
1595  strlcat(modes, "d", sizeof(modes));
1596  common_svsmode (u, modes, ts);
1597  } else {
1598  common_svsmode (u, modes, NULL);
1599  }
1600 }
1601 
1602 /* NICK <newnick> */
1603 void
1604 plexus_cmd_chg_nick (char *oldnick, char *newnick)
1605 {
1606  if (!oldnick || !newnick)
1607  {
1608  return;
1609  }
1610 
1611  send_cmd (oldnick, "NICK %s", newnick);
1612 }
1613 
1614 /*
1615  * SVINFO
1616  * parv[0] = sender prefix
1617  * parv[1] = TS_CURRENT for the server
1618  * parv[2] = TS_MIN for the server
1619  * parv[3] = server is standalone or connected to non-TS only
1620  * parv[4] = server's idea of UTC time
1621  */
1622 int
1623 anope_event_svinfo (char *source, int ac, char **av)
1624 {
1625  /* currently not used but removes the message : unknown message from server */
1626  return MOD_CONT;
1627 }
1628 
1629 int
1630 anope_event_pass (char *source, int ac, char **av)
1631 {
1632  /* currently not used but removes the message : unknown message from server */
1633  return MOD_CONT;
1634 }
1635 
1636 void
1637 plexus_cmd_svsjoin (char *source, char *nick, char *chan, char *param)
1638 {
1639  send_cmd(ServerName, "ENCAP * SVSJOIN %s %s", nick, chan);
1640 }
1641 
1642 void
1643 plexus_cmd_svspart (char *source, char *nick, char *chan)
1644 {
1645  send_cmd(ServerName, "ENCAP * SVSPART %s %s", nick, chan);
1646 }
1647 
1648 void
1649 plexus_cmd_swhois (char *source, char *who, char *mask)
1650 {
1651  /* not supported */
1652 }
1653 
1654 int
1655 anope_event_notice (char *source, int ac, char **av)
1656 {
1657  return MOD_CONT;
1658 }
1659 
1660 int
1661 anope_event_admin (char *source, int ac, char **av)
1662 {
1663  return MOD_CONT;
1664 }
1665 
1666 int
1667 anope_event_invite (char *source, int ac, char **av)
1668 {
1669  return MOD_CONT;
1670 }
1671 
1672 int
1674 {
1675  return 0;
1676 }
1677 
1678 int
1679 anope_event_error (char *source, int ac, char **av)
1680 {
1681  if (ac >= 1)
1682  {
1683  if (debug)
1684  {
1685  alog ("debug: %s", av[0]);
1686  }
1687  }
1688  return MOD_CONT;
1689 }
1690 
1691 void
1692 plexus_cmd_jupe (char *jserver, char *who, char *reason)
1693 {
1694  char rbuf[256];
1695 
1696  snprintf (rbuf, sizeof (rbuf), "(H) Juped by %s%s%s", who,
1697  reason ? ": " : "", reason ? reason : "");
1698 
1699  if (findserver(servlist, jserver))
1700  plexus_cmd_squit (jserver, rbuf);
1701  plexus_cmd_server (jserver, 2, rbuf);
1702  new_server (me_server, jserver, rbuf, SERVER_JUPED, NULL);
1703 }
1704 
1705 /*
1706  1 = valid nick
1707  0 = nick is in valid
1708 */
1709 int
1710 plexus_valid_nick (char *nick)
1711 {
1712  /* no hard coded invalid nicks */
1713  return 1;
1714 }
1715 
1716 /*
1717  1 = valid chan
1718  0 = chan is in valid
1719 */
1720 int
1721 plexus_valid_chan (char *chan)
1722 {
1723  /* no hard coded invalid chan */
1724  return 1;
1725 }
1726 
1727 
1728 void
1729 plexus_cmd_ctcp (char *source, char *dest, char *buf)
1730 {
1731  char *s;
1732 
1733  if (!buf)
1734  {
1735  return;
1736  }
1737  else
1738  {
1739  s = normalizeBuffer (buf);
1740  }
1741 
1742  send_cmd (source, "NOTICE %s :\1%s \1", dest, s);
1743  free (s);
1744 }
1745 
1746 
1751 void
1753 {
1829 }
1830 
1834 int
1835 AnopeInit (int argc, char **argv)
1836 {
1837 
1838  moduleAddAuthor ("Anope");
1839  moduleAddVersion (VERSION_STRING);
1841 
1842  pmodule_ircd_version ("hybrid-7.2.1+plexus-3.0.0+");
1843  pmodule_ircd_cap (myIrcdcap);
1844  pmodule_ircd_var (myIrcd);
1845  pmodule_ircd_cbmodeinfos (myCbmodeinfos);
1846  pmodule_ircd_cumodes (myCumodes);
1849  pmodule_ircd_cbmodes (myCbmodes);
1850  pmodule_ircd_cmmodes (myCmmodes);
1853 
1863 
1864  moduleAddAnopeCmds ();
1865  moduleAddIRCDMsgs ();
1866 
1867  return MOD_CONT;
1868 }
1869 
1870 /* EOF */
E void pmodule_cmd_vhost_off(void(*func)(User *u))
Definition: ircd.c:713
int anope_event_whois(char *source, int ac, char **av)
Definition: plexus3.c:1112
E void pmodule_permchan_mode(int mode)
Definition: ircd.c:1206
void plexus_cmd_invite(char *source, char *chan, char *nick)
Definition: plexus3.c:1401
void plexus_cmd_server(char *servname, int hop, char *descript)
Definition: plexus3.c:949
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
E void do_topic(const char *source, int ac, char **av)
Definition: channels.c:1249
int AnopeInit(int argc, char **argv)
Definition: plexus3.c:1835
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
#define CMODE_z
Definition: charybdis.h:40
E char * RemotePassword
Definition: extern.h:264
#define CAPAB_UID
Definition: services.h:1381
void plexus_cmd_311(char *buf)
Definition: plexus3.c:1214
void plexus_cmd_391(char *source, char *timestr)
Definition: plexus3.c:1179
int anope_event_capab(char *source, int ac, char **av)
Definition: plexus3.c:1460
CMMode myCmmodes[128]
Definition: plexus3.c:297
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
Definition: ircd.c:827
E size_t strlcpy(char *, const char *, size_t)
Definition: misc.c:1293
#define UMODE_R
Definition: bahamut.h:42
int anope_event_join(char *source, int ac, char **av)
Definition: plexus3.c:1073
IRCDCAPAB myIrcdcap[]
Definition: plexus3.c:116
char nick[NICKMAX]
Definition: services.h:875
void plexus_cmd_312(char *buf)
Definition: plexus3.c:1226
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 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
char * adminmodeonid
Definition: services.h:309
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 plexus_cmd_372_error(char *source)
Definition: plexus3.c:1158
void plexus_cmd_318(char *source, char *who)
Definition: plexus3.c:1281
int anope_event_admin(char *source, int ac, char **av)
Definition: plexus3.c:1661
void plexus_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: plexus3.c:519
#define UMODE_w
Definition: bahamut.h:21
#define CBM_MINUS_NO_ARG
Definition: services.h:928
int anope_event_server(char *source, int ac, char **av)
Definition: plexus3.c:1123
void plexus_cmd_swhois(char *source, char *who, char *mask)
Definition: plexus3.c:1649
E IRCDVar * ircd
Definition: extern.h:39
int anope_event_mode(char *source, int ac, char **av)
Definition: plexus3.c:1424
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
void plexus_cmd_part(char *nick, char *chan, char *buf)
Definition: plexus3.c:998
E void pmodule_valid_nick(int(*func)(char *nick))
Definition: ircd.c:1082
E void cs_set_limit(ChannelInfo *ci, char *value)
Definition: chanserv.c:2558
void moduleAddIRCDMsgs(void)
Definition: plexus3.c:688
int anope_event_nick(char *source, int ac, char **av)
Definition: plexus3.c:563
void plexus_cmd_svinfo()
Definition: plexus3.c:906
E int nick_identified(User *u)
Definition: nickserv.c:1111
CBModeInfo myCbmodeinfos[]
Definition: plexus3.c:413
void plexus_cmd_global(char *source, char *buf)
Definition: plexus3.c:538
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 send_event(const char *name, int argc,...)
Definition: events.c:37
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
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 plexus_cmd_join(char *user, char *channel, time_t chantime)
Definition: plexus3.c:850
E void pmodule_cmd_211(void(*func)(char *buf))
Definition: ircd.c:924
char * opermodeonid
Definition: services.h:310
void plexus_cmd_mode(char *source, char *dest, char *buf)
Definition: plexus3.c:1328
void plexus_cmd_211(char *buf)
Definition: plexus3.c:1317
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
CBMode myCbmodes[128]
Definition: plexus3.c:347
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
void plexus_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: plexus3.c:824
int anope_event_notice(char *source, int ac, char **av)
Definition: plexus3.c:1655
#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 plexus_cmd_sgline(char *mask, char *reason)
Definition: plexus3.c:798
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
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
char topic_setter[NICKMAX]
Definition: services.h:1004
E void pmodule_cmd_invite(void(*func)(char *source, char *chan, char *nick))
Definition: ircd.c:859
#define CMODE_M
Definition: bahamut.h:55
E void pmodule_ircd_var(IRCDVar *ircdvar)
Definition: ircd.c:1097
E void do_umode(const char *source, int ac, char **av)
Definition: users.c:816
void plexus_cmd_ctcp(char *source, char *dest, char *buf)
Definition: plexus3.c:1729
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
Definition: modules.c:1470
void plexus_cmd_vhost_off(User *u)
Definition: plexus3.c:818
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_i
Definition: bahamut.h:18
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 CMODE_n
Definition: bahamut.h:46
#define CMODE_R
Definition: bahamut.h:52
E char * strscpy(char *d, const char *s, size_t len)
Definition: db-merger.c:1886
E void pmodule_cmd_unsgline(void(*func)(char *mask))
Definition: ircd.c:991
void plexus_cmd_privmsg(char *source, char *dest, char *buf)
Definition: plexus3.c:508
int anope_event_kill(char *source, int ac, char **av)
Definition: plexus3.c:1031
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void EnforceQlinedNick(char *nick, char *killer)
Definition: misc.c:837
CUMode myCumodes[128]
Definition: plexus3.c:434
void plexus_cmd_svid_umode(char *nick, time_t ts)
Definition: plexus3.c:1559
#define CMODE_t
Definition: bahamut.h:49
E char * cs_get_key(ChannelInfo *ci)
Definition: chanserv.c:2447
int anope_event_sjoin(char *source, int ac, char **av)
Definition: plexus3.c:556
MDE void moduleSetType(MODType type)
Definition: modules.c:818
int anope_event_away(char *source, int ac, char **av)
Definition: plexus3.c:1020
void plexus_cmd_250(char *buf)
Definition: plexus3.c:1190
void moduleAddAnopeCmds()
Definition: plexus3.c:1752
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
void plexus_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: plexus3.c:525
E Channel * findchan(const char *chan)
Definition: channels.c:394
void plexus_cmd_376(char *source)
Definition: plexus3.c:1172
E void do_sjoin(const char *source, int ac, char **av)
Definition: channels.c:803
void plexus_cmd_svskill(char *source, char *user, char *buf)
Definition: plexus3.c:874
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
void plexus_cmd_219(char *source, char *letter)
Definition: plexus3.c:1250
E void do_join(const char *source, int ac, char **av)
Definition: channels.c:556
E void * scalloc(long elsize, long els)
Definition: memory.c:55
void plexus_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: plexus3.c:866
E int is_services_root(User *u)
Definition: operserv.c:577
E int m_nickcoll(char *user)
Definition: messages.c:20
E void pmodule_cmd_375(void(*func)(char *source))
Definition: ircd.c:746
void plexus_cmd_capab()
Definition: plexus3.c:934
int anope_event_tburst(char *source, int ac, char **av)
Definition: plexus3.c:629
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
void plexus_cmd_release_svshold(char *nick)
Definition: plexus3.c:1507
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
int anope_event_pass(char *source, int ac, char **av)
Definition: plexus3.c:1630
int anope_event_ping(char *source, int ac, char **av)
Definition: plexus3.c:1011
E char * ServiceHost
Definition: extern.h:277
#define UMODE_x
Definition: bahamut.h:23
int anope_event_svinfo(char *source, int ac, char **av)
Definition: plexus3.c:1623
E void record_topic(const char *chan)
Definition: chanserv.c:1645
E char * EncModule
Definition: extern.h:580
#define CMODE_B
Definition: inspircd12.h:67
void plexus_cmd_svsinfo()
Definition: plexus3.c:978
E void pmodule_invite_cmode(int mode)
Definition: ircd.c:1181
void plexus_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: plexus3.c:986
void plexus_cmd_unsqline(char *user)
Definition: plexus3.c:844
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
void plexus_cmd_351(char *source)
Definition: plexus3.c:1451
E char * uplink
Definition: extern.h:35
E User * finduser(const char *nick)
Definition: users.c:323
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
void plexus_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: plexus3.c:1528
void plexus_cmd_svid_umode3(User *u, char *ts)
Definition: plexus3.c:1581
void plexus_cmd_372(char *source, char *msg)
Definition: plexus3.c:1152
int plexus_valid_chan(char *chan)
Definition: plexus3.c:1721
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
#define UMODE_a
Definition: bahamut.h:16
void plexus_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: plexus3.c:1349
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 plexus_cmd_242(char *buf)
Definition: plexus3.c:1293
E char * merge_args(int argc, char **argv)
Definition: misc.c:180
#define CAPAB_QS
Definition: services.h:1378
int anope_event_kick(char *source, int ac, char **av)
Definition: plexus3.c:1041
int anope_event_eob(char *source, int ac, char **av)
Definition: plexus3.c:1050
#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 plexus_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: plexus3.c:1551
Command * c
Definition: ns_recover.c:17
IRCDVar myIrcd[]
Definition: plexus3.c:17
void plexus_cmd_szline(char *mask, char *reason, char *whom)
Definition: plexus3.c:779
void plexus_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: plexus3.c:1362
int anope_event_privmsg(char *source, int ac, char **av)
Definition: plexus3.c:1094
int plexus_flood_mode_check(char *value)
Definition: plexus3.c:1673
E void alog(const char *fmt,...) FORMAT(printf
E int servernum
Definition: extern.h:615
void plexus_cmd_unsgline(char *mask)
Definition: plexus3.c:767
void plexus_cmd_svsmode(User *u, int ac, char **av)
Definition: plexus3.c:890
#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
void plexus_cmd_eob()
Definition: plexus3.c:1066
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
void plexus_cmd_notice2(char *source, char *dest, char *msg)
Definition: plexus3.c:502
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
E void pmodule_ircd_csmodes(char mode[128])
Definition: ircd.c:1151
void plexus_cmd_307(char *buf)
Definition: plexus3.c:1202
E void pmodule_cmd_242(void(*func)(char *buf))
Definition: ircd.c:914
int anope_event_motd(char *source, int ac, char **av)
Definition: plexus3.c:1082
#define NI_MSG
Definition: services.h:1292
E int debug
Definition: extern.h:775
void plexus_cmd_notice(char *source, char *dest, char *buf)
Definition: plexus3.c:484
E int is_services_admin(User *u)
Definition: operserv.c:591
#define EVENT_TOPIC_UPDATED
Definition: events.h:30
E void set_limit(Channel *chan, char *value)
Definition: channels.c:2011
void plexus_cmd_nc_change(User *u)
Definition: plexus3.c:1568
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 plexus_cmd_bob()
Definition: plexus3.c:972
void plexus_cmd_remove_akill(char *user, char *host)
Definition: plexus3.c:804
E int NSDefFlags
Definition: extern.h:377
#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
void plexus_cmd_connect(int servernum)
Definition: plexus3.c:955
E void pmodule_cmd_250(void(*func)(char *buf))
Definition: ircd.c:874
char * topic
Definition: services.h:1003
void plexus_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
Definition: plexus3.c:1637
void plexus_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: plexus3.c:531
E void pmodule_ircd_version(char *version)
Definition: ircd.c:1107
E const char version_number[]
Definition: extern.h:767
void plexus_cmd_svsnoop(char *server, int set)
Definition: plexus3.c:785
#define CMODE_m
Definition: bahamut.h:45
E void pmodule_cmd_unszline(void(*func)(char *mask))
Definition: ircd.c:996
E int check_topiclock(Channel *c, time_t topic_time)
Definition: chanserv.c:1721
E void cs_set_key(ChannelInfo *ci, char *value)
Definition: chanserv.c:2538
E void anope_cmd_mode(char *source, char *dest, const char *fmt,...)
Definition: ircd.c:211
E void pmodule_cmd_401(void(*func)(char *source, char *who))
Definition: ircd.c:904
E Server * serv_uplink
Definition: extern.h:1053
void plexus_cmd_bot_chan_mode(char *nick, char *chan)
Definition: plexus3.c:1373
E int WallOper
Definition: extern.h:448
E void pmodule_cmd_svso(void(*func)(char *source, char *nick, char *flag))
Definition: ircd.c:949
int anope_event_encap(char *source, int ac, char **av)
Definition: plexus3.c:648
unsigned long umodes[128]
Definition: plexus3.c:224
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
char myCsmodes[128]
Definition: plexus3.c:276
void plexus_cmd_svso(char *source, char *nick, char *flag)
Definition: plexus3.c:1537
E void pmodule_cmd_remove_akill(void(*func)(char *user, char *host))
Definition: ircd.c:701
void plexus_cmd_sqline(char *mask, char *reason)
Definition: plexus3.c:761
int anope_event_part(char *source, int ac, char **av)
Definition: plexus3.c:1103
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
time_t topic_time
Definition: services.h:1005
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
void plexus_set_umode(User *user, int ac, char **av)
Definition: plexus3.c:152
#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 plexus_cmd_243(char *buf)
Definition: plexus3.c:1305
#define UMODE_N
Definition: plexus3.h:22
int anope_event_squit(char *source, int ac, char **av)
Definition: plexus3.c:1134
void plexus_cmd_svid_umode2(User *u, char *ts)
Definition: plexus3.c:1575
int anope_event_error(char *source, int ac, char **av)
Definition: plexus3.c:1679
E void add_exception(Channel *chan, char *mask)
Definition: channels.c:1377
#define CAPAB_TS5
Definition: services.h:1374
void plexus_cmd_unszline(char *mask)
Definition: plexus3.c:773
void plexus_cmd_svsnick(char *nick, char *newnick, time_t when)
Definition: plexus3.c:1514
#define CBM_NO_USER_MLOCK
Definition: services.h:930
void plexus_cmd_pass(char *pass)
Definition: plexus3.c:942
#define UMODE_S
Definition: charybdis.h:23
#define CMODE_k
Definition: bahamut.h:50
E void * srealloc(void *oldptr, long newsize)
Definition: memory.c:80
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
E Server * servlist
Definition: extern.h:1051
int anope_event_topic(char *source, int ac, char **av)
Definition: plexus3.c:582
#define DEFAULT_MLOCK
Definition: bahamut.h:59
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
E void capab_parse(int ac, char **av)
Definition: servers.c:451
void plexus_cmd_jupe(char *jserver, char *who, char *reason)
Definition: plexus3.c:1692
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 void pmodule_cmd_guest_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
Definition: ircd.c:761
void plexus_cmd_global_legacy(char *source, char *fmt)
Definition: plexus3.c:550
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
int anope_event_436(char *source, int ac, char **av)
Definition: plexus3.c:677
void plexus_cmd_317(char *buf)
Definition: plexus3.c:1238
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
E void pmodule_cmd_svshold(void(*func)(char *nick))
Definition: ircd.c:981
#define SERVER_ISME
Definition: services.h:865
void plexus_cmd_nick(char *nick, char *name, char *mode)
Definition: plexus3.c:1339
void plexus_cmd_pong(char *servname, char *who)
Definition: plexus3.c:1394
void plexus_cmd_401(char *source, char *who)
Definition: plexus3.c:1270
E size_t strlcat(char *, const char *, size_t)
Definition: misc.c:1263
void plexus_cmd_quit(char *source, char *buf)
Definition: plexus3.c:1380
E void pmodule_cmd_serv_notice(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:816
E char * get_key(Channel *chan)
Definition: channels.c:1874
E int m_whois(char *source, char *who)
Definition: messages.c:366
int anope_event_invite(char *source, int ac, char **av)
Definition: plexus3.c:1667
int plexus_valid_nick(char *nick)
Definition: plexus3.c:1710
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
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
void plexus_cmd_chg_nick(char *oldnick, char *newnick)
Definition: plexus3.c:1604
E void pmodule_flood_mode_check(int(*func)(char *value))
Definition: ircd.c:1092
#define NEWS_OPER
Definition: services.h:1050
E void pmodule_ircd_cbmodeinfos(CBModeInfo *modeinfos)
Definition: ircd.c:1112
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
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
char * rootmodeonid
Definition: services.h:308
#define CAPAB_ZIP
Definition: services.h:1371
E void pmodule_limit_mode(int mode)
Definition: ircd.c:1201
void plexus_cmd_svsadmin(char *server, int set)
Definition: plexus3.c:792
#define CMODE_i
Definition: bahamut.h:44
#define CMODE_S
Definition: hybrid.h:46
int anope_event_quit(char *source, int ac, char **av)
Definition: plexus3.c:1143
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
void plexus_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: plexus3.c:810
E void pmodule_ircd_flood_mode_char_set(char *mode)
Definition: ircd.c:1125
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
#define CMODE_s
Definition: bahamut.h:48
#define CUS_OP
Definition: services.h:1341
E char * normalizeBuffer(char *)
Definition: botserv.c:1101
void plexus_cmd_svshold(char *nick)
Definition: plexus3.c:1498
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
void plexus_cmd_svspart(char *source, char *nick, char *chan)
Definition: plexus3.c:1643
void plexus_cmd_375(char *source)
Definition: plexus3.c:1165
#define CUF_PROTECT_BOTSERV
Definition: services.h:956
void plexus_cmd_unban(char *name, char *nick)
Definition: plexus3.c:1543
void plexus_cmd_squit(char *servname, char *message)
Definition: plexus3.c:1413
#define UMODE_o
Definition: bahamut.h:19
E void pmodule_cmd_219(void(*func)(char *source, char *letter))
Definition: ircd.c:899
#define CAPAB_KNOCK
Definition: services.h:1382