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