Anope IRC Services  Version 1.8
ptlink.c
Go to the documentation of this file.
1 /* PTLink 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 "ptlink.h"
17 #include "version.h"
18 
20  {"PTlink 6.15.*+", /* ircd name */
21  "+o", /* nickserv mode */
22  "+o", /* chanserv mode */
23  "+o", /* memoserv mode */
24  "+o", /* 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  "+io", /* hostserv alias mode */
34  "+io", /* operserv alias mode */
35  "+o", /* botserv alias mode */
36  "+h", /* helpserv alias mode */
37  "+i", /* Dev/Null alias mode */
38  "+io", /* Global alias mode */
39  "+", /* Used by BotServ Bots */
40  2, /* Chan Max Symbols */
41  "-inpsmtCRKOASdcqBNl", /* Modes to Remove */
42  "+ao", /* Channel Umode used by Botserv bots */
43  1, /* SVSNICK */
44  1, /* Vhost */
45  0, /* Has Owner */
46  NULL, /* Mode to set for an owner */
47  NULL, /* Mode to unset for an owner */
48  "+a", /* Mode to set for chan admin */
49  "-a", /* Mode to unset for chan admin */
50  "+r", /* 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", /* Mode on UnReg */
55  NULL, /* Mode on Nick Change */
56  1, /* Supports SGlines */
57  1, /* Supports SQlines */
58  1, /* Supports SZlines */
59  0, /* Supports Halfop +h */
60  4, /* Number of server args */
61  0, /* Join 2 Set */
62  0, /* Join 2 Message */
63  1, /* Has exceptions +e */
64  0, /* TS Topic Forward */
65  0, /* TS Topci Backward */
66  0, /* Protected Umode */
67  0, /* Has Admin */
68  0, /* Chan SQlines */
69  0, /* Quit on Kill */
70  0, /* SVSMODE unban */
71  1, /* Has Protect */
72  0, /* Reverse */
73  1, /* Chan Reg */
74  CMODE_r, /* Channel Mode */
75  1, /* vidents */
76  0, /* svshold */
77  0, /* time stamp on mode */
78  0, /* NICKIP */
79  0, /* O:LINE */
80  1, /* UMODE */
81  1, /* VHOST ON NICK */
82  0, /* Change RealName */
83  CMODE_K, /* No Knock */
84  CMODE_A, /* Admin Only */
85  DEFAULT_MLOCK, /* Default MLOCK */
86  UMODE_VH, /* Vhost Mode */
87  1, /* +f */
88  0, /* +L */
89  CMODE_f,
90  0,
91  1,
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  0, /* NOQUIT */
121  0, /* TSMODE */
122  0, /* UNCONNECT */
123  0, /* NICKIP */
124  0, /* SJOIN */
125  CAPAB_ZIP, /* ZIP */
126  0, /* BURST */
127  0, /* TS5 */
128  0, /* TS3 */
129  0, /* DKEY */
130  CAPAB_PT4, /* PT4 */
131  CAPAB_SCS, /* SCS */
132  CAPAB_QS, /* QS */
133  0, /* UID */
134  0, /* KNOCK */
135  0, /* CLIENT */
136  0, /* IPV6 */
137  0, /* SSJ5 */
138  0, /* SN2 */
139  0, /* TOKEN */
140  0, /* VHOST */
141  0, /* SSJ3 */
142  0, /* NICK2 */
143  0, /* UMODE2 */
144  0, /* VL */
145  0, /* TLKEXT */
146  0, /* DODKEY */
147  0, /* DOZIP */
148  0, 0, 0}
149 };
150 
151 
152 unsigned long umodes[128] = {
153  0, 0, 0, /* Unused */
154  0, 0, 0, /* Unused */
155  0, 0, 0, /* Unused, Unused, Horzontal Tab */
156  0, 0, 0, /* Line Feed, Unused, Unused */
157  0, 0, 0, /* Carriage Return, Unused, Unused */
158  0, 0, 0, /* Unused */
159  0, 0, 0, /* Unused */
160  0, 0, 0, /* Unused */
161  0, 0, 0, /* Unused */
162  0, 0, 0, /* Unused */
163  0, 0, 0, /* Unused, Unused, Space */
164  0, 0, 0, /* ! " # */
165  0, 0, 0, /* $ % & */
166  0, 0, 0, /* ! ( ) */
167  0, 0, 0, /* * + , */
168  0, 0, 0, /* - . / */
169  0, 0, /* 0 1 */
170  0, 0, /* 2 3 */
171  0, 0, /* 4 5 */
172  0, 0, /* 6 7 */
173  0, 0, /* 8 9 */
174  0, 0, /* : ; */
175  0, 0, 0, /* < = > */
176  0, 0, /* ? @ */
177  UMODE_A, UMODE_B, 0, /* A B C */
178  0, 0, 0, /* D E F */
179  0, UMODE_H, 0, /* G H I */
180  0, 0, 0, /* J K L */
181  0, UMODE_N, UMODE_O, /* M N O */
182  0, 0, UMODE_R, /* P Q R */
183  UMODE_S, UMODE_T, 0, /* S T U */
184  0, 0, 0, /* V W X */
185  0, /* Y */
186  0, /* Z */
187  0, 0, 0, /* [ \ ] */
188  0, 0, 0, /* ^ _ ` */
189  UMODE_a, 0, 0, /* a b c */
190  0, 0, 0, /* d e f */
191  0, UMODE_h, UMODE_i, /* g h i */
192  0, 0, 0, /* j k l */
193  0, 0, UMODE_o, /* m n o */
194  UMODE_p, 0, UMODE_r, /* p q r */
195  UMODE_s, 0, 0, /* s t u */
196  UMODE_v, UMODE_w, 0, /* v w x */
197  UMODE_y, /* y */
198  UMODE_z, /* z */
199  0, 0, 0, /* { | } */
200  0, 0 /* ~ � */
201 };
202 
203 char myCsmodes[128] = {
204  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
205  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
206 
207  0,
208  0,
209  0, 0, 0,
210  0,
211  0, 0, 0, 0,
212  0,
213 
214  'v', 0, 0, 'a', 0,
215  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
216 
217  'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
218  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
219 
220  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
221  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
222 };
223 
224 
226  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
227  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
228  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
229  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
230  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
231  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
232  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
233  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
234  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
235  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
236  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
237  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
238  {NULL},
239  {NULL},
240  {add_ban, del_ban},
241  {NULL},
242  {NULL},
244  {NULL},
245  {NULL},
246  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
247  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
248  {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
249 };
250 
251 
253  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
254  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
255  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
256  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
257  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
258  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
259  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
260  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
261  {0},
262  {CMODE_A, 0, NULL, NULL}, /* A */
263  {CMODE_B, 0, NULL, NULL}, /* B */
264  {CMODE_C, 0, NULL, NULL}, /* C */
265  {0}, /* D */
266  {0}, /* E */
267  {0}, /* F */
268  {0}, /* G */
269  {0}, /* H */
270  {0}, /* I */
271  {0}, /* J */
272  {CMODE_K, 0, NULL, NULL}, /* K */
273  {0}, /* L */
274  {0}, /* M */
275  {CMODE_N, 0, NULL, NULL}, /* N */
276  {CMODE_O, 0, NULL, NULL}, /* O */
277  {0}, /* P */
278  {0}, /* Q */
279  {CMODE_R, 0, NULL, NULL}, /* R */
280  {CMODE_S, 0, NULL, NULL}, /* S */
281  {0}, /* T */
282  {0}, /* U */
283  {0}, /* V */
284  {0}, /* W */
285  {0}, /* X */
286  {0}, /* Y */
287  {0}, /* Z */
288  {0}, {0}, {0}, {0}, {0}, {0},
289  {0}, /* a */
290  {0}, /* b */
291  {CMODE_c, 0, NULL, NULL},
292  {CMODE_d, 0, NULL, NULL},
293  {0}, /* e */
295  {0}, /* g */
296  {0}, /* h */
297  {CMODE_i, 0, NULL, NULL},
298  {0}, /* j */
301  {CMODE_m, 0, NULL, NULL},
302  {CMODE_n, 0, NULL, NULL},
303  {0}, /* o */
304  {CMODE_p, 0, NULL, NULL},
305  {CMODE_q, 0, NULL, NULL},
306  {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
307  {CMODE_s, 0, NULL, NULL},
308  {CMODE_t, 0, NULL, NULL},
309  {0},
310  {0}, /* v */
311  {0}, /* w */
312  {0}, /* x */
313  {0}, /* y */
314  {0}, /* z */
315  {0}, {0}, {0}, {0}
316 };
317 
319  {'c', CMODE_c, 0, NULL, NULL},
320  {'d', CMODE_d, 0, NULL, NULL},
321  {'f', CMODE_f, 0, get_flood, cs_get_flood},
322  {'i', CMODE_i, 0, NULL, NULL},
323  {'k', CMODE_k, 0, get_key, cs_get_key},
325  {'m', CMODE_m, 0, NULL, NULL},
326  {'n', CMODE_n, 0, NULL, NULL},
327  {'p', CMODE_p, 0, NULL, NULL},
328  {'q', CMODE_q, 0, NULL, NULL},
329  {'r', CMODE_r, 0, NULL, NULL},
330  {'s', CMODE_s, 0, NULL, NULL},
331  {'t', CMODE_t, 0, NULL, NULL},
332  {'A', CMODE_A, 0, NULL, NULL},
333  {'B', CMODE_B, 0, NULL, NULL},
334  {'C', CMODE_C, 0, NULL, NULL},
335  {'K', CMODE_K, 0, NULL, NULL},
336  {'N', CMODE_N, 0, NULL, NULL},
337  {'O', CMODE_O, 0, NULL, NULL},
338  {'R', CMODE_R, 0, NULL, NULL},
339  {'S', CMODE_S, 0, NULL, NULL},
340  {0}
341 };
342 
344  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
345  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
346  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
347  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
348 
349  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
350  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
351  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
352  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
353 
354  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
355  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
356  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
357  {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
358 
359  {0},
360 
361  {0}, /* a */
362  {0}, /* b */
363  {0}, /* c */
364  {0}, /* d */
365  {0}, /* e */
366  {0}, /* f */
367  {0}, /* g */
368  {0}, /* h */
369  {0}, /* i */
370  {0}, /* j */
371  {0}, /* k */
372  {0}, /* l */
373  {0}, /* m */
374  {0}, /* n */
376  {0}, /* p */
377  {0}, /* q */
378  {0}, /* r */
379  {0}, /* s */
380  {0}, /* t */
381  {0}, /* u */
382  {CUS_VOICE, 0, NULL},
383  {0}, /* w */
384  {0}, /* x */
385  {0}, /* y */
386  {0}, /* z */
387  {0}, {0}, {0}, {0}, {0}
388 };
389 
390 
391 
392 void ptlink_cmd_bot_chan_mode(char *nick, char *chan)
393 {
394  anope_cmd_mode(s_ChanServ, chan, "%s %s %s", ircd->botchanumode, nick,
395  nick);
396 }
397 
398 /*
399  :%s SJOIN %lu %s %s %s :%s
400  parv[0] = sender
401  parv[1] = channel TS (channel creation time)
402  parv[2] = channel
403  parv[3] = modes + n arguments (key and/or limit)
404  ... [n] = if(key and/or limit) mode arguments
405  parv[4+n] = flags+nick list (all in one parameter)
406  NOTE: ignore channel modes if we already have the channel with a gr
407 */
408 int anope_event_sjoin(char *source, int ac, char **av)
409 {
410  do_sjoin(source, ac, av);
411  return MOD_CONT;
412 }
413 
414 /*
415  * Note: This function has no validation whatsoever. Also, as of PTlink6.15.1
416  * when you /deoper you get to keep your vindent, but you lose your vhost. In
417  * that case serives will *NOT* modify it's internal record for the vhost. We
418  * need to address this in the future.
419  */
420 /*
421  :%s NEWMASK %s
422  parv[0] = sender
423  parv[1] = new mask (if no '@', hostname is assumed)
424 */
425 int anope_event_newmask(char *source, int ac, char **av)
426 {
427  User *u;
428  char *newhost = NULL, *newuser = NULL;
429  int tofree = 0;
430 
431  if (ac != 1)
432  return MOD_CONT;
433  u = finduser(source);
434 
435  if (!u) {
436  if (debug) {
437  alog("debug: NEWMASK for nonexistent user %s", av[0]);
438  }
439  return MOD_CONT;
440  }
441 
442  if ((u->mode & (UMODE_NM | UMODE_VH)) == (UMODE_NM | UMODE_VH)) {
443  /* This NEWMASK should be discarded because it's sent due to a +r by
444  * someone with a ptlink-masked host. PTlink has our correct host, so
445  * we can just ignore this :) Or we'll get ptlink's old host which is
446  * not what we want. -GD
447  */
448  u->mode &= ~UMODE_NM;
449  if (debug)
450  alog("debug: Ignoring NEWMASK because it's sent because of SVSMODE +r");
451  return MOD_CONT;
452  }
453 
454  newuser = myStrGetOnlyToken(av[0], '@', 0);
455  if (newuser) {
456  newhost = myStrGetTokenRemainder(av[0], '@', 1);
457  tofree = 1;
458  change_user_username(u, newuser);
459  free(newuser);
460  } else {
461  newhost = av[0];
462  }
463 
464  if (newhost && *newhost == '@')
465  newhost++;
466 
467  u->mode |= UMODE_VH;
468 
469  if (newhost)
470  change_user_host(u, newhost);
471 
472  if (tofree)
473  free(newhost);
474 
475  return MOD_CONT;
476 }
477 
478 /*
479  NICK %s %d %lu %s %s %s %s %s :%s
480  parv[0] = nickname
481  parv[1] = hopcount
482  parv[2] = nick TS (nick introduction time)
483  parv[3] = umodes
484  parv[4] = username
485  parv[5] = hostname
486  parv[6] = spoofed hostname
487  parv[7] = server
488  parv[8] = nick info
489 */
490 /*
491  Change NICK
492  parv[0] = old nick
493  parv[1] = new nick
494  parv[2] = TS (timestamp from user's server when nick changed was received)
495 */
496 /*
497  NICK xpto 2 561264 +rw irc num.myisp.pt mask.myisp.pt uc.ptlink.net :Just me
498  0 1 2 3 4 5 6 7 8
499 
500 */
501 int anope_event_nick(char *source, int ac, char **av)
502 {
503  User *user;
504 
505  if (ac != 2) {
506  user = do_nick(source, av[0], av[4], av[5], av[7], av[8],
507  strtoul(av[2], NULL, 10), 0, 0, av[6], NULL);
508  if (user)
509  anope_set_umode(user, 1, &av[3]);
510  } else {
511  do_nick(source, av[0], NULL, NULL, NULL, NULL,
512  strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
513  }
514  return MOD_CONT;
515 }
516 
517 /*
518  :%s SERVER %s %d %s :%s
519  parv[0] = server from where the server was introduced to us
520  parv[1] = server name
521  parv[2] = hop count (1 wen are directly connected)
522  parv[3] = server version
523  parv[4] = server description
524 */
525 int anope_event_server(char *source, int ac, char **av)
526 {
527  if (!stricmp(av[1], "1")) {
528  uplink = sstrdup(av[0]);
529  }
530  do_server(source, av[0], av[1], av[3], NULL);
531  return MOD_CONT;
532 }
533 
534 int anope_event_436(char *source, int ac, char **av)
535 {
536  if (ac < 1)
537  return MOD_CONT;
538 
539  m_nickcoll(av[0]);
540  return MOD_CONT;
541 }
542 
543 
545 {
546  Message *m;
547 
548  updateProtectDetails("PROTECT", "PROTECTME", "protect", "deprotect",
549  "AUTOPROTECT", "+a", "-a");
550 
551  m = createMessage("401", anope_event_null);
552  addCoreMessage(IRCD, m);
553  m = createMessage("402", anope_event_null);
554  addCoreMessage(IRCD, m);
555  m = createMessage("436", anope_event_436);
556  addCoreMessage(IRCD, m);
557  m = createMessage("461", anope_event_null);
558  addCoreMessage(IRCD, m);
559  m = createMessage("AWAY", anope_event_away);
560  addCoreMessage(IRCD, m);
561  m = createMessage("INVITE", anope_event_invite);
562  addCoreMessage(IRCD, m);
563  m = createMessage("JOIN", anope_event_join);
564  addCoreMessage(IRCD, m);
565  m = createMessage("KICK", anope_event_kick);
566  addCoreMessage(IRCD, m);
567  m = createMessage("KILL", anope_event_kill);
568  addCoreMessage(IRCD, m);
569  m = createMessage("MODE", anope_event_mode);
570  addCoreMessage(IRCD, m);
571  m = createMessage("MOTD", anope_event_motd);
572  addCoreMessage(IRCD, m);
573  m = createMessage("NICK", anope_event_nick);
574  addCoreMessage(IRCD, m);
575  m = createMessage("NOTICE", anope_event_notice);
576  addCoreMessage(IRCD, m);
577  m = createMessage("PART", anope_event_part);
578  addCoreMessage(IRCD, m);
579  m = createMessage("PASS", anope_event_pass);
580  addCoreMessage(IRCD, m);
581  m = createMessage("PING", anope_event_ping);
582  addCoreMessage(IRCD, m);
583  m = createMessage("PRIVMSG", anope_event_privmsg);
584  addCoreMessage(IRCD, m);
585  m = createMessage("QUIT", anope_event_quit);
586  addCoreMessage(IRCD, m);
587  m = createMessage("SERVER", anope_event_server);
588  addCoreMessage(IRCD, m);
589  m = createMessage("SQUIT", anope_event_squit);
590  addCoreMessage(IRCD, m);
591  m = createMessage("TOPIC", anope_event_topic);
592  addCoreMessage(IRCD, m);
593  m = createMessage("USER", anope_event_null);
594  addCoreMessage(IRCD, m);
595  m = createMessage("WALLOPS", anope_event_null);
596  addCoreMessage(IRCD, m);
597  m = createMessage("WHOIS", anope_event_whois);
598  addCoreMessage(IRCD, m);
599  m = createMessage("AKILL", anope_event_null);
600  addCoreMessage(IRCD, m);
601  m = createMessage("GLOBOPS", anope_event_null);
602  addCoreMessage(IRCD, m);
603  m = createMessage("GNOTICE", anope_event_null);
604  addCoreMessage(IRCD, m);
605  m = createMessage("GOPER", anope_event_null);
606  addCoreMessage(IRCD, m);
607  m = createMessage("RAKILL", anope_event_null);
608  addCoreMessage(IRCD, m);
609  m = createMessage("SILENCE", anope_event_null);
610  addCoreMessage(IRCD, m);
611  m = createMessage("SVSKILL", anope_event_null);
612  addCoreMessage(IRCD, m);
613  m = createMessage("SVSMODE", anope_event_null);
614  addCoreMessage(IRCD, m);
615  m = createMessage("SVSNICK", anope_event_null);
616  addCoreMessage(IRCD, m);
617  m = createMessage("SVSNOOP", anope_event_null);
618  addCoreMessage(IRCD, m);
619  m = createMessage("SQLINE", anope_event_null);
620  addCoreMessage(IRCD, m);
621  m = createMessage("UNSQLINE", anope_event_null);
622  addCoreMessage(IRCD, m);
623  m = createMessage("NEWMASK", anope_event_newmask);
624  addCoreMessage(IRCD, m);
625  m = createMessage("CAPAB", anope_event_capab);
626  addCoreMessage(IRCD, m);
627  m = createMessage("SVINFO", anope_event_svinfo);
628  addCoreMessage(IRCD, m);
629  m = createMessage("SVSINFO", anope_event_svsinfo);
630  addCoreMessage(IRCD, m);
631  m = createMessage("SJOIN", anope_event_sjoin);
632  addCoreMessage(IRCD, m);
633  m = createMessage("REHASH", anope_event_rehash);
634  addCoreMessage(IRCD, m);
635  m = createMessage("ADMIN", anope_event_admin);
636  addCoreMessage(IRCD, m);
637  m = createMessage("CREDITS", anope_event_credits);
638  addCoreMessage(IRCD, m);
639  m = createMessage("ERROR", anope_event_error);
640  addCoreMessage(IRCD, m);
641  m = createMessage("NJOIN", anope_event_sjoin);
642  addCoreMessage(IRCD, m);
643  m = createMessage("NNICK", anope_event_nick);
644  addCoreMessage(IRCD, m);
645  m = createMessage("ZLINE", anope_event_null);
646  addCoreMessage(IRCD, m);
647  m = createMessage("UNZLINE", anope_event_null);
648  addCoreMessage(IRCD, m);
649 }
650 
651 int anope_event_svsinfo(char *source, int ac, char **av)
652 {
653  return MOD_CONT;
654 }
655 
656 int anope_event_svinfo(char *source, int ac, char **av)
657 {
658  return MOD_CONT;
659 }
660 
661 /* Event: PROTOCTL */
662 int anope_event_capab(char *source, int ac, char **av)
663 {
664  capab_parse(ac, av);
665  return MOD_CONT;
666 }
667 
668 /*
669  :%s SQLINE %s :%s
670  parv[0] = sender
671  parv[1] = sqlined nick/mask
672  parv[2] = reason
673 */
674 void ptlink_cmd_sqline(char *mask, char *reason)
675 {
676  send_cmd(ServerName, "SQLINE %s :%s", mask, reason);
677 }
678 
679 /*
680  :%s SVSADMIN %s :%s
681  parv[0] = sender (services client)
682  parv[1] = target server
683  parv[2] = operation
684  operations:
685  noopers - remove existing opers and disable o:lines
686 */
687 void ptlink_cmd_svsnoop(char *server, int set)
688 {
689  send_cmd(NULL, "SVSADMIN %s :%s", server, set ? "noopers" : "rehash");
690 }
691 
692 void ptlink_cmd_svsadmin(char *server, int set)
693 {
694  ptlink_cmd_svsnoop(server, set);
695 }
696 
697 /*
698  :%s UNGLINE %s
699  parv[0] = sender (server if on network synchronization)
700  parv[1] = glined usert@host mask or ALL to remove all glines
701 */
702 void ptlink_cmd_remove_akill(char *user, char *host)
703 {
704  send_cmd(NULL, "UNGLINE %s@%s", user, host);
705 }
706 
707 
708 void anope_part(char *nick, char *chan)
709 {
710  send_cmd(nick, "PART %s", chan);
711 }
712 void anope_topic(char *whosets, char *chan, char *whosetit, char *topic,
713  time_t when)
714 {
715  send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
716  (unsigned long int) when, topic);
717 }
718 
719 /*
720  :%s UNSQLINE %s
721  parv[0] = sender
722  parv[1] = sqlined nick/mask
723 */
724 void ptlink_cmd_unsqline(char *user)
725 {
726  send_cmd(NULL, "UNSQLINE %s", user);
727 }
728 
729 void ptlink_cmd_join(char *user, char *channel, time_t chantime)
730 {
731  send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) chantime,
732  channel, user);
733 }
734 
735 /*
736  :%s GLINE %s %lu %s %s
737  parv[0] = sender (server if on network synchronization)
738  parv[1] = glined usert@host mask
739  parv[2] = gline duration time (seconds)
740  parv[3] = who added the gline
741  parv[4] = reason
742 */
743 void ptlink_cmd_akill(char *user, char *host, char *who, time_t when,
744  time_t expires, char *reason)
745 {
746  send_cmd(ServerName, "GLINE %s@%s %i %s :%s", user, host, 86400 * 2,
747  who, reason);
748 }
749 
750 
751 void ptlink_cmd_svskill(char *source, char *user, char *buf)
752 {
753  if (!buf) {
754  return;
755  }
756 
757  if (!source || !user) {
758  return;
759  }
760 
761  send_cmd(source, "KILL %s :%s", user, buf);
762 }
763 
764 /*
765  :%s SVSMODE %s %s :%s
766  parv[0] = sender (services client)
767  parv[1] = target client nick
768  parv[2] = mode changes
769  parv[3] = extra parameter ( if news setting mode(+n) )
770  e.g.: :NickServ SVSMODE Lamego +rn 1991234
771 */
772 void ptlink_cmd_svsmode(User * u, int ac, char **av)
773 {
774  send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
775  (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
776 
777  /* If we set +r on someone +NRah (1 or more of those modes), PTlink will
778  * send us a NEWMASK with their ptlink-masked-host. If we want HostServ
779  * to work for them, we will need to send our NEWMASK after we receive
780  * theirs. Thus we make a hack and store in moduleData that we need to
781  * look out for that.
782  */
783  if ((strchr(av[0], 'r')
784  && ((u->mode & UMODE_N) || (u->mode & UMODE_R)
785  || (u->mode & UMODE_a) || (u->mode & UMODE_h))))
786  u->mode |= UMODE_NM;
787 }
788 
789 int anope_event_error(char *source, int ac, char **av)
790 {
791  if (ac >= 1) {
792  if (debug) {
793  alog("debug: %s", av[0]);
794  }
795  }
796  return MOD_CONT;
797 }
798 
799 void ptlink_cmd_squit(char *servname, char *message)
800 {
801  send_cmd(NULL, "SQUIT %s :%s", servname, message);
802 }
803 
804 /* PONG */
805 void ptlink_cmd_pong(char *servname, char *who)
806 {
807  send_cmd(servname, "PONG %s", who);
808 }
809 
810 /*
811  SVINFO %d %d
812  parv[0] = server name
813  parv[1] = current supported protocol version
814  parv[2] = minimum supported protocol version
815 
816  See the ptlink.h for information on PTLINK_TS_CURRENT, and
817  PTLINK_TS_MIN
818 */
820 {
821 #if defined(PTLINK_TS_CURRENT) && defined(PTLINK_TS_MIN)
822  send_cmd(NULL, "SVINFO %d %d %lu", PTLINK_TS_CURRENT, PTLINK_TS_MIN,
823  (unsigned long int) time(NULL));
824 #else
825  /* hardwired if the defs some how go missing */
826  send_cmd(NULL, "SVINFO 6 3 %lu", (unsigned long int) time(NULL));
827 #endif
828 }
829 
830 /*
831  SVSINFO %lu %d
832  parv[0] = sender (server name)
833  parv[1] = local services data TS
834  parv[1] = max global users
835 */
837 {
838  send_cmd(NULL, "SVSINFO %lu %d", (unsigned long int) time(NULL),
839  maxusercnt);
840 }
841 
842 /*
843  PASS %s :TS
844  parv[1] = connection password
845  (TS indicates this is server uses TS protocol and SVINFO will be sent
846  for protocol compatibility checking)
847 */
848 void ptlink_cmd_pass(char *pass)
849 {
850  send_cmd(NULL, "PASS %s :TS", pass);
851 }
852 
853 /*
854  CAPAB :%s
855  parv[1] = capability list
856 */
858 {
859  send_cmd(NULL, "CAPAB :QS PTS4");
860 }
861 
862 
863 void ptlink_cmd_server(char *servname, int hop, char *descript)
864 {
865  send_cmd(NULL, "SERVER %s %d Anope.Services%s :%s", servname, hop,
866  version_number_dotted, descript);
867 }
869 {
870  me_server =
872 
873  if (servernum == 1)
875  else if (servernum == 2)
877  else if (servernum == 3)
879 
884 }
885 
887 {
888  /* Not used */
889 }
890 
891 
892 int anope_event_privmsg(char *source, int ac, char **av)
893 {
894  if (ac != 2)
895  return MOD_CONT;
896  m_privmsg(source, av[0], av[1]);
897  return MOD_CONT;
898 }
899 
900 int anope_event_part(char *source, int ac, char **av)
901 {
902  if (ac < 1 || ac > 2)
903  return MOD_CONT;
904  do_part(source, ac, av);
905  return MOD_CONT;
906 }
907 
908 int anope_event_whois(char *source, int ac, char **av)
909 {
910  if (source && ac >= 1) {
911  m_whois(source, av[0]);
912  }
913  return MOD_CONT;
914 }
915 
916 /*
917  :%s TOPIC %s %s %lu :%s
918  parv[0] = sender prefix
919  parv[1] = channel
920  parv[2] = topic nick
921  parv[3] = topic time
922  parv[4] = topic text
923 */
924 int anope_event_topic(char *source, int ac, char **av)
925 {
926  if (ac != 4)
927  return MOD_CONT;
928  do_topic(source, ac, av);
929  return MOD_CONT;
930 }
931 
932 int anope_event_squit(char *source, int ac, char **av)
933 {
934  if (ac != 2)
935  return MOD_CONT;
936  do_squit(source, ac, av);
937  return MOD_CONT;
938 }
939 
940 int anope_event_quit(char *source, int ac, char **av)
941 {
942  if (ac != 1)
943  return MOD_CONT;
944  do_quit(source, ac, av);
945  return MOD_CONT;
946 }
947 
948 /*
949  :%s MODE %s :%s
950  parv[0] = sender
951  parv[1] = target nick (==sender)
952  parv[2] = mode change string
953 */
954 int anope_event_mode(char *source, int ac, char **av)
955 {
956  if (ac < 2)
957  return MOD_CONT;
958 
959  if (*av[0] == '#' || *av[0] == '&') {
960  do_cmode(source, ac, av);
961  } else {
962  do_umode(source, ac, av);
963  }
964  return MOD_CONT;
965 }
966 
967 
968 int anope_event_kill(char *source, int ac, char **av)
969 {
970  if (ac != 2)
971  return MOD_CONT;
972 
973  m_kill(av[0], av[1]);
974  return MOD_CONT;
975 }
976 
977 int anope_event_kick(char *source, int ac, char **av)
978 {
979  if (ac != 3)
980  return MOD_CONT;
981  do_kick(source, ac, av);
982  return MOD_CONT;
983 }
984 
985 
986 int anope_event_join(char *source, int ac, char **av)
987 {
988  if (ac != 1)
989  return MOD_CONT;
990  do_join(source, ac, av);
991  return MOD_CONT;
992 }
993 
994 int anope_event_motd(char *source, int ac, char **av)
995 {
996  if (!source) {
997  return MOD_CONT;
998  }
999 
1000  m_motd(source);
1001  return MOD_CONT;
1002 }
1003 
1004 void ptlink_cmd_notice_ops(char *source, char *dest, char *buf)
1005 {
1006  if (!buf) {
1007  return;
1008  }
1009 
1010  send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
1011 }
1012 
1013 
1014 void ptlink_cmd_notice(char *source, char *dest, char *buf)
1015 {
1016  if (!buf) {
1017  return;
1018  }
1019 
1020  if (NSDefFlags & NI_MSG) {
1021  ptlink_cmd_privmsg2(source, dest, buf);
1022  } else {
1023  send_cmd(source, "NOTICE %s :%s", dest, buf);
1024  }
1025 }
1026 
1027 void ptlink_cmd_notice2(char *source, char *dest, char *msg)
1028 {
1029  send_cmd(source, "NOTICE %s :%s", dest, msg);
1030 }
1031 
1032 void ptlink_cmd_privmsg(char *source, char *dest, char *buf)
1033 {
1034  if (!buf) {
1035  return;
1036  }
1037 
1038  send_cmd(source, "PRIVMSG %s :%s", dest, buf);
1039 }
1040 
1041 void ptlink_cmd_privmsg2(char *source, char *dest, char *msg)
1042 {
1043  send_cmd(source, "PRIVMSG %s :%s", dest, msg);
1044 }
1045 
1046 void ptlink_cmd_serv_notice(char *source, char *dest, char *msg)
1047 {
1048  send_cmd(source, "NOTICE $%s :%s", dest, msg);
1049 }
1050 
1051 void ptlink_cmd_serv_privmsg(char *source, char *dest, char *msg)
1052 {
1053  send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
1054 }
1055 
1056 /* GLOBOPS */
1057 void ptlink_cmd_global(char *source, char *buf)
1058 {
1059  if (!buf) {
1060  return;
1061  }
1062 
1063  send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
1064 }
1065 
1066 /* 391 */
1067 void ptlink_cmd_391(char *source, char *timestr)
1068 {
1069  if (!timestr) {
1070  return;
1071  }
1072  send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
1073 }
1074 
1075 /* 250 */
1076 void ptlink_cmd_250(char *buf)
1077 {
1078  if (!buf) {
1079  return;
1080  }
1081 
1082  send_cmd(NULL, "250 %s", buf);
1083 }
1084 
1085 /* 307 */
1086 void ptlink_cmd_307(char *buf)
1087 {
1088  if (!buf) {
1089  return;
1090  }
1091 
1092  send_cmd(ServerName, "307 %s", buf);
1093 }
1094 
1095 /* 311 */
1096 void ptlink_cmd_311(char *buf)
1097 {
1098  if (!buf) {
1099  return;
1100  }
1101 
1102  send_cmd(ServerName, "311 %s", buf);
1103 }
1104 
1105 /* 312 */
1106 void ptlink_cmd_312(char *buf)
1107 {
1108  if (!buf) {
1109  return;
1110  }
1111 
1112  send_cmd(ServerName, "312 %s", buf);
1113 }
1114 
1115 /* 317 */
1116 void ptlink_cmd_317(char *buf)
1117 {
1118  if (!buf) {
1119  return;
1120  }
1121 
1122  send_cmd(ServerName, "317 %s", buf);
1123 }
1124 
1125 /* 219 */
1126 void ptlink_cmd_219(char *source, char *letter)
1127 {
1128  if (!source) {
1129  return;
1130  }
1131 
1132  if (letter) {
1133  send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
1134  *letter);
1135  } else {
1136  send_cmd(NULL, "219 %s l :End of /STATS report.", source);
1137  }
1138 }
1139 
1140 /* 401 */
1141 void ptlink_cmd_401(char *source, char *who)
1142 {
1143  if (!source || !who) {
1144  return;
1145  }
1146  send_cmd(ServerName, "401 %s %s :No such service.", source, who);
1147 }
1148 
1149 /* 318 */
1150 void ptlink_cmd_318(char *source, char *who)
1151 {
1152  if (!source || !who) {
1153  return;
1154  }
1155 
1156  send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
1157 }
1158 
1159 /* 242 */
1160 void ptlink_cmd_242(char *buf)
1161 {
1162  if (!buf) {
1163  return;
1164  }
1165 
1166  send_cmd(NULL, "242 %s", buf);
1167 }
1168 
1169 /* 243 */
1170 void ptlink_cmd_243(char *buf)
1171 {
1172  if (!buf) {
1173  return;
1174  }
1175 
1176  send_cmd(NULL, "243 %s", buf);
1177 }
1178 
1179 /* 211 */
1180 void ptlink_cmd_211(char *buf)
1181 {
1182  if (!buf) {
1183  return;
1184  }
1185 
1186  send_cmd(NULL, "211 %s", buf);
1187 }
1188 
1189 void ptlink_cmd_mode(char *source, char *dest, char *buf)
1190 {
1191  if (!buf) {
1192  return;
1193  }
1194 
1195  send_cmd(source, "MODE %s %s", dest, buf);
1196 }
1197 
1198 /*
1199  NICK %s %d %lu %s %s %s %s %s :%s
1200  parv[1] = nickname
1201  parv[2] = hopcount
1202  parv[3] = nick TS (nick introduction time)
1203  parv[4] = umodes
1204  parv[5] = username
1205  parv[6] = hostname
1206  parv[7] = spoofed hostname
1207  parv[8] = server
1208  parv[9] = nick info
1209 */
1210 void ptlink_cmd_nick(char *nick, char *name, char *mode)
1211 {
1212  EnforceQlinedNick(nick, NULL);
1213  send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
1214  (unsigned long int) time(NULL), mode, ServiceUser,
1216  ptlink_cmd_sqline(nick, "Reserved for services");
1217 }
1218 
1219 void ptlink_cmd_kick(char *source, char *chan, char *user, char *buf)
1220 {
1221  if (!buf) {
1222  return;
1223  }
1224 
1225  if (buf) {
1226  send_cmd(source, "KICK %s %s :%s", chan, user, buf);
1227  } else {
1228  send_cmd(source, "KICK %s %s", chan, user);
1229  }
1230 }
1231 
1232 /* QUIT */
1233 void ptlink_cmd_quit(char *source, char *buf)
1234 {
1235  if (buf) {
1236  send_cmd(source, "QUIT :%s", buf);
1237  } else {
1238  send_cmd(source, "QUIT");
1239  }
1240 }
1241 
1242 void ptlink_cmd_part(char *nick, char *chan, char *buf)
1243 {
1244  if (buf) {
1245  send_cmd(nick, "PART %s :%s", chan, buf);
1246  } else {
1247  send_cmd(nick, "PART %s", chan);
1248  }
1249 }
1250 
1251 /*
1252  :%s TOPIC %s %s %lu :%s
1253  parv[0] = sender prefix
1254  parv[1] = channel
1255  parv[2] = topic nick
1256  parv[3] = topic time
1257  parv[4] = topic text
1258 */
1259 void ptlink_cmd_topic(char *whosets, char *chan, char *whosetit,
1260  char *topic, time_t when)
1261 {
1262  send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
1263  (long int) time(NULL), topic);
1264 }
1265 
1267 {
1268  /* does not support vhosting */
1269 }
1270 
1271 void ptlink_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
1272 {
1273  User *u;
1274 
1275  if (vIdent) {
1276  send_cmd(s_HostServ, "NEWMASK %s@%s %s", vIdent, vhost, nick);
1277  } else {
1278  send_cmd(s_HostServ, "NEWMASK %s %s", vhost, nick);
1279  }
1280 
1281  if ((u = finduser(nick)))
1282  u->mode |= UMODE_VH;
1283 }
1284 
1285 /* INVITE */
1286 void ptlink_cmd_invite(char *source, char *chan, char *nick)
1287 {
1288  if (!source || !chan || !nick) {
1289  return;
1290  }
1291 
1292  send_cmd(source, "INVITE %s %s", nick, chan);
1293 }
1294 
1295 void ptlink_cmd_372(char *source, char *msg)
1296 {
1297  send_cmd(ServerName, "372 %s :- %s", source, msg);
1298 }
1299 
1300 void ptlink_cmd_372_error(char *source)
1301 {
1302  send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
1303  "contact your IRC administrator.", source);
1304 }
1305 
1306 void ptlink_cmd_375(char *source)
1307 {
1308  send_cmd(ServerName, "375 %s :- %s Message of the Day",
1309  source, ServerName);
1310 }
1311 
1312 void ptlink_cmd_376(char *source)
1313 {
1314  send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
1315 }
1316 
1317 
1318 void ptlink_set_umode(User * user, int ac, char **av)
1319 {
1320  int add = 1; /* 1 if adding modes, 0 if deleting */
1321  char *modes = av[0];
1322 
1323  ac--;
1324 
1325  if (debug)
1326  alog("debug: Changing mode for %s to %s", user->nick, modes);
1327 
1328  while (*modes) {
1329 
1330  /* This looks better, much better than "add ? (do_add) : (do_remove)".
1331  * At least this is readable without paying much attention :) -GD
1332  */
1333  if (add)
1334  user->mode |= umodes[(int) *modes];
1335  else
1336  user->mode &= ~umodes[(int) *modes];
1337 
1338  switch (*modes++) {
1339  case '+':
1340  add = 1;
1341  break;
1342  case '-':
1343  add = 0;
1344  break;
1345  case 'o':
1346  if (add) {
1347  opcnt++;
1348 
1349  if (WallOper)
1351  "\2%s\2 is now an IRC operator.",
1352  user->nick);
1353  display_news(user, NEWS_OPER);
1354  if (is_services_admin(user)) {
1355  common_svsmode(user, "+a", NULL);
1356  user->mode |= UMODE_a;
1357  }
1358 
1359  } else {
1360  opcnt--;
1361  }
1362  break;
1363  case 'r':
1364  if (add && !nick_identified(user)) {
1365  common_svsmode(user, "-r", NULL);
1366  user->mode &= ~UMODE_r;
1367  }
1368  break;
1369  }
1370  }
1371 }
1372 
1373 int anope_event_ping(char *source, int ac, char **av)
1374 {
1375  if (ac < 1)
1376  return MOD_CONT;
1377  ptlink_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]);
1378  return MOD_CONT;
1379 }
1380 
1381 int anope_event_away(char *source, int ac, char **av)
1382 {
1383  if (!source) {
1384  return MOD_CONT;
1385  }
1386  m_away(source, (ac ? av[0] : NULL));
1387  return MOD_CONT;
1388 }
1389 
1390 void ptlink_cmd_bot_nick(char *nick, char *user, char *host, char *real,
1391  char *modes)
1392 {
1394  send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
1395  (unsigned long int) time(NULL), modes, user, host, host,
1396  ServerName, real);
1397  ptlink_cmd_sqline(nick, "Reserved for services");
1398 
1399 }
1400 
1401 void ptlink_cmd_351(char *source)
1402 {
1403  send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
1406 
1407 
1408 }
1409 
1410 /* SVSHOLD - set */
1411 void ptlink_cmd_svshold(char *nick)
1412 {
1413  /* Not supported by this IRCD */
1414 }
1415 
1416 /* SVSHOLD - release */
1418 {
1419  /* Not Supported by this IRCD */
1420 }
1421 
1422 /*
1423 :%s UNZLINE %s
1424  parv[0] = sender
1425  parv[1] = zlined host
1426 */
1427 void ptlink_cmd_unszline(char *mask)
1428 {
1429  send_cmd(s_OperServ, "UNZLINE %s", mask);
1430 }
1431 
1432 /*
1433 :%s ZLINE %s :%s
1434  parv[0] = sender
1435  parv[1] = zlined host
1436  parv[2] = time
1437  parv[3] = reason
1438 */
1439 void ptlink_cmd_szline(char *mask, char *reason, char *whom)
1440 {
1441  send_cmd(s_OperServ, "ZLINE %s %ld :%s", mask,
1442  (long int) time(NULL) + 86400 * 2, reason);
1443 }
1444 
1445 /*
1446 :%s UNSXLINE %s
1447  parv[0] = sender
1448  parv[1] = info ban mask
1449 */
1450 void ptlink_cmd_unsgline(char *mask)
1451 {
1452  send_cmd(ServerName, "UNSXLINE :%s", mask);
1453 }
1454 
1455 
1456 /*
1457  * sxline - add info ban line
1458  *
1459  * parv[0] = sender prefix
1460  * parv[1] = mask length
1461  * parv[2] = real name banned mask:reason
1462  */
1463 void ptlink_cmd_sgline(char *mask, char *reason)
1464 {
1465  send_cmd(ServerName, "SXLINE %d :%s:%s", (int) strlen(mask), mask,
1466  reason);
1467 }
1468 
1469 /* SVSNICK */
1470 /*
1471  :%s SVSNICK %s %s
1472  parv[0] = sender (services client)
1473  parv[1] = target client nick
1474  parv[2] = new nick
1475  e.g.: :NickServ SVSNICK Smiler 67455223 _Smiler-
1476 */
1477 void ptlink_cmd_svsnick(char *source, char *guest, time_t when)
1478 {
1479  if (!source || !guest) {
1480  return;
1481  }
1482  send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
1483 }
1484 
1485 void ptlink_cmd_guest_nick(char *nick, char *user, char *host, char *real,
1486  char *modes)
1487 {
1488  send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
1489  (unsigned long int) time(NULL), modes, user, host, host,
1490  ServerName, real);
1491 }
1492 
1493 
1494 void ptlink_cmd_unban(char *name, char *nick)
1495 {
1496  /* Not Supported by this IRCD */
1497 }
1498 
1499 /* SVSMODE channel modes */
1500 
1501 void ptlink_cmd_svsmode_chan(char *name, char *mode, char *nick)
1502 {
1503  /* Not Supported by this IRCD */
1504 }
1505 
1506 void ptlink_cmd_svso(char *source, char *nick, char *flag)
1507 {
1508  /* Not Supported by this IRCD */
1509 }
1510 
1511 
1512 /* SVSMODE +d */
1513 /* sent if svid is something weird */
1514 void ptlink_cmd_svid_umode(char *nick, time_t ts)
1515 {
1516  /* Not Supported by this ircd */
1517 }
1518 
1519 /* SVSMODE +d */
1520 /* nc_change was = 1, and there is no na->status */
1522 {
1523  /* Not Supported by this ircd */
1524 }
1525 
1526 /* SVSMODE +d */
1527 /* sent if svid is something weird */
1528 void ptlink_cmd_svid_umode2(User * u, char *ts)
1529 {
1530  common_svsmode(u, "+r", NULL);
1531 }
1532 
1533 void ptlink_cmd_svid_umode3(User * u, char *ts)
1534 {
1535  /* Bahamuts have this extra one, since they can check on even nick changes */
1536 }
1537 
1538 /* NICK <newnick> */
1539 /*
1540  :%s NICK %s %lu
1541  parv[0] = old nick
1542  parv[1] = new nick
1543  parv[2] = TS (timestamp from user's server when nick changed was received)
1544 */
1545 void ptlink_cmd_chg_nick(char *oldnick, char *newnick)
1546 {
1547  if (!oldnick || !newnick) {
1548  return;
1549  }
1550 
1551  send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(NULL));
1552 }
1553 
1554 /*
1555  :%s SVSJOIN %s :%s
1556  parv[0] = sender (services client)
1557  parv[1] = target client nick
1558  parv[2] = channels list
1559  :OperServ SVSJOIN Trystan #Admin
1560 */
1561 void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
1562 {
1563  send_cmd(source, "SVSJOIN %s %s", nick, chan);
1564 }
1565 
1566 /*
1567  :%s SVSPART %s :%s
1568  parv[0] = sender (services client)
1569  parv[1] = target client nick
1570  parv[2] = channels list
1571  e.g.: :ChanServ SVSPART mynick 4163321 #Chan1,#Chan2
1572 */
1573 void ptlink_cmd_svspart(char *source, char *nick, char *chan)
1574 {
1575  send_cmd(source, "SVSPART %s :%s", nick, chan);
1576 }
1577 
1578 void ptlink_cmd_swhois(char *source, char *who, char *mask)
1579 {
1580  /* not supported */
1581 }
1582 
1583 int anope_event_notice(char *source, int ac, char **av)
1584 {
1585  return MOD_CONT;
1586 }
1587 
1588 int anope_event_pass(char *source, int ac, char **av)
1589 {
1590  return MOD_CONT;
1591 }
1592 
1593 int anope_event_rehash(char *source, int ac, char **av)
1594 {
1595  return MOD_CONT;
1596 }
1597 
1598 int anope_event_credits(char *source, int ac, char **av)
1599 {
1600  return MOD_CONT;
1601 }
1602 
1603 int anope_event_admin(char *source, int ac, char **av)
1604 {
1605  return MOD_CONT;
1606 }
1607 
1608 int anope_event_invite(char *source, int ac, char **av)
1609 {
1610  return MOD_CONT;
1611 }
1612 
1613 int ptlink_flood_mode_check(char *value)
1614 {
1615  char *dp, *end;
1616 
1617  if (value && *value != ':'
1618  && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
1619  && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
1620  && (*end == 0)) {
1621  return 1;
1622  } else {
1623  return 0;
1624  }
1625 }
1626 
1628 {
1629  /* not supported */
1630 }
1631 
1632 void ptlink_cmd_jupe(char *jserver, char *who, char *reason)
1633 {
1634  char rbuf[256];
1635 
1636  snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
1637  reason ? ": " : "", reason ? reason : "");
1638 
1639  if (findserver(servlist, jserver))
1640  ptlink_cmd_squit(jserver, rbuf);
1641  ptlink_cmd_server(jserver, 1, rbuf);
1642  new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
1643 }
1644 
1645 /* GLOBOPS - to handle old WALLOPS */
1646 void ptlink_cmd_global_legacy(char *source, char *fmt)
1647 {
1648  send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
1649 }
1650 
1651 /*
1652  1 = valid nick
1653  0 = nick is in valid
1654 */
1655 int ptlink_valid_nick(char *nick)
1656 {
1657  /* no hard coded invalid nicks */
1658  return 1;
1659 }
1660 
1661 /*
1662  1 = valid chan
1663  0 = chan is in valid
1664 */
1665 int ptlink_valid_chan(char *cahn)
1666 {
1667  /* no hard coded invalid chan */
1668  return 1;
1669 }
1670 
1671 
1672 void ptlink_cmd_ctcp(char *source, char *dest, char *buf)
1673 {
1674  char *s;
1675 
1676  if (!buf) {
1677  return;
1678  } else {
1679  s = normalizeBuffer(buf);
1680  }
1681 
1682  send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
1683  free(s);
1684 }
1685 
1686 
1692 {
1768 }
1769 
1773 int AnopeInit(int argc, char **argv)
1774 {
1775 
1776  moduleAddAuthor("Anope");
1778  (VERSION_STRING);
1780 
1781 
1782  pmodule_ircd_version("PTlink 6.15.*+");
1783  pmodule_ircd_cap(myIrcdcap);
1784  pmodule_ircd_var(myIrcd);
1785  pmodule_ircd_cbmodeinfos(myCbmodeinfos);
1786  pmodule_ircd_cumodes(myCumodes);
1789  pmodule_ircd_cbmodes(myCbmodes);
1790  pmodule_ircd_cmmodes(myCmmodes);
1793 
1803 
1806 
1807  return MOD_CONT;
1808 }
1809 
1810 /* EOF */
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
E void do_topic(const char *source, int ac, char **av)
Definition: channels.c:1249
E void do_server(const char *source, char *servername, char *hops, char *descript, char *numeric)
Definition: servers.c:360
E void pmodule_cmd_notice2(void(*func)(char *source, char *dest, char *msg))
Definition: ircd.c:798
E char * RemotePassword
Definition: extern.h:264
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
Definition: ircd.c:827
#define UMODE_R
Definition: bahamut.h:42
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
#define UMODE_y
Definition: bahamut.h:33
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
#define UMODE_w
Definition: bahamut.h:21
#define CBM_MINUS_NO_ARG
Definition: services.h:928
E void change_user_username(User *user, const char *username)
Definition: users.c:170
E char * s_BotServ
Definition: extern.h:287
E IRCDVar * ircd
Definition: extern.h:39
E uint32 maxusercnt
Definition: extern.h:1141
E void pmodule_cmd_nick(void(*func)(char *nick, char *name, char *modes))
Definition: ircd.c:756
E void chan_set_key(Channel *chan, char *value)
Definition: channels.c:1998
E void pmodule_ircd_cmmodes(CMMode modes[128])
Definition: ircd.c:1143
E void do_kick(const char *source, int ac, char **av)
Definition: channels.c:638
E void pmodule_cmd_372_error(void(*func)(char *source))
Definition: ircd.c:741
#define CMODE_p
Definition: bahamut.h:47
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
Definition: modules.c:1597
E void pmodule_valid_nick(int(*func)(char *nick))
Definition: ircd.c:1082
E void cs_set_limit(ChannelInfo *ci, char *value)
Definition: chanserv.c:2558
E int nick_identified(User *u)
Definition: nickserv.c:1111
E void pmodule_cmd_kick(void(*func)(char *source, char *chan, char *user, char *buf))
Definition: ircd.c:780
E void send_cmd(const char *source, const char *fmt,...) FORMAT(printf
E void pmodule_cmd_vhost_on(void(*func)(char *nick, char *vIdent, char *vhost))
Definition: ircd.c:966
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
E void pmodule_cmd_211(void(*func)(char *buf))
Definition: ircd.c:924
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
E char * myStrGetTokenRemainder(const char *str, const char dilim, int token_number)
Definition: misc.c:720
#define CMODE_l
Definition: bahamut.h:51
char * name
Definition: services.h:277
#define CMODE_N
Definition: inspircd11.h:48
E void pmodule_cmd_nc_change(void(*func)(User *u))
Definition: ircd.c:1028
E void pmodule_cmd_372(void(*func)(char *source, char *msg))
Definition: ircd.c:736
E char * ServerDesc
Definition: extern.h:275
E void pmodule_cmd_bob(void(*func)())
Definition: ircd.c:976
#define CMODE_C
Definition: inspircd11.h:45
E void pmodule_ircd_flood_mode_char_remove(char *mode)
Definition: ircd.c:1130
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
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
#define CUS_VOICE
Definition: services.h:1342
#define IRCD
Definition: modules.h:63
#define CMODE_A
Definition: inspircd11.h:35
#define UMODE_i
Definition: bahamut.h:18
E void pmodule_cmd_svsnoop(void(*func)(char *server, int set))
Definition: ircd.c:696
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 void pmodule_cmd_unsgline(void(*func)(char *mask))
Definition: ircd.c:991
#define UMODE_s
Definition: bahamut.h:29
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
E void EnforceQlinedNick(char *nick, char *killer)
Definition: misc.c:837
#define CMODE_t
Definition: bahamut.h:49
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
E void pmodule_cmd_243(void(*func)(char *buf))
Definition: ircd.c:919
E void do_sjoin(const char *source, int ac, char **av)
Definition: channels.c:803
E void anope_set_umode(User *user, int ac, char **av)
Definition: ircd.c:130
E char * sstrdup(const char *s)
Definition: memory.c:105
E void do_join(const char *source, int ac, char **av)
Definition: channels.c:556
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
E char * s_OperServ
Definition: extern.h:289
E void pmodule_invis_umode(int mode)
Definition: ircd.c:1171
E void pmodule_cmd_svid_umode2(void(*func)(User *u, char *ts))
Definition: ircd.c:1033
E void pmodule_cmd_chg_nick(void(*func)(char *oldnick, char *newnick))
Definition: ircd.c:954
E char * ServiceHost
Definition: extern.h:277
E char * EncModule
Definition: extern.h:580
#define CMODE_B
Definition: inspircd12.h:67
E void pmodule_invite_cmode(int mode)
Definition: ircd.c:1181
E void cs_set_flood(ChannelInfo *ci, char *value)
Definition: chanserv.c:2500
#define CMODE_r
Definition: bahamut.h:53
E void pmodule_cmd_eob(void(*func)())
Definition: ircd.c:1066
#define CMODE_O
Definition: bahamut.h:57
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 User * finduser(const char *nick)
Definition: users.c:323
E int m_kill(char *nick, char *msg)
Definition: messages.c:49
E void pmodule_cmd_part(void(*func)(char *nick, char *chan, char *buf))
Definition: ircd.c:864
E int m_away(char *source, char *msg)
Definition: messages.c:29
E void set_flood(Channel *chan, char *value)
Definition: channels.c:1972
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
#define CAPAB_QS
Definition: services.h:1378
E void pmodule_ircd_cumodes(CUMode modes[128])
Definition: ircd.c:1117
E const char version_flags[]
Definition: extern.h:771
#define CMODE_f
Definition: charybdis.h:35
E void alog(const char *fmt,...) FORMAT(printf
E char * myStrGetOnlyToken(const char *str, const char dilim, int token_number)
Definition: misc.c:685
E int servernum
Definition: extern.h:615
#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 char * cs_get_flood(ChannelInfo *ci)
Definition: chanserv.c:2417
E void display_news(User *u, int16 type)
Definition: news.c:269
#define CMODE_K
Definition: inspircd11.h:37
E Server * findserver(Server *s, const char *name)
Definition: servers.c:261
#define UMODE_z
Definition: charybdis.h:18
E void pmodule_cmd_svid_umode(void(*func)(char *nick, time_t ts))
Definition: ircd.c:1023
E int m_privmsg(char *source, char *receiver, char *msg)
Definition: messages.c:130
E void pmodule_ircd_csmodes(char mode[128])
Definition: ircd.c:1151
E void pmodule_cmd_242(void(*func)(char *buf))
Definition: ircd.c:914
#define NI_MSG
Definition: services.h:1292
E int debug
Definition: extern.h:775
E int is_services_admin(User *u)
Definition: operserv.c:591
E void set_limit(Channel *chan, char *value)
Definition: channels.c:2011
E void pmodule_cmd_311(void(*func)(char *buf))
Definition: ircd.c:884
E void pmodule_cmd_join(void(*func)(char *user, char *channel, time_t chantime))
Definition: ircd.c:848
E int NSDefFlags
Definition: extern.h:377
E void del_exception(Channel *chan, char *mask)
Definition: channels.c:1808
E void pmodule_cmd_318(void(*func)(char *source, char *who))
Definition: ircd.c:909
E char * s_HostServ
Definition: extern.h:303
E void pmodule_cmd_250(void(*func)(char *buf))
Definition: ircd.c:874
#define UMODE_B
Definition: inspircd12.h:31
#define CAPAB_PT4
Definition: services.h:1380
E void pmodule_ircd_version(char *version)
Definition: ircd.c:1107
E const char version_number[]
Definition: extern.h:767
E char * get_flood(Channel *chan)
Definition: channels.c:1860
#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
E void pmodule_cmd_401(void(*func)(char *source, char *who))
Definition: ircd.c:904
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
E void pmodule_cmd_szline(void(*func)(char *mask, char *reason, char *whom))
Definition: ircd.c:1002
#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
#define UMODE_N
Definition: plexus3.h:22
#define UMODE_A
Definition: bahamut.h:22
E void add_exception(Channel *chan, char *mask)
Definition: channels.c:1377
#define UMODE_S
Definition: charybdis.h:23
#define CMODE_k
Definition: bahamut.h:50
E void pmodule_cmd_unban(void(*func)(char *name, char *nick))
Definition: ircd.c:1012
E const char version_number_dotted[]
Definition: extern.h:768
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
#define DEFAULT_MLOCK
Definition: bahamut.h:59
E void pmodule_cmd_akill(void(*func)(char *user, char *host, char *who, time_t when, time_t expires, char *reason))
Definition: ircd.c:718
E void capab_parse(int ac, char **av)
Definition: servers.c:451
E int check_valid_op(User *user, Channel *chan, int servermode)
Definition: chanserv.c:1290
#define CAPAB_SCS
Definition: services.h:1379
E char * cs_get_limit(ChannelInfo *ci)
Definition: chanserv.c:2458
uint32 mode
Definition: services.h:889
E void pmodule_cmd_guest_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
Definition: ircd.c:761
E void common_svsmode(User *u, char *modes, char *arg)
Definition: actions.c:228
E char * ServerName
Definition: extern.h:274
#define CMODE_c
Definition: bahamut.h:54
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
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
E Server * me_server
Definition: extern.h:1052
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
#define UMODE_H
Definition: inspircd12.h:33
E void pmodule_flood_mode_check(int(*func)(char *value))
Definition: ircd.c:1092
#define NEWS_OPER
Definition: services.h:1050
E void 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
#define CMODE_S
Definition: hybrid.h:46
E void pmodule_cmd_svskill(void(*func)(char *source, char *user, char *buf))
Definition: ircd.c:726
E void pmodule_cmd_svsmode_chan(void(*func)(char *name, char *mode, char *nick))
Definition: ircd.c:1018
E void pmodule_ircd_flood_mode_char_set(char *mode)
Definition: ircd.c:1125
E void pmodule_cmd_312(void(*func)(char *buf))
Definition: ircd.c:889
E const char version_build[]
Definition: extern.h:769
E void change_user_host(User *user, const char *host)
Definition: users.c:129
#define CMODE_s
Definition: bahamut.h:48
#define CUS_OP
Definition: services.h:1341
E char * normalizeBuffer(char *)
Definition: botserv.c:1101
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
#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