1 /* 2 * tandem.h 3 */ 4 /* 5 * Copyright (C) 1997 Robey Pointer 6 * Copyright (C) 1999 - 2021 Eggheads Development Team 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef _EGG_TANDEM_H 24 #define _EGG_TANDEM_H 25 26 /* Keep track of tandem-bots in the chain */ 27 typedef struct tand_t_struct { 28 char bot[HANDLEN + 1]; 29 struct tand_t_struct *via; 30 struct tand_t_struct *uplink; 31 struct tand_t_struct *next; 32 int ver; 33 char share; 34 } tand_t; 35 36 /* Keep track of party-line members */ 37 typedef struct { 38 char nick[HANDLEN + 1]; 39 char bot[HANDLEN + 1]; 40 int sock; 41 int chan; 42 char *from; 43 char flag; 44 char status; 45 time_t timer; /* Track idle time */ 46 char *away; 47 } party_t; 48 49 /* Status: */ 50 #define PLSTAT_AWAY 0x001 51 #define IS_PARTY 0x002 52 53 /* Minimum version that uses tokens & base64 ints 54 * for channel msg's 55 */ 56 #define NEAT_BOTNET 1029900 57 #define GLOBAL_CHANS 100000 58 59 60 #ifndef MAKING_MODS 61 62 void send_tand_but(int, char *, int); 63 void botnet_send_chan(int, char *, char *, int, char *); 64 void botnet_send_chat(int, char *, char *); 65 void botnet_send_act(int, char *, char *, int, char *); 66 void botnet_send_ping(int); 67 void botnet_send_pong(int); 68 void botnet_send_priv EGG_VARARGS(int, arg1); 69 void botnet_send_who(int, char *, char *, int); 70 void botnet_send_infoq(int, char *); 71 void botnet_send_unlinked(int, char *, char *); 72 void botnet_send_traced(int, char *, char *); 73 void botnet_send_trace(int, char *, char *, char *); 74 void botnet_send_unlink(int, char *, char *, char *, char *); 75 void botnet_send_link(int, char *, char *, char *); 76 void botnet_send_update(int, tand_t *); 77 void botnet_send_nlinked(int, char *, char *, char, int); 78 void botnet_send_reject(int, char *, char *, char *, char *, char *); 79 void botnet_send_zapf(int, char *, char *, char *); 80 void botnet_send_zapf_broad(int, char *, char *, char *); 81 void botnet_send_motd(int, char *, char *); 82 void botnet_send_filereq(int, char *, char *, char *); 83 void botnet_send_filereject(int, char *, char *, char *); 84 void botnet_send_filesend(int, char *, char *, char *); 85 void botnet_send_away(int, char *, int, char *, int); 86 void botnet_send_idle(int, char *, int, int, char *); 87 void botnet_send_join_idx(int, int); 88 void botnet_send_join_party(int, int, int, int); 89 void botnet_send_part_idx(int, char *); 90 void botnet_send_part_party(int, int, char *, int); 91 void botnet_send_bye(); 92 void botnet_send_nkch_part(int, int, char *); 93 void botnet_send_nkch(int, char *); 94 int bots_in_subtree(tand_t *); 95 int users_in_subtree(tand_t *); 96 97 #endif /* MAKING_MODS */ 98 99 100 #define b_status(a) (dcc[a].status) 101 #define b_version(a) (dcc[a].u.bot->version) 102 #define b_linker(a) (dcc[a].u.bot->linker) 103 #define b_numver(a) (dcc[a].u.bot->numver) 104 105 #endif /* _EGG_TANDEM_H */ 106