00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "services.h"
00015 #include "pseudo.h"
00016 #include "ptlink.h"
00017 #include "version.h"
00018
00019 IRCDVar myIrcd[] = {
00020 {"PTlink 6.15.*+",
00021 "+o",
00022 "+o",
00023 "+o",
00024 "+o",
00025 "+io",
00026 "+o",
00027 "+h",
00028 "+i",
00029 "+io",
00030 "+o",
00031 "+o",
00032 "+o",
00033 "+io",
00034 "+io",
00035 "+o",
00036 "+h",
00037 "+i",
00038 "+io",
00039 "+",
00040 2,
00041 "-inpsmtCRKOASdcqBNl",
00042 "+ao",
00043 1,
00044 1,
00045 0,
00046 NULL,
00047 NULL,
00048 "+a",
00049 "-a",
00050 "+r",
00051 NULL,
00052 NULL,
00053 NULL,
00054 "-r",
00055 NULL,
00056 1,
00057 1,
00058 1,
00059 0,
00060 4,
00061 0,
00062 0,
00063 1,
00064 0,
00065 0,
00066 0,
00067 0,
00068 0,
00069 0,
00070 0,
00071 1,
00072 0,
00073 1,
00074 CMODE_r,
00075 1,
00076 0,
00077 0,
00078 0,
00079 0,
00080 1,
00081 1,
00082 0,
00083 CMODE_K,
00084 CMODE_A,
00085 DEFAULT_MLOCK,
00086 UMODE_VH,
00087 1,
00088 0,
00089 CMODE_f,
00090 0,
00091 1,
00092 1,
00093 NULL,
00094 0,
00095 1,
00096 0,
00097 0,
00098 0,
00099 0,
00100 0,
00101 0,
00102 0,
00103 NULL,
00104 0,
00105 1,
00106 0,
00107 NULL,
00108 0,
00109 0,
00110 0,
00111 0,
00112 0,
00113 }
00114 ,
00115 {NULL}
00116 };
00117
00118 IRCDCAPAB myIrcdcap[] = {
00119 {
00120 0,
00121 0,
00122 0,
00123 0,
00124 0,
00125 CAPAB_ZIP,
00126 0,
00127 0,
00128 0,
00129 0,
00130 CAPAB_PT4,
00131 CAPAB_SCS,
00132 CAPAB_QS,
00133 0,
00134 0,
00135 0,
00136 0,
00137 0,
00138 0,
00139 0,
00140 0,
00141 0,
00142 0,
00143 0,
00144 0,
00145 0,
00146 0,
00147 0,
00148 0, 0, 0}
00149 };
00150
00151
00152 unsigned long umodes[128] = {
00153 0, 0, 0,
00154 0, 0, 0,
00155 0, 0, 0,
00156 0, 0, 0,
00157 0, 0, 0,
00158 0, 0, 0,
00159 0, 0, 0,
00160 0, 0, 0,
00161 0, 0, 0,
00162 0, 0, 0,
00163 0, 0, 0,
00164 0, 0, 0,
00165 0, 0, 0,
00166 0, 0, 0,
00167 0, 0, 0,
00168 0, 0, 0,
00169 0, 0,
00170 0, 0,
00171 0, 0,
00172 0, 0,
00173 0, 0,
00174 0, 0,
00175 0, 0, 0,
00176 0, 0,
00177 UMODE_A, UMODE_B, 0,
00178 0, 0, 0,
00179 0, UMODE_H, 0,
00180 0, 0, 0,
00181 0, UMODE_N, UMODE_O,
00182 0, 0, UMODE_R,
00183 UMODE_S, UMODE_T, 0,
00184 0, 0, 0,
00185 0,
00186 0,
00187 0, 0, 0,
00188 0, 0, 0,
00189 UMODE_a, 0, 0,
00190 0, 0, 0,
00191 0, UMODE_h, UMODE_i,
00192 0, 0, 0,
00193 0, 0, UMODE_o,
00194 UMODE_p, 0, UMODE_r,
00195 UMODE_s, 0, 0,
00196 UMODE_v, UMODE_w, 0,
00197 UMODE_y,
00198 UMODE_z,
00199 0, 0, 0,
00200 0, 0
00201 };
00202
00203 char myCsmodes[128] = {
00204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00205 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00206
00207 0,
00208 0,
00209 0, 0, 0,
00210 0,
00211 0, 0, 0, 0,
00212 0,
00213
00214 'v', 0, 0, 'a', 0,
00215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00216
00217 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00219
00220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
00222 };
00223
00224
00225 CMMode myCmmodes[128] = {
00226 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00227 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00228 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00229 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00230 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00231 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00232 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00233 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00234 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00235 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00236 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00237 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00238 {NULL},
00239 {NULL},
00240 {add_ban, del_ban},
00241 {NULL},
00242 {NULL},
00243 {add_exception, del_exception},
00244 {NULL},
00245 {NULL},
00246 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00247 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
00248 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
00249 };
00250
00251
00252 CBMode myCbmodes[128] = {
00253 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00254 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00255 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00256 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00257 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00258 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00259 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00260 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00261 {0},
00262 {CMODE_A, 0, NULL, NULL},
00263 {CMODE_B, 0, NULL, NULL},
00264 {CMODE_C, 0, NULL, NULL},
00265 {0},
00266 {0},
00267 {0},
00268 {0},
00269 {0},
00270 {0},
00271 {0},
00272 {CMODE_K, 0, NULL, NULL},
00273 {0},
00274 {0},
00275 {CMODE_N, 0, NULL, NULL},
00276 {CMODE_O, 0, NULL, NULL},
00277 {0},
00278 {0},
00279 {CMODE_R, 0, NULL, NULL},
00280 {CMODE_S, 0, NULL, NULL},
00281 {0},
00282 {0},
00283 {0},
00284 {0},
00285 {0},
00286 {0},
00287 {0},
00288 {0}, {0}, {0}, {0}, {0}, {0},
00289 {0},
00290 {0},
00291 {CMODE_c, 0, NULL, NULL},
00292 {CMODE_d, 0, NULL, NULL},
00293 {0},
00294 {CMODE_f, 0, set_flood, cs_set_flood},
00295 {0},
00296 {0},
00297 {CMODE_i, 0, NULL, NULL},
00298 {0},
00299 {CMODE_k, 0, chan_set_key, cs_set_key},
00300 {CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit},
00301 {CMODE_m, 0, NULL, NULL},
00302 {CMODE_n, 0, NULL, NULL},
00303 {0},
00304 {CMODE_p, 0, NULL, NULL},
00305 {CMODE_q, 0, NULL, NULL},
00306 {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
00307 {CMODE_s, 0, NULL, NULL},
00308 {CMODE_t, 0, NULL, NULL},
00309 {0},
00310 {0},
00311 {0},
00312 {0},
00313 {0},
00314 {0},
00315 {0}, {0}, {0}, {0}
00316 };
00317
00318 CBModeInfo myCbmodeinfos[] = {
00319 {'c', CMODE_c, 0, NULL, NULL},
00320 {'d', CMODE_d, 0, NULL, NULL},
00321 {'f', CMODE_f, 0, get_flood, cs_get_flood},
00322 {'i', CMODE_i, 0, NULL, NULL},
00323 {'k', CMODE_k, 0, get_key, cs_get_key},
00324 {'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit},
00325 {'m', CMODE_m, 0, NULL, NULL},
00326 {'n', CMODE_n, 0, NULL, NULL},
00327 {'p', CMODE_p, 0, NULL, NULL},
00328 {'q', CMODE_q, 0, NULL, NULL},
00329 {'r', CMODE_r, 0, NULL, NULL},
00330 {'s', CMODE_s, 0, NULL, NULL},
00331 {'t', CMODE_t, 0, NULL, NULL},
00332 {'A', CMODE_A, 0, NULL, NULL},
00333 {'B', CMODE_B, 0, NULL, NULL},
00334 {'C', CMODE_C, 0, NULL, NULL},
00335 {'K', CMODE_K, 0, NULL, NULL},
00336 {'N', CMODE_N, 0, NULL, NULL},
00337 {'O', CMODE_O, 0, NULL, NULL},
00338 {'R', CMODE_R, 0, NULL, NULL},
00339 {'S', CMODE_S, 0, NULL, NULL},
00340 {0}
00341 };
00342
00343 CUMode myCumodes[128] = {
00344 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00345 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00346 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00347 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00348
00349 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00350 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00351 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00352 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00353
00354 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00355 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00356 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00357 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
00358
00359 {0},
00360
00361 {0},
00362 {0},
00363 {0},
00364 {0},
00365 {0},
00366 {0},
00367 {0},
00368 {0},
00369 {0},
00370 {0},
00371 {0},
00372 {0},
00373 {0},
00374 {0},
00375 {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
00376 {0},
00377 {0},
00378 {0},
00379 {0},
00380 {0},
00381 {0},
00382 {CUS_VOICE, 0, NULL},
00383 {0},
00384 {0},
00385 {0},
00386 {0},
00387 {0}, {0}, {0}, {0}, {0}
00388 };
00389
00390
00391
00392 void ptlink_cmd_bot_chan_mode(char *nick, char *chan)
00393 {
00394 anope_cmd_mode(s_ChanServ, chan, "%s %s %s", ircd->botchanumode, nick,
00395 nick);
00396 }
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408 int anope_event_sjoin(char *source, int ac, char **av)
00409 {
00410 do_sjoin(source, ac, av);
00411 return MOD_CONT;
00412 }
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425 int anope_event_newmask(char *source, int ac, char **av)
00426 {
00427 User *u;
00428 char *newhost = NULL, *newuser = NULL;
00429 int tofree = 0;
00430
00431 if (ac != 1)
00432 return MOD_CONT;
00433 u = finduser(source);
00434
00435 if (!u) {
00436 if (debug) {
00437 alog("debug: NEWMASK for nonexistent user %s", av[0]);
00438 }
00439 return MOD_CONT;
00440 }
00441
00442 if ((u->mode & (UMODE_NM | UMODE_VH)) == (UMODE_NM | UMODE_VH)) {
00443
00444
00445
00446
00447
00448 u->mode &= ~UMODE_NM;
00449 if (debug)
00450 alog("debug: Ignoring NEWMASK because it's sent because of SVSMODE +r");
00451 return MOD_CONT;
00452 }
00453
00454 newuser = myStrGetOnlyToken(av[0], '@', 0);
00455 if (newuser) {
00456 newhost = myStrGetTokenRemainder(av[0], '@', 1);
00457 tofree = 1;
00458 change_user_username(u, newuser);
00459 free(newuser);
00460 } else {
00461 newhost = av[0];
00462 }
00463
00464 if (newhost && *newhost == '@')
00465 newhost++;
00466
00467 u->mode |= UMODE_VH;
00468
00469 if (newhost)
00470 change_user_host(u, newhost);
00471
00472 if (tofree)
00473 free(newhost);
00474
00475 return MOD_CONT;
00476 }
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501 int anope_event_nick(char *source, int ac, char **av)
00502 {
00503 User *user;
00504
00505 if (ac != 2) {
00506 user = do_nick(source, av[0], av[4], av[5], av[7], av[8],
00507 strtoul(av[2], NULL, 10), 0, 0, av[6], NULL);
00508 if (user)
00509 anope_set_umode(user, 1, &av[3]);
00510 } else {
00511 do_nick(source, av[0], NULL, NULL, NULL, NULL,
00512 strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
00513 }
00514 return MOD_CONT;
00515 }
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525 int anope_event_server(char *source, int ac, char **av)
00526 {
00527 if (!stricmp(av[1], "1")) {
00528 uplink = sstrdup(av[0]);
00529 }
00530 do_server(source, av[0], av[1], av[3], NULL);
00531 return MOD_CONT;
00532 }
00533
00534 int anope_event_436(char *source, int ac, char **av)
00535 {
00536 if (ac < 1)
00537 return MOD_CONT;
00538
00539 m_nickcoll(av[0]);
00540 return MOD_CONT;
00541 }
00542
00543
00544 void moduleAddIRCDMsgs(void)
00545 {
00546 Message *m;
00547
00548 updateProtectDetails("PROTECT", "PROTECTME", "protect", "deprotect",
00549 "AUTOPROTECT", "+a", "-a");
00550
00551 m = createMessage("401", anope_event_null);
00552 addCoreMessage(IRCD, m);
00553 m = createMessage("402", anope_event_null);
00554 addCoreMessage(IRCD, m);
00555 m = createMessage("436", anope_event_436);
00556 addCoreMessage(IRCD, m);
00557 m = createMessage("461", anope_event_null);
00558 addCoreMessage(IRCD, m);
00559 m = createMessage("AWAY", anope_event_away);
00560 addCoreMessage(IRCD, m);
00561 m = createMessage("INVITE", anope_event_invite);
00562 addCoreMessage(IRCD, m);
00563 m = createMessage("JOIN", anope_event_join);
00564 addCoreMessage(IRCD, m);
00565 m = createMessage("KICK", anope_event_kick);
00566 addCoreMessage(IRCD, m);
00567 m = createMessage("KILL", anope_event_kill);
00568 addCoreMessage(IRCD, m);
00569 m = createMessage("MODE", anope_event_mode);
00570 addCoreMessage(IRCD, m);
00571 m = createMessage("MOTD", anope_event_motd);
00572 addCoreMessage(IRCD, m);
00573 m = createMessage("NICK", anope_event_nick);
00574 addCoreMessage(IRCD, m);
00575 m = createMessage("NOTICE", anope_event_notice);
00576 addCoreMessage(IRCD, m);
00577 m = createMessage("PART", anope_event_part);
00578 addCoreMessage(IRCD, m);
00579 m = createMessage("PASS", anope_event_pass);
00580 addCoreMessage(IRCD, m);
00581 m = createMessage("PING", anope_event_ping);
00582 addCoreMessage(IRCD, m);
00583 m = createMessage("PRIVMSG", anope_event_privmsg);
00584 addCoreMessage(IRCD, m);
00585 m = createMessage("QUIT", anope_event_quit);
00586 addCoreMessage(IRCD, m);
00587 m = createMessage("SERVER", anope_event_server);
00588 addCoreMessage(IRCD, m);
00589 m = createMessage("SQUIT", anope_event_squit);
00590 addCoreMessage(IRCD, m);
00591 m = createMessage("TOPIC", anope_event_topic);
00592 addCoreMessage(IRCD, m);
00593 m = createMessage("USER", anope_event_null);
00594 addCoreMessage(IRCD, m);
00595 m = createMessage("WALLOPS", anope_event_null);
00596 addCoreMessage(IRCD, m);
00597 m = createMessage("WHOIS", anope_event_whois);
00598 addCoreMessage(IRCD, m);
00599 m = createMessage("AKILL", anope_event_null);
00600 addCoreMessage(IRCD, m);
00601 m = createMessage("GLOBOPS", anope_event_null);
00602 addCoreMessage(IRCD, m);
00603 m = createMessage("GNOTICE", anope_event_null);
00604 addCoreMessage(IRCD, m);
00605 m = createMessage("GOPER", anope_event_null);
00606 addCoreMessage(IRCD, m);
00607 m = createMessage("RAKILL", anope_event_null);
00608 addCoreMessage(IRCD, m);
00609 m = createMessage("SILENCE", anope_event_null);
00610 addCoreMessage(IRCD, m);
00611 m = createMessage("SVSKILL", anope_event_null);
00612 addCoreMessage(IRCD, m);
00613 m = createMessage("SVSMODE", anope_event_null);
00614 addCoreMessage(IRCD, m);
00615 m = createMessage("SVSNICK", anope_event_null);
00616 addCoreMessage(IRCD, m);
00617 m = createMessage("SVSNOOP", anope_event_null);
00618 addCoreMessage(IRCD, m);
00619 m = createMessage("SQLINE", anope_event_null);
00620 addCoreMessage(IRCD, m);
00621 m = createMessage("UNSQLINE", anope_event_null);
00622 addCoreMessage(IRCD, m);
00623 m = createMessage("NEWMASK", anope_event_newmask);
00624 addCoreMessage(IRCD, m);
00625 m = createMessage("CAPAB", anope_event_capab);
00626 addCoreMessage(IRCD, m);
00627 m = createMessage("SVINFO", anope_event_svinfo);
00628 addCoreMessage(IRCD, m);
00629 m = createMessage("SVSINFO", anope_event_svsinfo);
00630 addCoreMessage(IRCD, m);
00631 m = createMessage("SJOIN", anope_event_sjoin);
00632 addCoreMessage(IRCD, m);
00633 m = createMessage("REHASH", anope_event_rehash);
00634 addCoreMessage(IRCD, m);
00635 m = createMessage("ADMIN", anope_event_admin);
00636 addCoreMessage(IRCD, m);
00637 m = createMessage("CREDITS", anope_event_credits);
00638 addCoreMessage(IRCD, m);
00639 m = createMessage("ERROR", anope_event_error);
00640 addCoreMessage(IRCD, m);
00641 m = createMessage("NJOIN", anope_event_sjoin);
00642 addCoreMessage(IRCD, m);
00643 m = createMessage("NNICK", anope_event_nick);
00644 addCoreMessage(IRCD, m);
00645 m = createMessage("ZLINE", anope_event_null);
00646 addCoreMessage(IRCD, m);
00647 m = createMessage("UNZLINE", anope_event_null);
00648 addCoreMessage(IRCD, m);
00649 }
00650
00651 int anope_event_svsinfo(char *source, int ac, char **av)
00652 {
00653 return MOD_CONT;
00654 }
00655
00656 int anope_event_svinfo(char *source, int ac, char **av)
00657 {
00658 return MOD_CONT;
00659 }
00660
00661
00662 int anope_event_capab(char *source, int ac, char **av)
00663 {
00664 capab_parse(ac, av);
00665 return MOD_CONT;
00666 }
00667
00668
00669
00670
00671
00672
00673
00674 void ptlink_cmd_sqline(char *mask, char *reason)
00675 {
00676 send_cmd(ServerName, "SQLINE %s :%s", mask, reason);
00677 }
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687 void ptlink_cmd_svsnoop(char *server, int set)
00688 {
00689 send_cmd(NULL, "SVSADMIN %s :%s", server, set ? "noopers" : "rehash");
00690 }
00691
00692 void ptlink_cmd_svsadmin(char *server, int set)
00693 {
00694 ptlink_cmd_svsnoop(server, set);
00695 }
00696
00697
00698
00699
00700
00701
00702 void ptlink_cmd_remove_akill(char *user, char *host)
00703 {
00704 send_cmd(NULL, "UNGLINE %s@%s", user, host);
00705 }
00706
00707
00708 void anope_part(char *nick, char *chan)
00709 {
00710 send_cmd(nick, "PART %s", chan);
00711 }
00712 void anope_topic(char *whosets, char *chan, char *whosetit, char *topic,
00713 time_t when)
00714 {
00715 send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
00716 (unsigned long int) when, topic);
00717 }
00718
00719
00720
00721
00722
00723
00724 void ptlink_cmd_unsqline(char *user)
00725 {
00726 send_cmd(NULL, "UNSQLINE %s", user);
00727 }
00728
00729 void ptlink_cmd_join(char *user, char *channel, time_t chantime)
00730 {
00731 send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) chantime,
00732 channel, user);
00733 }
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743 void ptlink_cmd_akill(char *user, char *host, char *who, time_t when,
00744 time_t expires, char *reason)
00745 {
00746 send_cmd(ServerName, "GLINE %s@%s %i %s :%s", user, host, 86400 * 2,
00747 who, reason);
00748 }
00749
00750
00751 void ptlink_cmd_svskill(char *source, char *user, char *buf)
00752 {
00753 if (!buf) {
00754 return;
00755 }
00756
00757 if (!source || !user) {
00758 return;
00759 }
00760
00761 send_cmd(source, "KILL %s :%s", user, buf);
00762 }
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772 void ptlink_cmd_svsmode(User * u, int ac, char **av)
00773 {
00774 send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
00775 (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
00776
00777
00778
00779
00780
00781
00782
00783 if ((strchr(av[0], 'r')
00784 && ((u->mode & UMODE_N) || (u->mode & UMODE_R)
00785 || (u->mode & UMODE_a) || (u->mode & UMODE_h))))
00786 u->mode |= UMODE_NM;
00787 }
00788
00789 int anope_event_error(char *source, int ac, char **av)
00790 {
00791 if (ac >= 1) {
00792 if (debug) {
00793 alog("debug: %s", av[0]);
00794 }
00795 }
00796 return MOD_CONT;
00797 }
00798
00799 void ptlink_cmd_squit(char *servname, char *message)
00800 {
00801 send_cmd(NULL, "SQUIT %s :%s", servname, message);
00802 }
00803
00804
00805 void ptlink_cmd_pong(char *servname, char *who)
00806 {
00807 send_cmd(servname, "PONG %s", who);
00808 }
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819 void ptlink_cmd_svinfo()
00820 {
00821 #if defined(PTLINK_TS_CURRENT) && defined(PTLINK_TS_MIN)
00822 send_cmd(NULL, "SVINFO %d %d %lu", PTLINK_TS_CURRENT, PTLINK_TS_MIN,
00823 (unsigned long int) time(NULL));
00824 #else
00825
00826 send_cmd(NULL, "SVINFO 6 3 %lu", (unsigned long int) time(NULL));
00827 #endif
00828 }
00829
00830
00831
00832
00833
00834
00835
00836 void ptlink_cmd_svsinfo()
00837 {
00838 send_cmd(NULL, "SVSINFO %lu %d", (unsigned long int) time(NULL),
00839 maxusercnt);
00840 }
00841
00842
00843
00844
00845
00846
00847
00848 void ptlink_cmd_pass(char *pass)
00849 {
00850 send_cmd(NULL, "PASS %s :TS", pass);
00851 }
00852
00853
00854
00855
00856
00857 void ptlink_cmd_capab()
00858 {
00859 send_cmd(NULL, "CAPAB :QS PTS4");
00860 }
00861
00862
00863 void ptlink_cmd_server(char *servname, int hop, char *descript)
00864 {
00865 send_cmd(NULL, "SERVER %s %d Anope.Services%s :%s", servname, hop,
00866 version_number_dotted, descript);
00867 }
00868 void ptlink_cmd_connect(int servernum)
00869 {
00870 me_server =
00871 new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
00872
00873 if (servernum == 1)
00874 ptlink_cmd_pass(RemotePassword);
00875 else if (servernum == 2)
00876 ptlink_cmd_pass(RemotePassword2);
00877 else if (servernum == 3)
00878 ptlink_cmd_pass(RemotePassword3);
00879
00880 ptlink_cmd_capab();
00881 ptlink_cmd_server(ServerName, 1, ServerDesc);
00882 ptlink_cmd_svinfo();
00883 ptlink_cmd_svsinfo();
00884 }
00885
00886 void ptlink_cmd_bob()
00887 {
00888
00889 }
00890
00891
00892 int anope_event_privmsg(char *source, int ac, char **av)
00893 {
00894 if (ac != 2)
00895 return MOD_CONT;
00896 m_privmsg(source, av[0], av[1]);
00897 return MOD_CONT;
00898 }
00899
00900 int anope_event_part(char *source, int ac, char **av)
00901 {
00902 if (ac < 1 || ac > 2)
00903 return MOD_CONT;
00904 do_part(source, ac, av);
00905 return MOD_CONT;
00906 }
00907
00908 int anope_event_whois(char *source, int ac, char **av)
00909 {
00910 if (source && ac >= 1) {
00911 m_whois(source, av[0]);
00912 }
00913 return MOD_CONT;
00914 }
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924 int anope_event_topic(char *source, int ac, char **av)
00925 {
00926 if (ac != 4)
00927 return MOD_CONT;
00928 do_topic(source, ac, av);
00929 return MOD_CONT;
00930 }
00931
00932 int anope_event_squit(char *source, int ac, char **av)
00933 {
00934 if (ac != 2)
00935 return MOD_CONT;
00936 do_squit(source, ac, av);
00937 return MOD_CONT;
00938 }
00939
00940 int anope_event_quit(char *source, int ac, char **av)
00941 {
00942 if (ac != 1)
00943 return MOD_CONT;
00944 do_quit(source, ac, av);
00945 return MOD_CONT;
00946 }
00947
00948
00949
00950
00951
00952
00953
00954 int anope_event_mode(char *source, int ac, char **av)
00955 {
00956 if (ac < 2)
00957 return MOD_CONT;
00958
00959 if (*av[0] == '#' || *av[0] == '&') {
00960 do_cmode(source, ac, av);
00961 } else {
00962 do_umode(source, ac, av);
00963 }
00964 return MOD_CONT;
00965 }
00966
00967
00968 int anope_event_kill(char *source, int ac, char **av)
00969 {
00970 if (ac != 2)
00971 return MOD_CONT;
00972
00973 m_kill(av[0], av[1]);
00974 return MOD_CONT;
00975 }
00976
00977 int anope_event_kick(char *source, int ac, char **av)
00978 {
00979 if (ac != 3)
00980 return MOD_CONT;
00981 do_kick(source, ac, av);
00982 return MOD_CONT;
00983 }
00984
00985
00986 int anope_event_join(char *source, int ac, char **av)
00987 {
00988 if (ac != 1)
00989 return MOD_CONT;
00990 do_join(source, ac, av);
00991 return MOD_CONT;
00992 }
00993
00994 int anope_event_motd(char *source, int ac, char **av)
00995 {
00996 if (!source) {
00997 return MOD_CONT;
00998 }
00999
01000 m_motd(source);
01001 return MOD_CONT;
01002 }
01003
01004 void ptlink_cmd_notice_ops(char *source, char *dest, char *buf)
01005 {
01006 if (!buf) {
01007 return;
01008 }
01009
01010 send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
01011 }
01012
01013
01014 void ptlink_cmd_notice(char *source, char *dest, char *buf)
01015 {
01016 if (!buf) {
01017 return;
01018 }
01019
01020 if (NSDefFlags & NI_MSG) {
01021 ptlink_cmd_privmsg2(source, dest, buf);
01022 } else {
01023 send_cmd(source, "NOTICE %s :%s", dest, buf);
01024 }
01025 }
01026
01027 void ptlink_cmd_notice2(char *source, char *dest, char *msg)
01028 {
01029 send_cmd(source, "NOTICE %s :%s", dest, msg);
01030 }
01031
01032 void ptlink_cmd_privmsg(char *source, char *dest, char *buf)
01033 {
01034 if (!buf) {
01035 return;
01036 }
01037
01038 send_cmd(source, "PRIVMSG %s :%s", dest, buf);
01039 }
01040
01041 void ptlink_cmd_privmsg2(char *source, char *dest, char *msg)
01042 {
01043 send_cmd(source, "PRIVMSG %s :%s", dest, msg);
01044 }
01045
01046 void ptlink_cmd_serv_notice(char *source, char *dest, char *msg)
01047 {
01048 send_cmd(source, "NOTICE $%s :%s", dest, msg);
01049 }
01050
01051 void ptlink_cmd_serv_privmsg(char *source, char *dest, char *msg)
01052 {
01053 send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
01054 }
01055
01056
01057 void ptlink_cmd_global(char *source, char *buf)
01058 {
01059 if (!buf) {
01060 return;
01061 }
01062
01063 send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
01064 }
01065
01066
01067 void ptlink_cmd_391(char *source, char *timestr)
01068 {
01069 if (!timestr) {
01070 return;
01071 }
01072 send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
01073 }
01074
01075
01076 void ptlink_cmd_250(char *buf)
01077 {
01078 if (!buf) {
01079 return;
01080 }
01081
01082 send_cmd(NULL, "250 %s", buf);
01083 }
01084
01085
01086 void ptlink_cmd_307(char *buf)
01087 {
01088 if (!buf) {
01089 return;
01090 }
01091
01092 send_cmd(ServerName, "307 %s", buf);
01093 }
01094
01095
01096 void ptlink_cmd_311(char *buf)
01097 {
01098 if (!buf) {
01099 return;
01100 }
01101
01102 send_cmd(ServerName, "311 %s", buf);
01103 }
01104
01105
01106 void ptlink_cmd_312(char *buf)
01107 {
01108 if (!buf) {
01109 return;
01110 }
01111
01112 send_cmd(ServerName, "312 %s", buf);
01113 }
01114
01115
01116 void ptlink_cmd_317(char *buf)
01117 {
01118 if (!buf) {
01119 return;
01120 }
01121
01122 send_cmd(ServerName, "317 %s", buf);
01123 }
01124
01125
01126 void ptlink_cmd_219(char *source, char *letter)
01127 {
01128 if (!source) {
01129 return;
01130 }
01131
01132 if (letter) {
01133 send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
01134 *letter);
01135 } else {
01136 send_cmd(NULL, "219 %s l :End of /STATS report.", source);
01137 }
01138 }
01139
01140
01141 void ptlink_cmd_401(char *source, char *who)
01142 {
01143 if (!source || !who) {
01144 return;
01145 }
01146 send_cmd(ServerName, "401 %s %s :No such service.", source, who);
01147 }
01148
01149
01150 void ptlink_cmd_318(char *source, char *who)
01151 {
01152 if (!source || !who) {
01153 return;
01154 }
01155
01156 send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
01157 }
01158
01159
01160 void ptlink_cmd_242(char *buf)
01161 {
01162 if (!buf) {
01163 return;
01164 }
01165
01166 send_cmd(NULL, "242 %s", buf);
01167 }
01168
01169
01170 void ptlink_cmd_243(char *buf)
01171 {
01172 if (!buf) {
01173 return;
01174 }
01175
01176 send_cmd(NULL, "243 %s", buf);
01177 }
01178
01179
01180 void ptlink_cmd_211(char *buf)
01181 {
01182 if (!buf) {
01183 return;
01184 }
01185
01186 send_cmd(NULL, "211 %s", buf);
01187 }
01188
01189 void ptlink_cmd_mode(char *source, char *dest, char *buf)
01190 {
01191 if (!buf) {
01192 return;
01193 }
01194
01195 send_cmd(source, "MODE %s %s", dest, buf);
01196 }
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210 void ptlink_cmd_nick(char *nick, char *name, char *mode)
01211 {
01212 EnforceQlinedNick(nick, NULL);
01213 send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
01214 (unsigned long int) time(NULL), mode, ServiceUser,
01215 ServiceHost, ServiceHost, ServerName, name);
01216 ptlink_cmd_sqline(nick, "Reserved for services");
01217 }
01218
01219 void ptlink_cmd_kick(char *source, char *chan, char *user, char *buf)
01220 {
01221 if (!buf) {
01222 return;
01223 }
01224
01225 if (buf) {
01226 send_cmd(source, "KICK %s %s :%s", chan, user, buf);
01227 } else {
01228 send_cmd(source, "KICK %s %s", chan, user);
01229 }
01230 }
01231
01232
01233 void ptlink_cmd_quit(char *source, char *buf)
01234 {
01235 if (buf) {
01236 send_cmd(source, "QUIT :%s", buf);
01237 } else {
01238 send_cmd(source, "QUIT");
01239 }
01240 }
01241
01242 void ptlink_cmd_part(char *nick, char *chan, char *buf)
01243 {
01244 if (buf) {
01245 send_cmd(nick, "PART %s :%s", chan, buf);
01246 } else {
01247 send_cmd(nick, "PART %s", chan);
01248 }
01249 }
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259 void ptlink_cmd_topic(char *whosets, char *chan, char *whosetit,
01260 char *topic, time_t when)
01261 {
01262 send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
01263 (long int) time(NULL), topic);
01264 }
01265
01266 void ptlink_cmd_vhost_off(User * u)
01267 {
01268
01269 }
01270
01271 void ptlink_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
01272 {
01273 User *u;
01274
01275 if (vIdent) {
01276 send_cmd(s_HostServ, "NEWMASK %s@%s %s", vIdent, vhost, nick);
01277 } else {
01278 send_cmd(s_HostServ, "NEWMASK %s %s", vhost, nick);
01279 }
01280
01281 if ((u = finduser(nick)))
01282 u->mode |= UMODE_VH;
01283 }
01284
01285
01286 void ptlink_cmd_invite(char *source, char *chan, char *nick)
01287 {
01288 if (!source || !chan || !nick) {
01289 return;
01290 }
01291
01292 send_cmd(source, "INVITE %s %s", nick, chan);
01293 }
01294
01295 void ptlink_cmd_372(char *source, char *msg)
01296 {
01297 send_cmd(ServerName, "372 %s :- %s", source, msg);
01298 }
01299
01300 void ptlink_cmd_372_error(char *source)
01301 {
01302 send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
01303 "contact your IRC administrator.", source);
01304 }
01305
01306 void ptlink_cmd_375(char *source)
01307 {
01308 send_cmd(ServerName, "375 %s :- %s Message of the Day",
01309 source, ServerName);
01310 }
01311
01312 void ptlink_cmd_376(char *source)
01313 {
01314 send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
01315 }
01316
01317
01318 void ptlink_set_umode(User * user, int ac, char **av)
01319 {
01320 int add = 1;
01321 char *modes = av[0];
01322
01323 ac--;
01324
01325 if (debug)
01326 alog("debug: Changing mode for %s to %s", user->nick, modes);
01327
01328 while (*modes) {
01329
01330
01331
01332
01333 if (add)
01334 user->mode |= umodes[(int) *modes];
01335 else
01336 user->mode &= ~umodes[(int) *modes];
01337
01338 switch (*modes++) {
01339 case '+':
01340 add = 1;
01341 break;
01342 case '-':
01343 add = 0;
01344 break;
01345 case 'o':
01346 if (add) {
01347 opcnt++;
01348
01349 if (WallOper)
01350 anope_cmd_global(s_OperServ,
01351 "\2%s\2 is now an IRC operator.",
01352 user->nick);
01353 display_news(user, NEWS_OPER);
01354 if (is_services_admin(user)) {
01355 common_svsmode(user, "+a", NULL);
01356 user->mode |= UMODE_a;
01357 }
01358
01359 } else {
01360 opcnt--;
01361 }
01362 break;
01363 case 'r':
01364 if (add && !nick_identified(user)) {
01365 common_svsmode(user, "-r", NULL);
01366 user->mode &= ~UMODE_r;
01367 }
01368 break;
01369 }
01370 }
01371 }
01372
01373 int anope_event_ping(char *source, int ac, char **av)
01374 {
01375 if (ac < 1)
01376 return MOD_CONT;
01377 ptlink_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]);
01378 return MOD_CONT;
01379 }
01380
01381 int anope_event_away(char *source, int ac, char **av)
01382 {
01383 if (!source) {
01384 return MOD_CONT;
01385 }
01386 m_away(source, (ac ? av[0] : NULL));
01387 return MOD_CONT;
01388 }
01389
01390 void ptlink_cmd_bot_nick(char *nick, char *user, char *host, char *real,
01391 char *modes)
01392 {
01393 EnforceQlinedNick(nick, s_BotServ);
01394 send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
01395 (unsigned long int) time(NULL), modes, user, host, host,
01396 ServerName, real);
01397 ptlink_cmd_sqline(nick, "Reserved for services");
01398
01399 }
01400
01401 void ptlink_cmd_351(char *source)
01402 {
01403 send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
01404 source, version_number, ServerName, ircd->name, version_flags,
01405 EncModule, version_build);
01406
01407
01408 }
01409
01410
01411 void ptlink_cmd_svshold(char *nick)
01412 {
01413
01414 }
01415
01416
01417 void ptlink_cmd_release_svshold(char *nick)
01418 {
01419
01420 }
01421
01422
01423
01424
01425
01426
01427 void ptlink_cmd_unszline(char *mask)
01428 {
01429 send_cmd(s_OperServ, "UNZLINE %s", mask);
01430 }
01431
01432
01433
01434
01435
01436
01437
01438
01439 void ptlink_cmd_szline(char *mask, char *reason, char *whom)
01440 {
01441 send_cmd(s_OperServ, "ZLINE %s %ld :%s", mask,
01442 (long int) time(NULL) + 86400 * 2, reason);
01443 }
01444
01445
01446
01447
01448
01449
01450 void ptlink_cmd_unsgline(char *mask)
01451 {
01452 send_cmd(ServerName, "UNSXLINE :%s", mask);
01453 }
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463 void ptlink_cmd_sgline(char *mask, char *reason)
01464 {
01465 send_cmd(ServerName, "SXLINE %d :%s:%s", (int) strlen(mask), mask,
01466 reason);
01467 }
01468
01469
01470
01471
01472
01473
01474
01475
01476
01477 void ptlink_cmd_svsnick(char *source, char *guest, time_t when)
01478 {
01479 if (!source || !guest) {
01480 return;
01481 }
01482 send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
01483 }
01484
01485 void ptlink_cmd_guest_nick(char *nick, char *user, char *host, char *real,
01486 char *modes)
01487 {
01488 send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
01489 (unsigned long int) time(NULL), modes, user, host, host,
01490 ServerName, real);
01491 }
01492
01493
01494 void ptlink_cmd_unban(char *name, char *nick)
01495 {
01496
01497 }
01498
01499
01500
01501 void ptlink_cmd_svsmode_chan(char *name, char *mode, char *nick)
01502 {
01503
01504 }
01505
01506 void ptlink_cmd_svso(char *source, char *nick, char *flag)
01507 {
01508
01509 }
01510
01511
01512
01513
01514 void ptlink_cmd_svid_umode(char *nick, time_t ts)
01515 {
01516
01517 }
01518
01519
01520
01521 void ptlink_cmd_nc_change(User * u)
01522 {
01523
01524 }
01525
01526
01527
01528 void ptlink_cmd_svid_umode2(User * u, char *ts)
01529 {
01530 common_svsmode(u, "+r", NULL);
01531 }
01532
01533 void ptlink_cmd_svid_umode3(User * u, char *ts)
01534 {
01535
01536 }
01537
01538
01539
01540
01541
01542
01543
01544
01545 void ptlink_cmd_chg_nick(char *oldnick, char *newnick)
01546 {
01547 if (!oldnick || !newnick) {
01548 return;
01549 }
01550
01551 send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(NULL));
01552 }
01553
01554
01555
01556
01557
01558
01559
01560
01561 void ptlink_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
01562 {
01563 send_cmd(source, "SVSJOIN %s %s", nick, chan);
01564 }
01565
01566
01567
01568
01569
01570
01571
01572
01573 void ptlink_cmd_svspart(char *source, char *nick, char *chan)
01574 {
01575 send_cmd(source, "SVSPART %s :%s", nick, chan);
01576 }
01577
01578 void ptlink_cmd_swhois(char *source, char *who, char *mask)
01579 {
01580
01581 }
01582
01583 int anope_event_notice(char *source, int ac, char **av)
01584 {
01585 return MOD_CONT;
01586 }
01587
01588 int anope_event_pass(char *source, int ac, char **av)
01589 {
01590 return MOD_CONT;
01591 }
01592
01593 int anope_event_rehash(char *source, int ac, char **av)
01594 {
01595 return MOD_CONT;
01596 }
01597
01598 int anope_event_credits(char *source, int ac, char **av)
01599 {
01600 return MOD_CONT;
01601 }
01602
01603 int anope_event_admin(char *source, int ac, char **av)
01604 {
01605 return MOD_CONT;
01606 }
01607
01608 int anope_event_invite(char *source, int ac, char **av)
01609 {
01610 return MOD_CONT;
01611 }
01612
01613 int ptlink_flood_mode_check(char *value)
01614 {
01615 char *dp, *end;
01616
01617 if (value && *value != ':'
01618 && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
01619 && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
01620 && (*end == 0)) {
01621 return 1;
01622 } else {
01623 return 0;
01624 }
01625 }
01626
01627 void ptlink_cmd_eob()
01628 {
01629
01630 }
01631
01632 void ptlink_cmd_jupe(char *jserver, char *who, char *reason)
01633 {
01634 char rbuf[256];
01635
01636 snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
01637 reason ? ": " : "", reason ? reason : "");
01638
01639 if (findserver(servlist, jserver))
01640 ptlink_cmd_squit(jserver, rbuf);
01641 ptlink_cmd_server(jserver, 1, rbuf);
01642 new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
01643 }
01644
01645
01646 void ptlink_cmd_global_legacy(char *source, char *fmt)
01647 {
01648 send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
01649 }
01650
01651
01652
01653
01654
01655 int ptlink_valid_nick(char *nick)
01656 {
01657
01658 return 1;
01659 }
01660
01661
01662
01663
01664
01665 int ptlink_valid_chan(char *cahn)
01666 {
01667
01668 return 1;
01669 }
01670
01671
01672 void ptlink_cmd_ctcp(char *source, char *dest, char *buf)
01673 {
01674 char *s;
01675
01676 if (!buf) {
01677 return;
01678 } else {
01679 s = normalizeBuffer(buf);
01680 }
01681
01682 send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
01683 free(s);
01684 }
01685
01686
01691 void moduleAddAnopeCmds()
01692 {
01693 pmodule_cmd_svsnoop(ptlink_cmd_svsnoop);
01694 pmodule_cmd_remove_akill(ptlink_cmd_remove_akill);
01695 pmodule_cmd_topic(ptlink_cmd_topic);
01696 pmodule_cmd_vhost_off(ptlink_cmd_vhost_off);
01697 pmodule_cmd_akill(ptlink_cmd_akill);
01698 pmodule_cmd_svskill(ptlink_cmd_svskill);
01699 pmodule_cmd_svsmode(ptlink_cmd_svsmode);
01700 pmodule_cmd_372(ptlink_cmd_372);
01701 pmodule_cmd_372_error(ptlink_cmd_372_error);
01702 pmodule_cmd_375(ptlink_cmd_375);
01703 pmodule_cmd_376(ptlink_cmd_376);
01704 pmodule_cmd_nick(ptlink_cmd_nick);
01705 pmodule_cmd_guest_nick(ptlink_cmd_guest_nick);
01706 pmodule_cmd_mode(ptlink_cmd_mode);
01707 pmodule_cmd_bot_nick(ptlink_cmd_bot_nick);
01708 pmodule_cmd_kick(ptlink_cmd_kick);
01709 pmodule_cmd_notice_ops(ptlink_cmd_notice_ops);
01710 pmodule_cmd_notice(ptlink_cmd_notice);
01711 pmodule_cmd_notice2(ptlink_cmd_notice2);
01712 pmodule_cmd_privmsg(ptlink_cmd_privmsg);
01713 pmodule_cmd_privmsg2(ptlink_cmd_privmsg2);
01714 pmodule_cmd_serv_notice(ptlink_cmd_serv_notice);
01715 pmodule_cmd_serv_privmsg(ptlink_cmd_serv_privmsg);
01716 pmodule_cmd_bot_chan_mode(ptlink_cmd_bot_chan_mode);
01717 pmodule_cmd_351(ptlink_cmd_351);
01718 pmodule_cmd_quit(ptlink_cmd_quit);
01719 pmodule_cmd_pong(ptlink_cmd_pong);
01720 pmodule_cmd_join(ptlink_cmd_join);
01721 pmodule_cmd_unsqline(ptlink_cmd_unsqline);
01722 pmodule_cmd_invite(ptlink_cmd_invite);
01723 pmodule_cmd_part(ptlink_cmd_part);
01724 pmodule_cmd_391(ptlink_cmd_391);
01725 pmodule_cmd_250(ptlink_cmd_250);
01726 pmodule_cmd_307(ptlink_cmd_307);
01727 pmodule_cmd_311(ptlink_cmd_311);
01728 pmodule_cmd_312(ptlink_cmd_312);
01729 pmodule_cmd_317(ptlink_cmd_317);
01730 pmodule_cmd_219(ptlink_cmd_219);
01731 pmodule_cmd_401(ptlink_cmd_401);
01732 pmodule_cmd_318(ptlink_cmd_318);
01733 pmodule_cmd_242(ptlink_cmd_242);
01734 pmodule_cmd_243(ptlink_cmd_243);
01735 pmodule_cmd_211(ptlink_cmd_211);
01736 pmodule_cmd_global(ptlink_cmd_global);
01737 pmodule_cmd_global_legacy(ptlink_cmd_global_legacy);
01738 pmodule_cmd_sqline(ptlink_cmd_sqline);
01739 pmodule_cmd_squit(ptlink_cmd_squit);
01740 pmodule_cmd_svso(ptlink_cmd_svso);
01741 pmodule_cmd_chg_nick(ptlink_cmd_chg_nick);
01742 pmodule_cmd_svsnick(ptlink_cmd_svsnick);
01743 pmodule_cmd_vhost_on(ptlink_cmd_vhost_on);
01744 pmodule_cmd_connect(ptlink_cmd_connect);
01745 pmodule_cmd_bob(ptlink_cmd_bob);
01746 pmodule_cmd_svshold(ptlink_cmd_svshold);
01747 pmodule_cmd_release_svshold(ptlink_cmd_release_svshold);
01748 pmodule_cmd_unsgline(ptlink_cmd_unsgline);
01749 pmodule_cmd_unszline(ptlink_cmd_unszline);
01750 pmodule_cmd_szline(ptlink_cmd_szline);
01751 pmodule_cmd_sgline(ptlink_cmd_sgline);
01752 pmodule_cmd_unban(ptlink_cmd_unban);
01753 pmodule_cmd_svsmode_chan(ptlink_cmd_svsmode_chan);
01754 pmodule_cmd_svid_umode(ptlink_cmd_svid_umode);
01755 pmodule_cmd_nc_change(ptlink_cmd_nc_change);
01756 pmodule_cmd_svid_umode2(ptlink_cmd_svid_umode2);
01757 pmodule_cmd_svid_umode3(ptlink_cmd_svid_umode3);
01758 pmodule_cmd_svsjoin(ptlink_cmd_svsjoin);
01759 pmodule_cmd_svspart(ptlink_cmd_svspart);
01760 pmodule_cmd_swhois(ptlink_cmd_swhois);
01761 pmodule_cmd_eob(ptlink_cmd_eob);
01762 pmodule_flood_mode_check(ptlink_flood_mode_check);
01763 pmodule_cmd_jupe(ptlink_cmd_jupe);
01764 pmodule_valid_nick(ptlink_valid_nick);
01765 pmodule_valid_chan(ptlink_valid_chan);
01766 pmodule_cmd_ctcp(ptlink_cmd_ctcp);
01767 pmodule_set_umode(ptlink_set_umode);
01768 }
01769
01773 int AnopeInit(int argc, char **argv)
01774 {
01775
01776 moduleAddAuthor("Anope");
01777 moduleAddVersion
01778 (VERSION_STRING);
01779 moduleSetType(PROTOCOL);
01780
01781
01782 pmodule_ircd_version("PTlink 6.15.*+");
01783 pmodule_ircd_cap(myIrcdcap);
01784 pmodule_ircd_var(myIrcd);
01785 pmodule_ircd_cbmodeinfos(myCbmodeinfos);
01786 pmodule_ircd_cumodes(myCumodes);
01787 pmodule_ircd_flood_mode_char_set("+f");
01788 pmodule_ircd_flood_mode_char_remove("-f");
01789 pmodule_ircd_cbmodes(myCbmodes);
01790 pmodule_ircd_cmmodes(myCmmodes);
01791 pmodule_ircd_csmodes(myCsmodes);
01792 pmodule_ircd_useTSMode(0);
01793
01795 pmodule_invis_umode(UMODE_i);
01796 pmodule_oper_umode(UMODE_o);
01797 pmodule_invite_cmode(CMODE_i);
01798 pmodule_secret_cmode(CMODE_s);
01799 pmodule_private_cmode(CMODE_p);
01800 pmodule_key_mode(CMODE_k);
01801 pmodule_limit_mode(CMODE_l);
01802 pmodule_permchan_mode(0);
01803
01804 moduleAddAnopeCmds();
01805 moduleAddIRCDMsgs();
01806
01807 return MOD_CONT;
01808 }
01809
01810