Anope IRC Services  Version 1.8
dreamforge.c
Go to the documentation of this file.
1 /* DreamForge 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  */
13 
14 #include "services.h"
15 #include "pseudo.h"
16 #include "dreamforge.h"
17 #include "version.h"
18 
20  {"DreamForge 4.6.7", /* ircd name */
21  "+o", /* nickserv mode */
22  "+o", /* chanserv mode */
23  "+o", /* memoserv mode */
24  "+", /* hostserv mode */
25  "+io", /* operserv mode */
26  "+o", /* botserv mode */
27  "+h", /* helpserv mode */
28  "+i", /* Dev/Null mode */
29  "+io", /* Global mode */
30  "+o", /* nickserv alias mode */
31  "+o", /* chanserv alias mode */
32  "+o", /* memoserv alias mode */
33  "+", /* hostserv alias mode */
34  "+io", /* operserv alias mode */
35  "+o", /* botserv alias mode */
36  "+h", /* helpserv alias mode */
37  "+i", /* Dev/Null alias mode */
38  "+io", /* Global alias mode */
39  "+", /* Used by BotServ Bots */
40  2, /* Chan Max Symbols */
41  "-iklmnpstR", /* Modes to Remove */
42  "+o", /* Channel Umode used by Botserv bots */
43  1, /* SVSNICK */
44  0, /* Vhost */
45  0, /* Has Owner */
46  NULL, /* Mode to set for an owner */
47  NULL, /* Mode to unset for an owner */
48  NULL, /* Mode to set for chan admin */
49  NULL, /* Mode to unset for chan admin */
50  "+rd", /* Mode On Reg */
51  NULL, /* Mode on ID for Roots */
52  NULL, /* Mode on ID for Admins */
53  NULL, /* Mode on ID for Opers */
54  "-r+d", /* Mode on UnReg */
55  "+d", /* Mode on Nick Change */
56  0, /* Supports SGlines */
57  1, /* Supports SQlines */
58  0, /* Supports SZlines */
59  0, /* Supports Halfop +h */
60  3, /* Number of server args */
61  0, /* Join 2 Set */
62  0, /* Join 2 Message */
63  0, /* Has exceptions +e */
64  0, /* TS Topic Forward */
65  1, /* TS Topci Backward */
66  0, /* Protected Umode */
67  0, /* Has Admin */
68  0, /* Chan SQlines */
69  0, /* Quit on Kill */
70  0, /* SVSMODE unban */
71  0, /* Has Protect */
72  1, /* Reverse */
73  1, /* Chan Reg */
74  CMODE_r, /* Channel Mode */
75  0, /* vidents */
76  0, /* svshold */
77  1, /* time stamp on mode */
78  0, /* NICKIP */
79  0, /* O:LINE */
80  1, /* UMODE */
81  0, /* VHOST ON NICK */
82  0, /* Change RealName */
83  0, /* No Knock */
84  0, /* Admin Only */
85  DEFAULT_MLOCK, /* Default MLOCK */
86  0, /* Vhost Mode */
87  0, /* +f */
88  0, /* +L */
89  0, /* Mode */
90  0, /* Mode */
91  0,
92  1, /* No Knock requires +i */
93  NULL, /* CAPAB Chan Modes */
94  0, /* We support TOKENS */
95  1, /* TOKENS are CASE inSensitive */
96  0, /* TIME STAMPS are BASE64 */
97  0, /* +I support */
98  0, /* SJOIN ban char */
99  0, /* SJOIN except char */
100  0, /* SJOIN invite char */
101  0, /* Can remove User Channel Modes with SVSMODE */
102  0, /* Sglines are not enforced until user reconnects */
103  NULL, /* vhost char */
104  0, /* ts6 */
105  1, /* support helper umode */
106  0, /* p10 */
107  NULL, /* character set */
108  0, /* reports sync state */
109  0, /* CIDR channelbans */
110  0, /* +j */
111  0, /* +j mode */
112  0, /* Use delayed client introduction. */
113  }
114  ,
115  {NULL}
116 };
117 
119  {
120  CAPAB_NOQUIT, /* NOQUIT */
121  0, /* TSMODE */
122  0, /* UNCONNECT */
123  0, /* NICKIP */
124  0, /* SJOIN */
125  0, /* ZIP */
126  0, /* BURST */
127  0, /* TS5 */
128  0, /* TS3 */
129  0, /* DKEY */
130  0, /* PT4 */
131  0, /* SCS */
132  0, /* QS */
133  0, /* UID */
134  0, /* KNOCK */
135  0, /* CLIENT */
136  0, /* IPV6 */
137  0, /* SSJ5 */
138  0, /* SN2 */
139  CAPAB_TOKEN, /* TOKEN */
140  0, /* VHOST */
141  0, /* SSJ3 */
142  0, /* NICK2 */
143  0, /* UMODE2 */
144  0, /* VL */
145  0, /* TLKEXT */
146  0, /* DODKEY */
147  0, /* DOZIP */
148  0, 0, 0}
149 };
150 
151 void dreamforge_set_umode(User * user, int ac, char **av)
152 {
153  int add = 1; /* 1 if adding modes, 0 if deleting */
154  char *modes = av[0];
155 
156  ac--;
157 
158  if (debug)
159  alog("debug: Changing mode for %s to %s", user->nick, modes);
160 
161  while (*modes) {
162 
163  /* This looks better, much better than "add ? (do_add) : (do_remove)".
164  * At least this is readable without paying much attention :) -GD
165  */
166  if (add)
167  user->mode |= umodes[(int) *modes];
168  else
169  user->mode &= ~umodes[(int) *modes];
170 
171  switch (*modes++) {
172  case '+':
173  add = 1;
174  break;
175  case '-':
176  add = 0;
177  break;
178  case 'd':
179  if (ac == 0) {
180  alog("user: umode +d with no parameter (?) for user %s",
181  user->nick);
182  break;
183  }
184 
185  ac--;
186  av++;
187  user->svid = strtoul(*av, NULL, 0);
188  break;
189  case 'o':
190  if (add) {
191  opcnt++;
192 
193  if (WallOper)
195  "\2%s\2 is now an IRC operator.",
196  user->nick);
197  display_news(user, NEWS_OPER);
198 
199  } else {
200  opcnt--;
201  }
202  break;
203  case 'r':
204  if (add && !nick_identified(user)) {
205  common_svsmode(user, "-r", NULL);
206  user->mode &= ~UMODE_r;
207  }
208  break;
209  }
210  }
211 }
212 
213 
214 unsigned long umodes[128] = {
215  0, 0, 0, /* Unused */
216  0, 0, 0, /* Unused */
217  0, 0, 0, /* Unused, Unused, Horzontal Tab */
218  0, 0, 0, /* Line Feed, Unused, Unused */
219  0, 0, 0, /* Carriage Return, Unused, Unused */
220  0, 0, 0, /* Unused */
221  0, 0, 0, /* Unused */
222  0, 0, 0, /* Unused */
223  0, 0, 0, /* Unused */
224  0, 0, 0, /* Unused */
225  0, 0, 0, /* Unused, Unused, Space */
226  0, 0, 0, /* ! " # */
227  0, 0, 0, /* $ % & */
228  0, 0, 0, /* ! ( ) */
229  0, 0, 0, /* * + , */
230  0, 0, 0, /* - . / */
231  0, 0, /* 0 1 */
232  0, 0, /* 2 3 */
233  0, 0, /* 4 5 */
234  0, 0, /* 6 7 */
235  0, 0, /* 8 9 */
236  0, 0, /* : ; */
237  0, 0, 0, /* < = > */
238  0, 0, /* ? @ */
239  UMODE_A, 0, 0, /* A B C */
240  0, 0, 0, /* D E F */
241  0, 0, 0, /* G H I */
242  0, 0, 0, /* J K L */
243  0, 0, UMODE_O, /* M N O */
244  0, 0, 0, /* P Q R */
245  0, 0, 0, /* S T U */
246  0, 0, 0, /* V W X */
247  0, /* Y */
248  0, /* Z */
249  0, 0, 0, /* [ \ ] */
250  0, 0, 0, /* ^ _ ` */
251  UMODE_a, 0, UMODE_c, /* a b c */
252  0, 0, UMODE_f, /* d e f */
253  UMODE_g, UMODE_h, UMODE_i, /* g h i */
254  0, UMODE_k, 0, /* j k l */
255  0, 0, UMODE_o, /* m n o */
256  0, 0, UMODE_r, /* p q r */
257  UMODE_s, 0, 0, /* s t u */
258  0, UMODE_w, 0, /* v w x */
259  0, /* y */
260  0, /* z */
261  0, 0, 0, /* { | } */
262  0, 0 /* ~ � */
263 };
264 
265 char myCsmodes[128] = {
266  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
267  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
268 
269  0,
270  0,
271  0, 0, 0,
272  0,
273  0, 0, 0, 0,
274  0,
275 
276  'v', 0, 0, 0, 0,
277  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
278 
279  'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
280  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
281 
282  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
283  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
284 };
285 
286 
288  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
289  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
290  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
291  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
292  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
293  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
294  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
295  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
296  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
297  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
298  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
299  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
300  {NULL},
301  {NULL},
302  {add_ban, del_ban},
303  {NULL},
304  {NULL},
305  {NULL},
306  {NULL},
307  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
308  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
309  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
310 };
311 
312 
314  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
315  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
316  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
317  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
318  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
319  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
320  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
321  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
322  {0},
323  {0}, /* A */
324  {0}, /* B */
325  {0}, /* C */
326  {0}, /* D */
327  {0}, /* E */
328  {0}, /* F */
329  {0}, /* G */
330  {0}, /* H */
331  {0}, /* I */
332  {0}, /* J */
333  {0}, /* K */
334  {0}, /* L */
335  {0}, /* M */
336  {0}, /* N */
337  {0}, /* O */
338  {0}, /* P */
339  {0}, /* Q */
340  {CMODE_R, 0, NULL, NULL}, /* R */
341  {0}, /* S */
342  {0}, /* T */
343  {0}, /* U */
344  {0}, /* V */
345  {0}, /* W */
346  {0}, /* X */
347  {0}, /* Y */
348  {0}, /* Z */
349  {0}, {0}, {0}, {0}, {0}, {0},
350  {0}, /* a */
351  {0}, /* b */
352  {0}, /* c */
353  {0}, /* d */
354  {0}, /* e */
355  {0}, /* f */
356  {0}, /* g */
357  {0}, /* h */
358  {CMODE_i, 0, NULL, NULL},
359  {0}, /* j */
362  {CMODE_m, 0, NULL, NULL},
363  {CMODE_n, 0, NULL, NULL},
364  {0}, /* o */
365  {CMODE_p, 0, NULL, NULL},
366  {0}, /* q */
367  {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
368  {CMODE_s, 0, NULL, NULL},
369  {CMODE_t, 0, NULL, NULL},
370  {0},
371  {0}, /* v */
372  {0}, /* w */
373  {0}, /* x */
374  {0}, /* y */
375  {0}, /* z */
376  {0}, {0}, {0}, {0}
377 };
378 
380  {'i', CMODE_i, 0, NULL, NULL},
381  {'k', CMODE_k, 0, get_key, cs_get_key},
383  {'m', CMODE_m, 0, NULL, NULL},
384  {'n', CMODE_n, 0, NULL, NULL},
385  {'p', CMODE_p, 0, NULL, NULL},
386  {'r', CMODE_r, 0, NULL, NULL},
387  {'s', CMODE_s, 0, NULL, NULL},
388  {'t', CMODE_t, 0, NULL, NULL},
389  {'R', CMODE_R, 0, NULL, NULL},
390  {0}
391 };
392 
394  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
395  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
396  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
397  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
398 
399  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
400  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
401  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
402  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
403 
404  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
405  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
406  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
407  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
408 
409  {0},
410  {0}, /* a */
411  {0}, /* b */
412  {0}, /* c */
413  {0}, /* d */
414  {0}, /* e */
415  {0}, /* f */
416  {0}, /* g */
417  {0}, /* h */
418  {0}, /* i */
419  {0}, /* j */
420  {0}, /* k */
421  {0}, /* l */
422  {0}, /* m */
423  {0}, /* n */
425  {0}, /* p */
426  {0}, /* q */
427  {0}, /* r */
428  {0}, /* s */
429  {0}, /* t */
430  {0}, /* u */
431  {CUS_VOICE, 0, NULL},
432  {0}, /* w */
433  {0}, /* x */
434  {0}, /* y */
435  {0}, /* z */
436  {0}, {0}, {0}, {0}, {0}
437 };
438 
439 
440 
441 int anope_event_nick(char *source, int ac, char **av)
442 {
443  if (ac != 2) {
444  do_nick(source, av[0], av[3], av[4], av[5], av[7],
445  strtoul(av[2], NULL, 10), strtoul(av[6], NULL, 0), 0, NULL,
446  NULL);
447  } else {
448  do_nick(source, av[0], NULL, NULL, NULL, NULL,
449  strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
450  }
451  return MOD_CONT;
452 }
453 
454 int anope_event_436(char *source, int ac, char **av)
455 {
456  if (ac < 1)
457  return MOD_CONT;
458 
459  m_nickcoll(av[0]);
460  return MOD_CONT;
461 }
462 
463 
464 /* *INDENT-OFF* */
465 void moduleAddIRCDMsgs(void) {
466 
467  Message *m;
468 
469  updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
470 
505  m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
506  m = createMessage("PROTOCTL", anope_event_capab); addCoreMessage(IRCD,m);
510 
511 
512 }
513 
514 /* *INDENT-ON* */
515 
516 /* Event: PROTOCTL */
517 int anope_event_capab(char *source, int ac, char **av)
518 {
519  capab_parse(ac, av);
520  return MOD_CONT;
521 }
522 
523 void dreamforge_cmd_sqline(char *mask, char *reason)
524 {
525  send_cmd(NULL, "SQLINE %s :%s", mask, reason);
526 }
527 
528 void dreamforge_cmd_svsnoop(char *server, int set)
529 {
530  send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
531 }
532 
533 void dreamforge_cmd_svsadmin(char *server, int set)
534 {
535  dreamforge_cmd_svsnoop(server, set);
536 }
537 
538 void dreamforge_cmd_remove_akill(char *user, char *host)
539 {
540  send_cmd(NULL, "RAKILL %s %s", host, user);
541 }
542 
543 void dreamforge_cmd_topic(char *whosets, char *chan, char *whosetit,
544  char *topic, time_t when)
545 {
546  send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
547  (unsigned long int) when, topic);
548 }
549 
550 /* PART */
551 void dreamforge_cmd_part(char *nick, char *chan, char *buf)
552 {
553  if (!nick || !chan) {
554  return;
555  }
556 
557  if (buf) {
558  send_cmd(nick, "PART %s :%s", chan, buf);
559  } else {
560  send_cmd(nick, "PART %s", chan);
561  }
562 }
563 
564 
565 void dreamforge_cmd_unsqline(char *user)
566 {
567  send_cmd(NULL, "UNSQLINE %s", user);
568 }
569 
570 void dreamforge_cmd_join(char *user, char *channel, time_t chantime)
571 {
572  send_cmd(user, "JOIN %s", channel);
573 }
574 
575 void dreamforge_cmd_akill(char *user, char *host, char *who, time_t when,
576  time_t expires, char *reason)
577 {
578  send_cmd(NULL, "AKILL %s %s :%s", host, user, reason);
579 }
580 
581 
582 void dreamforge_cmd_svskill(char *source, char *user, char *buf)
583 {
584  if (!buf) {
585  return;
586  }
587 
588  if (!source || !user) {
589  return;
590  }
591 
592  send_cmd(source, "KILL %s :%s", user, buf);
593 }
594 
595 void dreamforge_cmd_svsmode(User * u, int ac, char **av)
596 {
597  send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
598  (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
599 }
600 
601 
602 void dreamforge_cmd_squit(char *servname, char *message)
603 {
604  send_cmd(NULL, "SQUIT %s :%s", servname, message);
605 }
606 
607 void anope_pong(char *servname)
608 {
609  send_cmd(servname, "PONG %s", servname);
610 }
611 
612 /* PASS */
613 void dreamforge_cmd_pass(char *pass)
614 {
615  send_cmd(NULL, "PASS :%s", pass);
616 }
617 
619 {
620  send_cmd(NULL, "PROTOCTL NOQUIT");
621 }
622 
623 /* SERVER name hop descript */
624 void dreamforge_cmd_server(char *servname, int hop, char *descript)
625 {
626  send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
627 }
628 
630 {
631  me_server =
633 
635  if (servernum == 1)
637  if (servernum == 2)
639  if (servernum == 3)
642 }
643 
645 {
646  /* Not used */
647 }
648 
649 void dreamforge_cmd_bot_chan_mode(char *nick, char *chan)
650 {
651  anope_cmd_mode(nick, chan, "%s %s %s", ircd->botchanumode, nick, nick);
652 }
653 
654 
655 
656 /* GLOBOPS */
657 void dreamforge_cmd_global(char *source, char *buf)
658 {
659  if (!buf) {
660  return;
661  }
662 
663  send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
664 }
665 
666 int anope_event_away(char *source, int ac, char **av)
667 {
668  if (!source) {
669  return MOD_CONT;
670  }
671  m_away(source, (ac ? av[0] : NULL));
672  return MOD_CONT;
673 }
674 
675 int anope_event_topic(char *source, int ac, char **av)
676 {
677  if (ac != 4)
678  return MOD_CONT;
679  do_topic(source, ac, av);
680  return MOD_CONT;
681 }
682 
683 int anope_event_squit(char *source, int ac, char **av)
684 {
685  if (ac != 2)
686  return MOD_CONT;
687  do_squit(source, ac, av);
688  return MOD_CONT;
689 }
690 
691 int anope_event_quit(char *source, int ac, char **av)
692 {
693  if (ac != 1)
694  return MOD_CONT;
695  do_quit(source, ac, av);
696  return MOD_CONT;
697 }
698 
699 
700 int anope_event_mode(char *source, int ac, char **av)
701 {
702  if (ac < 2)
703  return MOD_CONT;
704 
705  if (*av[0] == '#' || *av[0] == '&') {
706  do_cmode(source, ac, av);
707  } else {
708  do_umode(source, ac, av);
709  }
710  return MOD_CONT;
711 }
712 
713 
714 int anope_event_kill(char *source, int ac, char **av)
715 {
716  if (ac != 2)
717  return MOD_CONT;
718 
719  m_kill(av[0], av[1]);
720  return MOD_CONT;
721 }
722 
723 int anope_event_kick(char *source, int ac, char **av)
724 {
725  if (ac != 3)
726  return MOD_CONT;
727  do_kick(source, ac, av);
728  return MOD_CONT;
729 }
730 
731 
732 int anope_event_join(char *source, int ac, char **av)
733 {
734  if (ac != 1)
735  return MOD_CONT;
736  do_join(source, ac, av);
737  return MOD_CONT;
738 }
739 
740 int anope_event_motd(char *source, int ac, char **av)
741 {
742  if (!source) {
743  return MOD_CONT;
744  }
745 
746  m_motd(source);
747  return MOD_CONT;
748 }
749 
750 void dreamforge_cmd_mode(char *source, char *dest, char *buf)
751 {
752  if (!buf) {
753  return;
754  }
755 
756  send_cmd(source, "MODE %s %s", dest, buf);
757 }
758 
759 void dreamforge_cmd_notice_ops(char *source, char *dest, char *buf)
760 {
761  if (!buf) {
762  return;
763  }
764 
765  send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
766 }
767 
768 
769 void dreamforge_cmd_notice(char *source, char *dest, char *buf)
770 {
771  if (!buf) {
772  return;
773  }
774 
775  if (NSDefFlags & NI_MSG) {
776  dreamforge_cmd_privmsg2(source, dest, buf);
777  } else {
778  send_cmd(source, "NOTICE %s :%s", dest, buf);
779  }
780 }
781 
782 void dreamforge_cmd_notice2(char *source, char *dest, char *msg)
783 {
784  send_cmd(source, "NOTICE %s :%s", dest, msg);
785 }
786 
787 void dreamforge_cmd_privmsg(char *source, char *dest, char *buf)
788 {
789  if (!buf) {
790  return;
791  }
792 
793  send_cmd(source, "PRIVMSG %s :%s", dest, buf);
794 }
795 
796 void dreamforge_cmd_privmsg2(char *source, char *dest, char *msg)
797 {
798  send_cmd(source, "PRIVMSG %s :%s", dest, msg);
799 }
800 
801 void dreamforge_cmd_serv_notice(char *source, char *dest, char *msg)
802 {
803  send_cmd(source, "NOTICE $%s :%s", dest, msg);
804 }
805 
806 void dreamforge_cmd_serv_privmsg(char *source, char *dest, char *msg)
807 {
808  send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
809 }
810 
811 void dreamforge_cmd_351(char *source)
812 {
813  send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
816 
817 }
818 
819 /* QUIT */
820 void dreamforge_cmd_quit(char *source, char *buf)
821 {
822  if (buf) {
823  send_cmd(source, "QUIT :%s", buf);
824  } else {
825  send_cmd(source, "QUIT");
826  }
827 }
828 
829 /* 391 */
830 void dreamforge_cmd_391(char *source, char *timestr)
831 {
832  if (!timestr) {
833  return;
834  }
835  send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
836 }
837 
838 /* 250 */
839 void dreamforge_cmd_250(char *buf)
840 {
841  if (!buf) {
842  return;
843  }
844 
845  send_cmd(NULL, "250 %s", buf);
846 }
847 
848 /* 307 */
849 void dreamforge_cmd_307(char *buf)
850 {
851  if (!buf) {
852  return;
853  }
854 
855  send_cmd(ServerName, "307 %s", buf);
856 }
857 
858 /* 311 */
859 void dreamforge_cmd_311(char *buf)
860 {
861  if (!buf) {
862  return;
863  }
864 
865  send_cmd(ServerName, "311 %s", buf);
866 }
867 
868 /* 312 */
869 void dreamforge_cmd_312(char *buf)
870 {
871  if (!buf) {
872  return;
873  }
874 
875  send_cmd(ServerName, "312 %s", buf);
876 }
877 
878 /* 317 */
879 void dreamforge_cmd_317(char *buf)
880 {
881  if (!buf) {
882  return;
883  }
884 
885  send_cmd(ServerName, "317 %s", buf);
886 }
887 
888 /* 219 */
889 void dreamforge_cmd_219(char *source, char *letter)
890 {
891  if (!source) {
892  return;
893  }
894 
895  if (letter) {
896  send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
897  *letter);
898  } else {
899  send_cmd(NULL, "219 %s l :End of /STATS report.", source);
900  }
901 }
902 
903 /* 401 */
904 void dreamforge_cmd_401(char *source, char *who)
905 {
906  if (!source || !who) {
907  return;
908  }
909  send_cmd(ServerName, "401 %s %s :No such service.", source, who);
910 }
911 
912 /* 318 */
913 void dreamforge_cmd_318(char *source, char *who)
914 {
915  if (!source || !who) {
916  return;
917  }
918 
919  send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
920 }
921 
922 /* 242 */
923 void dreamforge_cmd_242(char *buf)
924 {
925  if (!buf) {
926  return;
927  }
928 
929  send_cmd(NULL, "242 %s", buf);
930 }
931 
932 /* 243 */
933 void dreamforge_cmd_243(char *buf)
934 {
935  if (!buf) {
936  return;
937  }
938 
939  send_cmd(NULL, "243 %s", buf);
940 }
941 
942 /* 211 */
943 void dreamforge_cmd_211(char *buf)
944 {
945  if (!buf) {
946  return;
947  }
948 
949  send_cmd(NULL, "211 %s", buf);
950 }
951 
952 void dreamforge_cmd_nick(char *nick, char *name, char *modes)
953 {
954  EnforceQlinedNick(nick, NULL);
955  send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
956  (long int) time(NULL), ServiceUser, ServiceHost, ServerName,
957  name);
958  anope_cmd_mode(nick, nick, "%s", modes);
959  dreamforge_cmd_sqline(nick, "Reserved for services");
960 }
961 
962 void dreamforge_cmd_kick(char *source, char *chan, char *user, char *buf)
963 {
964  if (buf) {
965  send_cmd(source, "KICK %s %s :%s", chan, user, buf);
966  } else {
967  send_cmd(source, "KICK %s %s", chan, user);
968  }
969 }
970 
971 /* EVENT: SERVER */
972 int anope_event_server(char *source, int ac, char **av)
973 {
974  if (!stricmp(av[1], "1")) {
975  uplink = sstrdup(av[0]);
976  }
977  do_server(source, av[0], av[1], av[2], NULL);
978  return MOD_CONT;
979 }
980 
981 
982 int anope_event_privmsg(char *source, int ac, char **av)
983 {
984  if (ac != 2)
985  return MOD_CONT;
986  m_privmsg(source, av[0], av[1]);
987  return MOD_CONT;
988 }
989 
990 int anope_event_part(char *source, int ac, char **av)
991 {
992  if (ac < 1 || ac > 2)
993  return MOD_CONT;
994  do_part(source, ac, av);
995  return MOD_CONT;
996 }
997 
998 int anope_event_whois(char *source, int ac, char **av)
999 {
1000  if (source && ac >= 1) {
1001  m_whois(source, av[0]);
1002  }
1003  return MOD_CONT;
1004 }
1005 
1006 int anope_event_ping(char *source, int ac, char **av)
1007 {
1008  if (ac < 1)
1009  return MOD_CONT;
1010  dreamforge_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]);
1011  return MOD_CONT;
1012 }
1013 
1014 void dreamforge_cmd_372(char *source, char *msg)
1015 {
1016  send_cmd(ServerName, "372 %s :- %s", source, msg);
1017 }
1018 
1019 void dreamforge_cmd_372_error(char *source)
1020 {
1021  send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
1022  "contact your IRC administrator.", source);
1023 }
1024 
1025 void dreamforge_cmd_375(char *source)
1026 {
1027  send_cmd(ServerName, "375 %s :- %s Message of the Day",
1028  source, ServerName);
1029 }
1030 
1031 void dreamforge_cmd_376(char *source)
1032 {
1033  send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
1034 }
1035 
1036 /* INVITE */
1037 void dreamforge_cmd_invite(char *source, char *chan, char *nick)
1038 {
1039  if (!source || !chan || !nick) {
1040  return;
1041  }
1042 
1043  send_cmd(source, "INVITE %s %s", nick, chan);
1044 }
1045 
1046 /* PONG */
1047 void dreamforge_cmd_pong(char *servname, char *who)
1048 {
1049  send_cmd(servname, "PONG %s", who);
1050 }
1051 
1052 void dreamforge_cmd_bot_nick(char *nick, char *user, char *host,
1053  char *real, char *modes)
1054 {
1056  send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
1057  (long int) time(NULL), user, host, ServerName, real);
1058  anope_cmd_mode(nick, nick, "MODE %s", modes);
1059  dreamforge_cmd_sqline(nick, "Reserved for services");
1060 }
1061 
1062 /* SVSHOLD - set */
1063 void dreamforge_cmd_svshold(char *nick)
1064 {
1065  /* Not supported by this IRCD */
1066 }
1067 
1068 /* SVSHOLD - release */
1070 {
1071  /* Not Supported by this IRCD */
1072 }
1073 
1074 /* UNSGLINE */
1075 void dreamforge_cmd_unsgline(char *mask)
1076 {
1077  /* Not Supported by this IRCD */
1078 }
1079 
1080 /* UNSZLINE */
1081 void dreamforge_cmd_unszline(char *mask)
1082 {
1083  /* Not Supported by this IRCD */
1084 }
1085 
1086 /* SZLINE */
1087 void dreamforge_cmd_szline(char *mask, char *reason, char *whom)
1088 {
1089  /* Not Supported by this IRCD */
1090 }
1091 
1092 /* SGLINE */
1093 void dreamforge_cmd_sgline(char *mask, char *reason)
1094 {
1095  /* Not Supported by this IRCD */
1096 }
1097 
1098 /* SVSNICK */
1099 void dreamforge_cmd_svsnick(char *source, char *guest, time_t when)
1100 {
1101  if (!source || !guest) {
1102  return;
1103  }
1104  send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
1105 }
1106 
1107 void dreamforge_cmd_guest_nick(char *nick, char *user, char *host,
1108  char *real, char *modes)
1109 {
1110  send_cmd(NULL, "NICK %s 1 %ld %s %s %s 0 :%s", nick,
1111  (long int) time(NULL), user, host, ServerName, real);
1112  anope_cmd_mode(nick, nick, "MODE %s", modes);
1113 }
1114 
1115 void dreamforge_cmd_svso(char *source, char *nick, char *flag)
1116 {
1117  /* Not Supported by this IRCD */
1118 }
1119 
1120 void dreamforge_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
1121 {
1122  /* Not Supported by this IRCD */
1123 }
1124 
1125 void dreamforge_cmd_unban(char *name, char *nick)
1126 {
1127  /* Not Supported by this IRCD */
1128 }
1129 
1130 /* SVSMODE channel modes */
1131 
1132 void dreamforge_cmd_svsmode_chan(char *name, char *mode, char *nick)
1133 {
1134  /* Not Supported by this IRCD */
1135 }
1136 
1138 {
1139  /* Not Supported by this IRCD */
1140 }
1141 
1142 /* SVSMODE +d */
1143 /* sent if svid is something weird */
1144 void dreamforge_cmd_svid_umode(char *nick, time_t ts)
1145 {
1146  send_cmd(ServerName, "SVSMODE %s +d 1", nick);
1147 }
1148 
1149 /* SVSMODE +d */
1150 /* nc_change was = 1, and there is no na->status */
1152 {
1153  common_svsmode(u, "-r+d", "1");
1154 }
1155 
1156 /* SVSMODE +r */
1158 {
1159  if (u->svid != u->timestamp) {
1160  common_svsmode(u, "+rd", ts);
1161  } else {
1162  common_svsmode(u, "+r", NULL);
1163  }
1164 }
1165 
1167 {
1168  /* not used */
1169 }
1170 
1171 /* NICK <newnick> */
1172 void dreamforge_cmd_chg_nick(char *oldnick, char *newnick)
1173 {
1174  if (!oldnick || !newnick) {
1175  return;
1176  }
1177 
1178  send_cmd(oldnick, "NICK %s", newnick);
1179 }
1180 
1181 void dreamforge_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
1182 {
1183  /* Not Supported by this IRCD */
1184 }
1185 
1186 void dreamforge_cmd_svspart(char *source, char *nick, char *chan)
1187 {
1188  /* Not Supported by this IRCD */
1189 }
1190 
1191 void dreamforge_cmd_swhois(char *source, char *who, char *mask)
1192 {
1193  /* not supported */
1194 }
1195 
1196 int anope_event_rehash(char *source, int ac, char **av)
1197 {
1198  return MOD_CONT;
1199 }
1200 
1201 int anope_event_credits(char *source, int ac, char **av)
1202 {
1203  return MOD_CONT;
1204 }
1205 
1206 int anope_event_admin(char *source, int ac, char **av)
1207 {
1208  return MOD_CONT;
1209 }
1210 
1212 {
1213  return 0;
1214 }
1215 
1217 {
1218  /* Not supported */
1219 }
1220 
1221 void dreamforge_cmd_jupe(char *jserver, char *who, char *reason)
1222 {
1223  char rbuf[256];
1224 
1225  snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
1226  reason ? ": " : "", reason ? reason : "");
1227 
1228  if (findserver(servlist, jserver))
1229  dreamforge_cmd_squit(jserver, rbuf);
1230  dreamforge_cmd_server(jserver, 2, rbuf);
1231  new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
1232 }
1233 
1234 /* GLOBOPS - to handle old WALLOPS */
1235 void dreamforge_cmd_global_legacy(char *source, char *fmt)
1236 {
1237  send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
1238 }
1239 
1240 /*
1241  1 = valid nick
1242  0 = nick is in valid
1243 */
1244 int dreamforge_valid_nick(char *nick)
1245 {
1246  /* no hard coded invalid nicks */
1247  return 1;
1248 }
1249 
1250 /*
1251  1 = valid chan
1252  0 = chan is in valid
1253 */
1254 int dreamforge_valid_chan(char *chan)
1255 {
1256  /* no hard coded invalid chan */
1257  return 1;
1258 }
1259 
1260 
1261 void dreamforge_cmd_ctcp(char *source, char *dest, char *buf)
1262 {
1263 
1264  char *s;
1265  if (!buf) {
1266  return;
1267  } else {
1268  s = normalizeBuffer(buf);
1269  }
1270 
1271  send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
1272  free(s);
1273 }
1274 
1275 
1281 {
1357 }
1358 
1362 int AnopeInit(int argc, char **argv)
1363 {
1364 
1365  moduleAddAuthor("Anope");
1366  moduleAddVersion(VERSION_STRING);
1368 
1369  pmodule_ircd_version("DreamForge 4.6.7");
1370  pmodule_ircd_cap(myIrcdcap);
1371  pmodule_ircd_var(myIrcd);
1372  pmodule_ircd_cbmodeinfos(myCbmodeinfos);
1373  pmodule_ircd_cumodes(myCumodes);
1376  pmodule_ircd_cbmodes(myCbmodes);
1377  pmodule_ircd_cmmodes(myCmmodes);
1380 
1390 
1393 
1394  return MOD_CONT;
1395 }
void dreamforge_cmd_376(char *source)
Definition: dreamforge.c:1031
E void pmodule_cmd_vhost_off(void(*func)(User *u))
Definition: ircd.c:713
E void pmodule_permchan_mode(int mode)
Definition: ircd.c:1206
E int32 opcnt
Definition: extern.h:1140
E char * RemotePassword3
Definition: extern.h:270
E void pmodule_cmd_svspart(void(*func)(char *source, char *nick, char *chan))
Definition: ircd.c:1056
int AnopeInit(int argc, char **argv)
Definition: dreamforge.c:1362
void dreamforge_cmd_privmsg(char *source, char *dest, char *buf)
Definition: dreamforge.c:787
E void do_topic(const char *source, int ac, char **av)
Definition: channels.c:1249
void dreamforge_cmd_svso(char *source, char *nick, char *flag)
Definition: dreamforge.c:1115
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
void dreamforge_cmd_311(char *buf)
Definition: dreamforge.c:859
E char * RemotePassword
Definition: extern.h:264
void dreamforge_cmd_318(char *source, char *who)
Definition: dreamforge.c:913
int dreamforge_flood_mode_check(char *value)
Definition: dreamforge.c:1211
void dreamforge_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: dreamforge.c:1052
int anope_event_436(char *source, int ac, char **av)
Definition: dreamforge.c:454
void dreamforge_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: dreamforge.c:806
void moduleAddAnopeCmds()
Definition: dreamforge.c:1280
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
Definition: ircd.c:827
void dreamforge_cmd_notice(char *source, char *dest, char *buf)
Definition: dreamforge.c:769
void dreamforge_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: dreamforge.c:543
#define UMODE_c
Definition: bahamut.h:30
void dreamforge_cmd_bot_chan_mode(char *nick, char *chan)
Definition: dreamforge.c:649
void dreamforge_cmd_unszline(char *mask)
Definition: dreamforge.c:1081
void dreamforge_cmd_invite(char *source, char *chan, char *nick)
Definition: dreamforge.c:1037
char nick[NICKMAX]
Definition: services.h:875
E void do_squit(const char *source, int ac, char **av)
Definition: servers.c:398
E int snprintf(char *buf, size_t size, const char *fmt,...)
Definition: compat.c:37
E int 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 dreamforge_cmd_243(char *buf)
Definition: dreamforge.c:933
#define UMODE_w
Definition: bahamut.h:21
void anope_pong(char *servname)
Definition: dreamforge.c:607
#define CBM_MINUS_NO_ARG
Definition: services.h:928
E char * s_BotServ
Definition: extern.h:287
E IRCDVar * ircd
Definition: extern.h:39
#define UMODE_k
Definition: bahamut.h:31
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
int anope_event_credits(char *source, int ac, char **av)
Definition: dreamforge.c:1201
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
void dreamforge_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: dreamforge.c:796
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
Definition: modules.c:1597
E void pmodule_valid_nick(int(*func)(char *nick))
Definition: ircd.c:1082
#define CAPAB_NOQUIT
Definition: services.h:1366
E void cs_set_limit(ChannelInfo *ci, char *value)
Definition: chanserv.c:2558
E int nick_identified(User *u)
Definition: nickserv.c:1111
void dreamforge_cmd_svsmode(User *u, int ac, char **av)
Definition: dreamforge.c:595
void dreamforge_cmd_pass(char *pass)
Definition: dreamforge.c:613
void dreamforge_cmd_242(char *buf)
Definition: dreamforge.c:923
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
void dreamforge_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: dreamforge.c:759
E void pmodule_cmd_vhost_on(void(*func)(char *nick, char *vIdent, char *vhost))
Definition: ircd.c:966
void dreamforge_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: dreamforge.c:1120
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
int anope_event_privmsg(char *source, int ac, char **av)
Definition: dreamforge.c:982
void dreamforge_cmd_unsgline(char *mask)
Definition: dreamforge.c:1075
E void pmodule_cmd_211(void(*func)(char *buf))
Definition: ircd.c:924
void dreamforge_cmd_remove_akill(char *user, char *host)
Definition: dreamforge.c:538
void dreamforge_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: dreamforge.c:962
void dreamforge_cmd_nick(char *nick, char *name, char *modes)
Definition: dreamforge.c:952
E void pmodule_cmd_unsqline(void(*func)(char *user))
Definition: ircd.c:853
void dreamforge_cmd_mode(char *source, char *dest, char *buf)
Definition: dreamforge.c:750
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
void dreamforge_cmd_401(char *source, char *who)
Definition: dreamforge.c:904
E void pmodule_ircd_cap(IRCDCAPAB *cap)
Definition: ircd.c:1102
#define CMODE_l
Definition: bahamut.h:51
char * name
Definition: services.h:277
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 dreamforge_cmd_szline(char *mask, char *reason, char *whom)
Definition: dreamforge.c:1087
int anope_event_squit(char *source, int ac, char **av)
Definition: dreamforge.c:683
E char * ServerDesc
Definition: extern.h:275
void dreamforge_cmd_sgline(char *mask, char *reason)
Definition: dreamforge.c:1093
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
uint32 svid
Definition: services.h:888
void dreamforge_cmd_375(char *source)
Definition: dreamforge.c:1025
E void pmodule_cmd_ctcp(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:1043
E void pmodule_cmd_invite(void(*func)(char *source, char *chan, char *nick))
Definition: ircd.c:859
int anope_event_rehash(char *source, int ac, char **av)
Definition: dreamforge.c:1196
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
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
Definition: modules.c:1470
int anope_event_join(char *source, int ac, char **av)
Definition: dreamforge.c:732
void dreamforge_cmd_219(char *source, char *letter)
Definition: dreamforge.c:889
#define CUS_VOICE
Definition: services.h:1342
#define IRCD
Definition: modules.h:63
#define UMODE_g
Definition: bahamut.h:35
#define UMODE_i
Definition: bahamut.h:18
#define CAPAB_TOKEN
Definition: services.h:1388
void dreamforge_cmd_312(char *buf)
Definition: dreamforge.c:869
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
void dreamforge_cmd_jupe(char *jserver, char *who, char *reason)
Definition: dreamforge.c:1221
CBMode myCbmodes[128]
Definition: dreamforge.c:313
int anope_event_admin(char *source, int ac, char **av)
Definition: dreamforge.c:1206
#define CMODE_R
Definition: bahamut.h:52
E void pmodule_cmd_unsgline(void(*func)(char *mask))
Definition: ircd.c:991
#define UMODE_s
Definition: bahamut.h:29
void dreamforge_cmd_sqline(char *mask, char *reason)
Definition: dreamforge.c:523
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void EnforceQlinedNick(char *nick, char *killer)
Definition: misc.c:837
int anope_event_motd(char *source, int ac, char **av)
Definition: dreamforge.c:740
void dreamforge_cmd_squit(char *servname, char *message)
Definition: dreamforge.c:602
#define CMODE_t
Definition: bahamut.h:49
E char * cs_get_key(ChannelInfo *ci)
Definition: chanserv.c:2447
CMMode myCmmodes[128]
Definition: dreamforge.c:287
void dreamforge_cmd_part(char *nick, char *chan, char *buf)
Definition: dreamforge.c:551
MDE void moduleSetType(MODType type)
Definition: modules.c:818
void dreamforge_cmd_211(char *buf)
Definition: dreamforge.c:943
void dreamforge_cmd_svid_umode2(User *u, char *ts)
Definition: dreamforge.c:1157
void dreamforge_cmd_server(char *servname, int hop, char *descript)
Definition: dreamforge.c:624
E void pmodule_cmd_jupe(void(*func)(char *jserver, char *who, char *reason))
Definition: ircd.c:1072
void dreamforge_cmd_quit(char *source, char *buf)
Definition: dreamforge.c:820
char * botchanumode
Definition: services.h:299
E void pmodule_cmd_243(void(*func)(char *buf))
Definition: ircd.c:919
E char * sstrdup(const char *s)
Definition: memory.c:105
E void do_join(const char *source, int ac, char **av)
Definition: channels.c:556
E int m_nickcoll(char *user)
Definition: messages.c:20
E void pmodule_cmd_375(void(*func)(char *source))
Definition: ircd.c:746
E void pmodule_key_mode(int mode)
Definition: ircd.c:1196
E void pmodule_cmd_svsnick(void(*func)(char *source, char *guest, time_t when))
Definition: ircd.c:960
void dreamforge_cmd_global_legacy(char *source, char *fmt)
Definition: dreamforge.c:1235
E char * s_OperServ
Definition: extern.h:289
E void pmodule_invis_umode(int mode)
Definition: ircd.c:1171
#define UMODE_f
Definition: bahamut.h:32
E void pmodule_cmd_svid_umode2(void(*func)(User *u, char *ts))
Definition: ircd.c:1033
E void pmodule_cmd_chg_nick(void(*func)(char *oldnick, char *newnick))
Definition: ircd.c:954
E char * ServiceHost
Definition: extern.h:277
E char * EncModule
Definition: extern.h:580
void dreamforge_cmd_svid_umode3(User *u, char *ts)
Definition: dreamforge.c:1166
void dreamforge_cmd_351(char *source)
Definition: dreamforge.c:811
E void pmodule_invite_cmode(int mode)
Definition: ircd.c:1181
#define CMODE_r
Definition: bahamut.h:53
int anope_event_away(char *source, int ac, char **av)
Definition: dreamforge.c:666
E void pmodule_cmd_eob(void(*func)())
Definition: ircd.c:1066
void dreamforge_cmd_connect(int servernum)
Definition: dreamforge.c:629
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
E char * uplink
Definition: extern.h:35
E int m_kill(char *nick, char *msg)
Definition: messages.c:49
void dreamforge_cmd_307(char *buf)
Definition: dreamforge.c:849
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 dreamforge_cmd_svsnick(char *source, char *guest, time_t when)
Definition: dreamforge.c:1099
int anope_event_server(char *source, int ac, char **av)
Definition: dreamforge.c:972
void dreamforge_cmd_svspart(char *source, char *nick, char *chan)
Definition: dreamforge.c:1186
CUMode myCumodes[128]
Definition: dreamforge.c:393
IRCDVar myIrcd[]
Definition: dreamforge.c:19
CBModeInfo myCbmodeinfos[]
Definition: dreamforge.c:379
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
#define UMODE_a
Definition: bahamut.h:16
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
E void del_ban(Channel *chan, char *mask)
Definition: channels.c:1779
int anope_event_capab(char *source, int ac, char **av)
Definition: dreamforge.c:517
E void pmodule_ircd_cumodes(CUMode modes[128])
Definition: ircd.c:1117
E const char version_flags[]
Definition: extern.h:771
void dreamforge_cmd_pong(char *servname, char *who)
Definition: dreamforge.c:1047
void dreamforge_cmd_vhost_off(User *u)
Definition: dreamforge.c:1137
void moduleAddIRCDMsgs(void)
Definition: dreamforge.c:465
E void alog(const char *fmt,...) FORMAT(printf
E int servernum
Definition: extern.h:615
void dreamforge_cmd_capab()
Definition: dreamforge.c:618
void dreamforge_cmd_svsnoop(char *server, int set)
Definition: dreamforge.c:528
#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 dreamforge_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: dreamforge.c:1132
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 dreamforge_cmd_372_error(char *source)
Definition: dreamforge.c:1019
void dreamforge_cmd_join(char *user, char *channel, time_t chantime)
Definition: dreamforge.c:570
int anope_event_ping(char *source, int ac, char **av)
Definition: dreamforge.c:1006
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
E void pmodule_cmd_242(void(*func)(char *buf))
Definition: ircd.c:914
#define NI_MSG
Definition: services.h:1292
E int debug
Definition: extern.h:775
int dreamforge_valid_nick(char *nick)
Definition: dreamforge.c:1244
E void set_limit(Channel *chan, char *value)
Definition: channels.c:2011
int anope_event_kill(char *source, int ac, char **av)
Definition: dreamforge.c:714
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 dreamforge_cmd_swhois(char *source, char *who, char *mask)
Definition: dreamforge.c:1191
void dreamforge_cmd_372(char *source, char *msg)
Definition: dreamforge.c:1014
E int NSDefFlags
Definition: extern.h:377
void dreamforge_cmd_svskill(char *source, char *user, char *buf)
Definition: dreamforge.c:582
E void pmodule_cmd_318(void(*func)(char *source, char *who))
Definition: ircd.c:909
void dreamforge_cmd_391(char *source, char *timestr)
Definition: dreamforge.c:830
int anope_event_quit(char *source, int ac, char **av)
Definition: dreamforge.c:691
int anope_event_mode(char *source, int ac, char **av)
Definition: dreamforge.c:700
E void pmodule_cmd_250(void(*func)(char *buf))
Definition: ircd.c:874
void dreamforge_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: dreamforge.c:1107
void dreamforge_cmd_release_svshold(char *nick)
Definition: dreamforge.c:1069
E void pmodule_ircd_version(char *version)
Definition: ircd.c:1107
E const char version_number[]
Definition: extern.h:767
int dreamforge_valid_chan(char *chan)
Definition: dreamforge.c:1254
#define CMODE_m
Definition: bahamut.h:45
E void pmodule_cmd_unszline(void(*func)(char *mask))
Definition: ircd.c:996
E void cs_set_key(ChannelInfo *ci, char *value)
Definition: chanserv.c:2538
E void anope_cmd_mode(char *source, char *dest, const char *fmt,...)
Definition: ircd.c:211
unsigned long umodes[128]
Definition: dreamforge.c:214
int anope_event_whois(char *source, int ac, char **av)
Definition: dreamforge.c:998
E void pmodule_cmd_401(void(*func)(char *source, char *who))
Definition: ircd.c:904
void dreamforge_cmd_bob()
Definition: dreamforge.c:644
E int WallOper
Definition: extern.h:448
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
int anope_event_kick(char *source, int ac, char **av)
Definition: dreamforge.c:723
E void pmodule_cmd_szline(void(*func)(char *mask, char *reason, char *whom))
Definition: ircd.c:1002
void dreamforge_cmd_unsqline(char *user)
Definition: dreamforge.c:565
#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 dreamforge_cmd_ctcp(char *source, char *dest, char *buf)
Definition: dreamforge.c:1261
#define UMODE_A
Definition: bahamut.h:22
void dreamforge_cmd_svshold(char *nick)
Definition: dreamforge.c:1063
IRCDCAPAB myIrcdcap[]
Definition: dreamforge.c:118
void dreamforge_cmd_317(char *buf)
Definition: dreamforge.c:879
void dreamforge_cmd_250(char *buf)
Definition: dreamforge.c:839
#define CMODE_k
Definition: bahamut.h:50
E void pmodule_cmd_unban(void(*func)(char *name, char *nick))
Definition: ircd.c:1012
int anope_event_nick(char *source, int ac, char **av)
Definition: dreamforge.c:441
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 dreamforge_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: dreamforge.c:575
#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
void dreamforge_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
Definition: dreamforge.c:1181
E void capab_parse(int ac, char **av)
Definition: servers.c:451
E int check_valid_op(User *user, Channel *chan, int servermode)
Definition: chanserv.c:1290
E char * cs_get_limit(ChannelInfo *ci)
Definition: chanserv.c:2458
void dreamforge_cmd_notice2(char *source, char *dest, char *msg)
Definition: dreamforge.c:782
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
E char * ServerName
Definition: extern.h:274
int anope_event_part(char *source, int ac, char **av)
Definition: dreamforge.c:990
void dreamforge_cmd_unban(char *name, char *nick)
Definition: dreamforge.c:1125
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
void dreamforge_cmd_nc_change(User *u)
Definition: dreamforge.c:1151
#define SERVER_ISME
Definition: services.h:865
char myCsmodes[128]
Definition: dreamforge.c:265
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
void dreamforge_cmd_svid_umode(char *nick, time_t ts)
Definition: dreamforge.c:1144
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
int anope_event_topic(char *source, int ac, char **av)
Definition: dreamforge.c:675
E void pmodule_oper_umode(int mode)
Definition: ircd.c:1176
E Server * new_server(Server *uplink, const char *name, const char *desc, uint16 flags, char *suid)
Definition: servers.c:119
E void pmodule_flood_mode_check(int(*func)(char *value))
Definition: ircd.c:1092
void dreamforge_set_umode(User *user, int ac, char **av)
Definition: dreamforge.c:151
#define NEWS_OPER
Definition: services.h:1050
E void pmodule_ircd_cbmodeinfos(CBModeInfo *modeinfos)
Definition: ircd.c:1112
void dreamforge_cmd_chg_nick(char *oldnick, char *newnick)
Definition: dreamforge.c:1172
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
void dreamforge_cmd_svsadmin(char *server, int set)
Definition: dreamforge.c:533
E void pmodule_cmd_mode(void(*func)(char *source, char *dest, char *buf))
Definition: ircd.c:768
E void pmodule_limit_mode(int mode)
Definition: ircd.c:1201
#define CMODE_i
Definition: bahamut.h:44
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 dreamforge_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: dreamforge.c:801
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
void dreamforge_cmd_eob()
Definition: dreamforge.c:1216
E const char version_build[]
Definition: extern.h:769
#define CMODE_s
Definition: bahamut.h:48
#define CUS_OP
Definition: services.h:1341
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 CUF_PROTECT_BOTSERV
Definition: services.h:956
void dreamforge_cmd_global(char *source, char *buf)
Definition: dreamforge.c:657
#define UMODE_O
Definition: bahamut.h:28
#define UMODE_o
Definition: bahamut.h:19
E void pmodule_cmd_219(void(*func)(char *source, char *letter))
Definition: ircd.c:899