2003-06-30 15:18:24 +00:00
|
|
|
/* NeoStats - IRC Statistical Services
|
2004-01-14 11:36:37 +00:00
|
|
|
** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond
|
2003-06-30 15:18:24 +00:00
|
|
|
** http://www.neostats.net/
|
|
|
|
**
|
|
|
|
** Portions Copyright (c) 2000-2001 ^Enigma^
|
|
|
|
**
|
|
|
|
** This program is free software; you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation; either version 2 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** This program is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with this program; if not, write to the Free Software
|
|
|
|
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
** USA
|
|
|
|
**
|
|
|
|
** NeoStats CVS Identification
|
2003-09-22 15:04:15 +00:00
|
|
|
** $Id$
|
2003-06-30 15:18:24 +00:00
|
|
|
*/
|
2003-07-22 15:01:49 +00:00
|
|
|
#ifndef BAHAMUT_H
|
|
|
|
#define BAHAMUT_H
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2004-02-06 02:10:50 +00:00
|
|
|
/* we don't support server names as base 64 numerics */
|
|
|
|
#undef BASE64SERVERNAME
|
|
|
|
/* we don't support nick names as base 64 numerics */
|
|
|
|
#undef BASE64NICKNAME
|
|
|
|
|
2003-12-04 21:10:10 +00:00
|
|
|
/* Feature support for use by modules to determine whether
|
|
|
|
* certain functionality is available
|
|
|
|
*/
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2003-12-04 21:10:10 +00:00
|
|
|
/* we don't support tokens */
|
|
|
|
#undef GOTTOKENSUPPORT
|
2004-02-09 20:32:31 +00:00
|
|
|
/* we have sjoin */
|
|
|
|
#define GOTSJOIN
|
2003-12-16 21:46:22 +00:00
|
|
|
/* we don't support CLIENT */
|
|
|
|
#undef GOTCLIENTSUPPORT
|
2004-02-03 21:11:34 +00:00
|
|
|
/* we don't support svstime */
|
|
|
|
#undef GOTSVSTIME
|
2003-12-04 21:10:10 +00:00
|
|
|
/* we don't have svshost support */
|
2003-11-18 11:51:09 +00:00
|
|
|
#undef GOTSVSHOST
|
|
|
|
/* we don't have svsjoin support */
|
|
|
|
#undef GOTSVSJOIN
|
2003-12-15 23:47:21 +00:00
|
|
|
/* we don't have svsmode */
|
|
|
|
#undef GOTSVSMODE
|
|
|
|
/* we don't have svspart */
|
|
|
|
#undef GOTSVSPART
|
2003-12-16 00:28:44 +00:00
|
|
|
/* we have svsnick */
|
|
|
|
#define GOTSVSNICK
|
2003-12-15 23:47:21 +00:00
|
|
|
/* we don't have smo */
|
|
|
|
#undef GOTSMO
|
|
|
|
/* we don't have swhois */
|
|
|
|
#undef GOTSWHOIS
|
2003-12-04 21:10:10 +00:00
|
|
|
/* we don't have bot mode support */
|
|
|
|
#undef GOTBOTMODE
|
2003-12-15 00:05:05 +00:00
|
|
|
/* we don't have user smode support */
|
|
|
|
#undef GOTUSERSMODES
|
|
|
|
/* we have svskill support */
|
|
|
|
#define GOTSVSKILL
|
2003-12-17 18:13:29 +00:00
|
|
|
/* we don't have automatic host cloaking support via Umode */
|
|
|
|
#undef GOTUMODECLOAKING
|
2004-02-21 05:09:54 +00:00
|
|
|
/* we have nickip */
|
|
|
|
#define GOTNICKIP
|
|
|
|
|
2003-11-18 11:51:09 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* buffer sizes */
|
2004-01-12 20:38:37 +00:00
|
|
|
#define MAXHOST (128 + 1)
|
|
|
|
#define MAXPASS (63 + 1)
|
|
|
|
#define MAXNICK (30 + 1)
|
|
|
|
#define MAXUSER (10 + 1)
|
|
|
|
#define MAXREALNAME (50 + 1)
|
|
|
|
#define CHANLEN (32 + 1)
|
|
|
|
#define TOPICLEN (307 + 1)
|
2003-12-16 22:20:43 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Messages/Tokens */
|
2004-01-05 22:16:55 +00:00
|
|
|
#define MSG_PRIVATE "PRIVMSG" /* PRIV */
|
|
|
|
#define MSG_WHO "WHO" /* WHO -> WHOC */
|
|
|
|
#define MSG_WHOIS "WHOIS" /* WHOI */
|
|
|
|
#define MSG_WHOWAS "WHOWAS" /* WHOW */
|
|
|
|
#define MSG_USER "USER" /* USER */
|
|
|
|
#define MSG_NICK "NICK" /* NICK */
|
|
|
|
#define MSG_SERVER "SERVER" /* SERV */
|
|
|
|
#define MSG_LIST "LIST" /* LIST */
|
|
|
|
#define MSG_TOPIC "TOPIC" /* TOPI */
|
|
|
|
#define MSG_INVITE "INVITE" /* INVI */
|
|
|
|
#define MSG_VERSION "VERSION" /* VERS */
|
|
|
|
#define MSG_QUIT "QUIT" /* QUIT */
|
|
|
|
#define MSG_SQUIT "SQUIT" /* SQUI */
|
|
|
|
#define MSG_KILL "KILL" /* KILL */
|
|
|
|
#define MSG_INFO "INFO" /* INFO */
|
|
|
|
#define MSG_LINKS "LINKS" /* LINK */
|
|
|
|
#define MSG_STATS "STATS" /* STAT */
|
|
|
|
#define MSG_USERS "USERS" /* USER -> USRS */
|
|
|
|
#define MSG_HELP "HELP" /* HELP */
|
|
|
|
#define MSG_ERROR "ERROR" /* ERRO */
|
|
|
|
#define MSG_AWAY "AWAY" /* AWAY */
|
|
|
|
#define MSG_CONNECT "CONNECT" /* CONN */
|
|
|
|
#define MSG_PING "PING" /* PING */
|
|
|
|
#define MSG_PONG "PONG" /* PONG */
|
|
|
|
#define MSG_OPER "OPER" /* OPER */
|
|
|
|
#define MSG_PASS "PASS" /* PASS */
|
|
|
|
#define MSG_WALLOPS "WALLOPS" /* WALL */
|
|
|
|
#define MSG_TIME "TIME" /* TIME */
|
|
|
|
#define MSG_NAMES "NAMES" /* NAME */
|
|
|
|
#define MSG_ADMIN "ADMIN" /* ADMI */
|
|
|
|
#define MSG_TRACE "TRACE" /* TRAC */
|
|
|
|
#define MSG_NOTICE "NOTICE" /* NOTI */
|
|
|
|
#define MSG_JOIN "JOIN" /* JOIN */
|
|
|
|
#define MSG_PART "PART" /* PART */
|
|
|
|
#define MSG_LUSERS "LUSERS" /* LUSE */
|
|
|
|
#define MSG_MOTD "MOTD" /* MOTD */
|
|
|
|
#define MSG_MODE "MODE" /* MODE */
|
|
|
|
#define MSG_KICK "KICK" /* KICK */
|
|
|
|
#define MSG_USERHOST "USERHOST" /* USER -> USRH */
|
|
|
|
#define MSG_ISON "ISON" /* ISON */
|
|
|
|
#define MSG_REHASH "REHASH" /* REHA */
|
|
|
|
#define MSG_RESTART "RESTART" /* REST */
|
|
|
|
#define MSG_CLOSE "CLOSE" /* CLOS */
|
|
|
|
#define MSG_SVINFO "SVINFO" /* SVINFO */
|
|
|
|
#define MSG_SJOIN "SJOIN" /* SJOIN */
|
|
|
|
#define MSG_DIE "DIE" /* DIE */
|
|
|
|
#define MSG_HASH "HASH" /* HASH */
|
|
|
|
#define MSG_DNS "DNS" /* DNS -> DNSS */
|
|
|
|
#define MSG_OPERWALL "OPERWALL" /* OPERWALL */
|
|
|
|
#define MSG_GLOBOPS "GLOBOPS" /* GLOBOPS */
|
|
|
|
#define MSG_CHATOPS "CHATOPS" /* CHATOPS */
|
|
|
|
#define MSG_GOPER "GOPER" /* GOPER */
|
|
|
|
#define MSG_GNOTICE "GNOTICE" /* GNOTICE */
|
|
|
|
#define MSG_KLINE "KLINE" /* KLINE */
|
|
|
|
#define MSG_UNKLINE "UNKLINE" /* UNKLINE */
|
|
|
|
#define MSG_HTM "HTM" /* HTM */
|
|
|
|
#define MSG_SET "SET" /* SET */
|
|
|
|
#define MSG_SAMODE "SAMODE" /* SAMODE */
|
|
|
|
#define MSG_CHANSERV "CHANSERV" /* CHANSERV */
|
|
|
|
#define MSG_NICKSERV "NICKSERV" /* NICKSERV */
|
|
|
|
#define MSG_MEMOSERV "MEMOSERV" /* MEMOSERV */
|
|
|
|
#define MSG_ROOTSERV "ROOTSERV" /* MEMOSERV */
|
|
|
|
#define MSG_OPERSERV "OPERSERV" /* OPERSERV */
|
|
|
|
#define MSG_STATSERV "STATSERV" /* STATSERV */
|
|
|
|
#define MSG_HELPSERV "HELPSERV" /* HELPSERV */
|
|
|
|
#define MSG_SERVICES "SERVICES" /* SERVICES */
|
|
|
|
#define MSG_IDENTIFY "IDENTIFY" /* IDENTIFY */
|
|
|
|
#define MSG_CAPAB "CAPAB" /* CAPAB */
|
|
|
|
#define MSG_LOCOPS "LOCOPS" /* LOCOPS */
|
|
|
|
#define MSG_SVSNICK "SVSNICK" /* SVSNICK */
|
|
|
|
#define MSG_SVSNOOP "SVSNOOP" /* SVSNOOP */
|
|
|
|
#define MSG_SVSKILL "SVSKILL" /* SVSKILL */
|
|
|
|
#define MSG_SVSMODE "SVSMODE" /* SVSMODE */
|
|
|
|
#define MSG_AKILL "AKILL" /* AKILL */
|
|
|
|
#define MSG_RAKILL "RAKILL" /* RAKILL */
|
|
|
|
#define MSG_SILENCE "SILENCE" /* SILENCE */
|
|
|
|
#define MSG_WATCH "WATCH" /* WATCH */
|
|
|
|
#define MSG_SQLINE "SQLINE" /* SQLINE */
|
|
|
|
#define MSG_UNSQLINE "UNSQLINE" /* UNSQLINE */
|
|
|
|
#define MSG_BURST "BURST" /* BURST */
|
|
|
|
#define MSG_DCCALLOW "DCCALLOW" /* dccallow */
|
|
|
|
#define MSG_SGLINE "SGLINE" /* sgline */
|
|
|
|
#define MSG_UNSGLINE "UNSGLINE" /* unsgline */
|
|
|
|
#define MSG_DKEY "DKEY" /* diffie-hellman negotiation */
|
|
|
|
#define MSG_NS "NS" /* NickServ commands */
|
|
|
|
#define MSG_CS "CS" /* ChanServ commands */
|
|
|
|
#define MSG_MS "MS" /* MemoServ commands */
|
|
|
|
#define MSG_RS "RS" /* RootServ commands */
|
|
|
|
#define MSG_OS "OS" /* OperServ commands */
|
|
|
|
#define MSG_SS "SS" /* StatServ commands */
|
|
|
|
#define MSG_HS "HS" /* StatServ commands */
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Umode chars */
|
|
|
|
#define UMODE_CH_LOCOP 'O'
|
|
|
|
#define UMODE_CH_OPER 'o'
|
2004-07-21 12:37:27 +00:00
|
|
|
#define UMODE_CH_ADMIN 'A'
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Umodes */
|
2004-01-15 21:15:05 +00:00
|
|
|
#define UMODE_OPER 0x00001 /* umode +o - Oper */
|
|
|
|
#define UMODE_LOCOP 0x00002 /* umode +O - Local Oper */
|
|
|
|
#define UMODE_INVISIBLE 0x00004 /* umode +i - Invisible */
|
|
|
|
#define UMODE_WALLOP 0x00008 /* umode +w - Get wallops */
|
|
|
|
#define UMODE_SERVNOTICE 0x00010 /* umode +s - Server notices */
|
|
|
|
#define UMODE_CLIENT 0x00020 /* umode +c - Client connections/exits */
|
|
|
|
#define UMODE_REGNICK 0x00040 /* umode +r - registered nick */
|
|
|
|
#define UMODE_KILLS 0x00080 /* umode +k - Server kill messages */
|
|
|
|
#define UMODE_FLOOD 0x00100 /* umode +f - Server flood messages */
|
2004-01-15 22:53:36 +00:00
|
|
|
#define UMODE_SPY 0x00200 /* umode +y - Stats/links */
|
2004-01-15 21:15:05 +00:00
|
|
|
#define UMODE_DEBUG 0x00400 /* umode +d - Debug info */
|
|
|
|
#define UMODE_GLOBOPS 0x01000 /* umode +g - Globops */
|
|
|
|
#define UMODE_CHATOPS 0x02000 /* umode +b - Chatops */
|
|
|
|
#define UMODE_SADMIN 0x04000 /* umode +a - Services Admin */
|
|
|
|
#define UMODE_ADMIN 0x08000 /* umode +A - Server Admin */
|
2004-01-15 22:53:36 +00:00
|
|
|
#define UMODE_ROUTE 0x10000 /* umode +n - Routing Notices */
|
2004-01-15 21:15:05 +00:00
|
|
|
#define UMODE_HELPOP 0x20000 /* umode +h - Helper */
|
2004-01-15 22:53:36 +00:00
|
|
|
#define UMODE_SPAM 0x40000 /* umode +m - spambot notices */
|
2004-01-15 21:15:05 +00:00
|
|
|
#define UMODE_REGONLY 0x80000 /* unmode +R - No non registered msgs */
|
2004-01-15 22:53:36 +00:00
|
|
|
#define UMODE_OPERNOTICE 0x100000 /* umode +e - oper notices for the above +D */
|
|
|
|
#define UMODE_SQUELCH 0x200000 /* umode +x - Squelch with notice */
|
|
|
|
#define UMODE_SQUELCHN 0x400000 /* umode +X - Squelch without notice */
|
|
|
|
#define UMODE_HIDDENDCC 0x800000 /* umode +D - Hidden dccallow umode */
|
|
|
|
#define UMODE_THROTTLE 0x1000000 /* umode +F - no cptr->since message rate throttle */
|
|
|
|
#define UMODE_REJ 0x2000000 /* umode +j - client rejection notices */
|
|
|
|
#define UMODE_ULINEKILL 0x4000000 /* umode +K - U: lined server kill messages */
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2004-01-11 23:23:45 +00:00
|
|
|
/* Cmode chars */
|
|
|
|
#define CMODE_CH_CHANOP 'o'
|
|
|
|
#define CMODE_CH_VOICE 'v'
|
|
|
|
|
|
|
|
/* Cmode sjoin flags */
|
|
|
|
#define CMODE_FL_CHANOP '@'
|
|
|
|
#define CMODE_FL_VOICE '+'
|
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Cmodes */
|
2004-01-15 21:15:05 +00:00
|
|
|
#define CMODE_CHANOP 0x0001
|
|
|
|
#define CMODE_VOICE 0x0002
|
|
|
|
#define CMODE_DEOPPED 0x0004
|
|
|
|
#define CMODE_PRIVATE 0x0008
|
|
|
|
#define CMODE_SECRET 0x0010
|
2003-12-14 21:57:45 +00:00
|
|
|
#define CMODE_MODERATED 0x0020
|
|
|
|
#define CMODE_TOPICLIMIT 0x0040
|
|
|
|
#define CMODE_INVITEONLY 0x0080
|
|
|
|
#define CMODE_NOPRIVMSGS 0x0100
|
2004-01-15 21:15:05 +00:00
|
|
|
#define CMODE_KEY 0x0200
|
|
|
|
#define CMODE_BAN 0x0400
|
|
|
|
#define CMODE_LIMIT 0x0800
|
|
|
|
#define CMODE_RGSTR 0x1000
|
|
|
|
#define CMODE_RGSTRONLY 0x2000
|
|
|
|
#define CMODE_NOCOLOR 0x4000
|
2003-12-14 21:57:45 +00:00
|
|
|
#define CMODE_OPERONLY 0x8000
|
2004-01-15 21:15:05 +00:00
|
|
|
#define CMODE_MODREG 0x10000
|
|
|
|
#define CMODE_LISTED 0x20000
|
2003-12-14 21:57:45 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Cmode macros */
|
2003-12-14 21:57:45 +00:00
|
|
|
#define is_hidden_chan(x) ((x) && (x->modes & (CMODE_PRIVATE|CMODE_SECRET|CMODE_OPERONLY)))
|
2004-01-19 19:04:01 +00:00
|
|
|
#define is_pub_chan(x) ((x) && (x->modes & (CMODE_PRIVATE|CMODE_SECRET|CMODE_RGSTRONLY|CMODE_OPERONLY|CMODE_INVITEONLY) || CheckChanMode(x, CMODE_KEY)))
|
|
|
|
#define is_priv_chan(x) ((x) && (x->modes & (CMODE_PRIVATE|CMODE_SECRET|CMODE_RGSTRONLY|CMODE_OPERONLY|CMODE_INVITEONLY) || CheckChanMode(x, CMODE_KEY)))
|
2003-06-30 15:18:24 +00:00
|
|
|
|
2003-12-16 22:51:41 +00:00
|
|
|
/* Umode macros */
|
|
|
|
#define is_oper(x) ((x) && (x->Umode & UMODE_OPER))
|
|
|
|
#define is_bot(x) (0)
|
2003-06-30 15:18:24 +00:00
|
|
|
|
|
|
|
#endif
|