This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
NeoStats/neoircd.h

285 lines
10 KiB
C
Raw Permalink Normal View History

/* NeoStats - IRC Statistical Services
2004-01-14 11:36:37 +00:00
** Copyright (c) 1999-2004 Adam Rutter, Justin Hammond
2002-10-14 05:44:39 +00:00
** http://www.neostats.net/
**
** 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
** $Id$
2002-10-14 05:44:39 +00:00
*/
#ifndef NEOIRCD_H
#define NEOIRCD_H
2002-10-14 05:44:39 +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
*/
/* we don't support tokens */
#undef GOTTOKENSUPPORT
/* we don't have sjoin */
#undef GOTSJOIN
2003-12-16 21:46:22 +00:00
/* we don't support CLIENT */
#undef GOTCLIENTSUPPORT
/* we don't support svstime */
#undef GOTSVSTIME
/* we have vhost support */
2003-12-16 00:18:54 +00:00
#define GOTSVSHOST
2003-12-04 21:10:10 +00:00
/* we have svsjoin */
#define GOTSVSJOIN
2003-12-15 23:47:21 +00:00
/* we don't have svsmode */
#undef GOTSVSMODE
/* we have svspart */
#define 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 have swhois */
#define GOTSWHOIS
2003-12-04 21:10:10 +00:00
/* we don't have bot mode support */
#undef GOTBOTMODE
2003-12-04 23:33:44 +00:00
/* we don't have user smode support */
#undef GOTUSERSMODES
2003-12-15 00:05:05 +00:00
/* we don't have svskill support */
#undef GOTSVSKILL
/* we don't have automatic host cloaking support via Umode */
#undef GOTUMODECLOAKING
/* we dont have nickip support */
#undef GOTNICKIP
2002-10-14 05:44:39 +00:00
/* buffer sizes */
#define MAXHOST (128 + 1)
#define MAXPASS (32 + 1)
#define MAXNICK (32 + 1)
#define MAXUSER (15 + 1)
#define MAXREALNAME (50 + 1)
#define CHANLEN (50 + 1)
#define TOPICLEN (512 + 1)
/* Messages/Tokens */
2003-07-30 13:58:22 +00:00
#define MSG_EOB "EOB" /* end of burst */
2002-10-14 05:44:39 +00:00
#define MSG_PRIVATE "PRIVMSG" /* PRIV */
2003-07-30 13:58:22 +00:00
#define MSG_WHO "WHO" /* WHO -> WHOC */
#define MSG_WHOIS "WHOIS" /* WHOI */
2002-10-14 05:44:39 +00:00
#define MSG_WHOWAS "WHOWAS" /* WHOW */
2003-07-30 13:58:22 +00:00
#define MSG_USER "USER" /* USER */
#define MSG_NICK "NICK" /* NICK */
2002-10-14 05:44:39 +00:00
#define MSG_SERVER "SERVER" /* SERV */
2003-07-30 13:58:22 +00:00
#define MSG_LIST "LIST" /* LIST */
#define MSG_TOPIC "TOPIC" /* TOPI */
2002-10-14 05:44:39 +00:00
#define MSG_INVITE "INVITE" /* INVI */
#define MSG_VERSION "VERSION" /* VERS */
2003-07-30 13:58:22 +00:00
#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_WATCH "WATCH" /* WATCH */
#define MSG_STATS "STATS" /* STAT */
#define MSG_HELP "HELP" /* HELP */
2002-10-14 05:44:39 +00:00
#define MSG_HELPOP "HELPOP" /* HELP */
2003-07-30 13:58:22 +00:00
#define MSG_ERROR "ERROR" /* ERRO */
#define MSG_AWAY "AWAY" /* AWAY */
2002-10-14 05:44:39 +00:00
#define MSG_CONNECT "CONNECT" /* CONN */
2003-07-30 13:58:22 +00:00
#define MSG_PING "PING" /* PING */
#define MSG_PONG "PONG" /* PONG */
#define MSG_OPER "OPER" /* OPER */
#define MSG_PASS "PASS" /* PASS */
2002-10-14 05:44:39 +00:00
#define MSG_WALLOPS "WALLOPS" /* WALL */
2003-07-30 13:58:22 +00:00
#define MSG_TIME "TIME" /* TIME */
#define MSG_NAMES "NAMES" /* NAME */
#define MSG_ADMIN "ADMIN" /* ADMI */
2002-10-14 05:44:39 +00:00
#define MSG_NOTICE "NOTICE" /* NOTI */
2003-07-30 13:58:22 +00:00
#define MSG_JOIN "JOIN" /* JOIN */
#define MSG_PART "PART" /* PART */
2002-10-14 05:44:39 +00:00
#define MSG_LUSERS "LUSERS" /* LUSE */
2003-07-30 13:58:22 +00:00
#define MSG_MOTD "MOTD" /* MOTD */
#define MSG_MODE "MODE" /* MODE */
#define MSG_KICK "KICK" /* KICK */
2002-10-14 05:44:39 +00:00
#define MSG_SERVICE "SERVICE" /* SERV -> SRVI */
#define MSG_USERHOST "USERHOST" /* USER -> USRH */
2003-07-30 13:58:22 +00:00
#define MSG_ISON "ISON" /* ISON */
2002-10-14 05:44:39 +00:00
#define MSG_SQUERY "SQUERY" /* SQUE */
#define MSG_SERVLIST "SERVLIST" /* SERV -> SLIS */
#define MSG_SERVSET "SERVSET" /* SERV -> SSET */
#define MSG_REHASH "REHASH" /* REHA */
#define MSG_RESTART "RESTART" /* REST */
2003-07-30 13:58:22 +00:00
#define MSG_CLOSE "CLOSE" /* CLOS */
#define MSG_DIE "DIE" /* DIE */
#define MSG_HASH "HASH" /* HASH */
#define MSG_DNS "DNS" /* DNS -> DNSS */
2002-10-14 05:44:39 +00:00
#define MSG_SILENCE "SILENCE" /* SILE */
2003-07-30 13:58:22 +00:00
#define MSG_AKILL "AKILL" /* AKILL */
#define MSG_KLINE "KLINE" /* KLINE */
#define MSG_UNKLINE "UNKLINE" /* UNKLINE */
2002-10-14 05:44:39 +00:00
#define MSG_RAKILL "RAKILL" /* RAKILL */
#define MSG_GNOTICE "GNOTICE" /* GNOTICE */
2003-07-30 13:58:22 +00:00
#define MSG_GOPER "GOPER" /* GOPER */
2002-10-14 05:44:39 +00:00
#define MSG_LOCOPS "LOCOPS" /* LOCOPS */
#define MSG_PROTOCTL "PROTOCTL" /* PROTOCTL */
2003-07-30 13:58:22 +00:00
#define MSG_TRACE "TRACE" /* TRAC */
2002-10-14 05:44:39 +00:00
#define MSG_SQLINE "SQLINE" /* SQLINE */
#define MSG_UNSQLINE "UNSQLINE" /* UNSQLINE */
#define MSG_SVSNICK "SVSNICK" /* SVSNICK */
#define MSG_SVSNOOP "SVSNOOP" /* SVSNOOP */
#define MSG_IDENTIFY "IDENTIFY" /* IDENTIFY */
#define MSG_SVSKILL "SVSKILL" /* SVSKILL */
#define MSG_NICKSERV "NICKSERV" /* NICKSERV */
#define MSG_NS "NS"
#define MSG_CHANSERV "CHANSERV" /* CHANSERV */
#define MSG_CS "CS"
#define MSG_OPERSERV "OPERSERV" /* OPERSERV */
#define MSG_OS "OS"
#define MSG_MEMOSERV "MEMOSERV" /* MEMOSERV */
#define MSG_MS "MS"
#define MSG_SERVICES "SERVICES" /* SERVICES */
#define MSG_SVSMODE "SVSMODE" /* SVSMODE */
#define MSG_SAMODE "SAMODE" /* SAMODE */
#define MSG_CHATOPS "CHATOPS" /* CHATOPS */
2003-07-30 13:58:22 +00:00
#define MSG_HELPSERV "HELPSERV" /* HELPSERV */
#define MSG_ZLINE "ZLINE" /* ZLINE */
#define MSG_UNZLINE "UNZLINE" /* UNZLINE */
2002-10-14 05:44:39 +00:00
#define MSG_NETINFO "NETINFO" /* NETINFO */
2003-07-30 13:58:22 +00:00
#define MSG_RULES "RULES" /* RULES */
#define MSG_MAP "MAP" /* MAP */
#define MSG_NETG "NETG" /* NETG */
#define MSG_ADCHAT "ADCHAT" /* Adchat */
2002-10-14 05:44:39 +00:00
#define MSG_MAKEPASS "MAKEPASS" /* MAKEPASS */
#define MSG_ADDHUB "ADDHUB" /* ADDHUB */
#define MSG_DELHUB "DELHUB" /* DELHUB */
#define MSG_ADDCNLINE "ADDCNLINE" /* ADDCNLINE */
#define MSG_DELCNLINE "DELCNLINE" /* DELCNLINE */
#define MSG_ADDOPER "ADDOPER" /* ADDOPER */
#define MSG_DELOPER "DELOPER" /* DELOPER */
#define MSG_ADDQLINE "ADDQLINE" /* ADDQLINE */
#define MSG_DELQLINE "DELQLINE" /* DELQLINE */
2003-07-30 13:58:22 +00:00
#define MSG_GSOP "GSOP" /* GSOP */
#define MSG_ISOPER "ISOPER" /* ISOPER */
#define MSG_ADG "ADG" /* ADG */
#define MSG_NMON "NMON" /* NMON */
2002-10-14 05:44:39 +00:00
#define MSG_DALINFO "DALINFO" /* DALnet Credits */
#define MSG_CREDITS "CREDITS" /* UltimateIRCd Credits and "Thanks To" */
2003-07-30 13:58:22 +00:00
#define MSG_OPERMOTD "OPERMOTD" /* OPERMOTD */
2002-10-14 05:44:39 +00:00
#define MSG_REMREHASH "REMREHASH" /* Remote Rehash */
#define MSG_MONITOR "MONITOR" /* MONITOR */
2003-07-30 13:58:22 +00:00
#define MSG_GLINE "GLINE" /* The awesome g-line */
2002-10-14 05:44:39 +00:00
#define MSG_REMGLINE "REMGLINE" /* remove g-line */
#define MSG_STATSERV "STATSERV" /* StatServ */
#define MSG_RULESERV "RULESERV" /* RuleServ */
#define MSG_SNETINFO "SNETINFO" /* SNetInfo */
2003-07-30 13:58:22 +00:00
#define MSG_TSCTL "TSCTL" /* TSCTL */
2002-10-14 05:44:39 +00:00
#define MSG_SVSJOIN "SVSJOIN" /* SVSJOIN */
#define MSG_SAJOIN "SAJOIN" /* SAJOIN */
2003-07-30 13:58:22 +00:00
#define MSG_SDESC "SDESC" /* SDESC */
2002-10-14 05:44:39 +00:00
#define MSG_UNREALINFO "UNREALINFO" /* Unreal Info */
2003-07-30 13:58:22 +00:00
#define MSG_SETHOST "SETHOST" /* sethost */
#define MSG_SETIDENT "SETIDENT" /* set ident */
#define MSG_SETNAME "SETNAME" /* set Realname */
2002-10-14 05:44:39 +00:00
#define MSG_CHGHOST "CHGHOST" /* Changehost */
#define MSG_CHGIDENT "CHGIDENT" /* Change Ident */
#define MSG_RANDQUOTE "RANDQUOTE" /* Random Quote */
#define MSG_ADDQUOTE "ADDQUOTE" /* Add Quote */
#define MSG_ADDGQUOTE "ADDGQUOTE" /* Add Global Quote */
#define MSG_ADDULINE "ADDULINE" /* Adds an U Line to ircd.conf file */
#define MSG_DELULINE "DELULINE" /* Removes an U line from the ircd.conf */
2003-07-30 13:58:22 +00:00
#define MSG_KNOCK "KNOCK" /* Knock Knock - Who's there? */
2002-10-14 05:44:39 +00:00
#define MSG_SETTINGS "SETTINGS" /* Settings */
#define MSG_IRCOPS "IRCOPS" /* Shows Online IRCOps */
#define MSG_SVSPART "SVSPART" /* SVSPART */
#define MSG_SAPART "SAPART" /* SAPART */
/*#define MSG_VCTRL "VCTRL" *//* VCTRL */
2002-10-14 05:44:39 +00:00
#define MSG_GCLIENT "GCLIENT" /* GLIENT */
#define MSG_CHANNEL "CHANNEL" /* CHANNEL */
#define MSG_UPTIME "UPTIME" /* UPTIME */
#define MSG_FAILOPS "FAILOPS" /* FAILOPS */
2003-07-30 13:58:22 +00:00
#define MSG_RPING "RPING" /* RPING */
#define MSG_RPONG "RPONG" /* RPONG */
#define MSG_UPING "UPING" /* UPING */
2002-10-14 05:44:39 +00:00
#define MSG_COPYRIGHT "COPYRIGHT" /* Copyright */
#define MSG_BOTSERV "BOTSERV" /* BOTSERV */
#define MSG_BS "BS"
#define MSG_ROOTSERV "ROOTSERV" /* ROOTSERV */
2003-07-30 13:58:22 +00:00
#define MSG_SVINFO "SVINFO"
2002-10-14 05:44:39 +00:00
#define MSG_CAPAB "CAPAB"
#define MSG_BURST "BURST"
#define MSG_SJOIN "SJOIN"
2002-10-16 03:13:59 +00:00
#define MSG_TBURST "TBURST"
2002-10-14 05:44:39 +00:00
/* Umode chars */
#define UMODE_CH_LOCOP 'O'
#define UMODE_CH_OPER 'o'
#define UMODE_CH_ADMIN 'a'
2002-10-14 05:44:39 +00:00
/* Umodes */
2002-10-14 05:44:39 +00:00
#define UMODE_OPER 0x0001 /* oper flag */
#define UMODE_ADMIN 0x0002 /* admin flag */
#define UMODE_BOTS 0x0004 /* shows bots */
#define UMODE_CCONN 0x0008 /* shows client connections */
#define UMODE_DEBUG 0x0010 /* show debug info */
#define UMODE_FULL 0x0020 /* show full messages */
#define UMODE_CALLERID 0x0040 /* client has callerid enabled */
#define UMODE_INVISIBLE 0x0080 /* client has +i flag */
#define UMODE_SKILL 0x0100 /* client see's server kills */
#define UMODE_LOCOPS 0x0200 /* client is localop */
#define UMODE_NCHANGE 0x0400 /* client can see nick change notices */
2003-07-30 13:58:22 +00:00
#define UMODE_REJ 0x0800 /* client is registered */
2002-10-14 05:44:39 +00:00
#define UMODE_SERVNOTICE 0x1000 /* client can see server notices */
#define UMODE_UNAUTH 0x2000 /* client can see unauthd connections */
#define UMODE_WALLOP 0x4000 /* client can get wallop messages */
#define UMODE_EXTERNAL 0x8000 /* client can see server joins/splits */
#define UMODE_SPY 0x10000 /* client can spy on user commands */
2003-07-30 13:58:22 +00:00
#define UMODE_OPERWALL 0x20000 /* client gets operwalls */
#define UMODE_SERVICES 0x40000 /* client is services */
#define UMODE_REGNICK 0x80000 /* registered nickname */
2002-10-14 05:44:39 +00:00
/* Cmodes */
2003-12-14 21:57:45 +00:00
#define CMODE_CHANOP 0x0001
#define CMODE_HALFOP 0x0002
#define CMODE_VOICE 0x0004
#define CMODE_PRIVATE 0x0008
#define CMODE_SECRET 0x0010
#define CMODE_MODERATED 0x0020
#define CMODE_TOPICLIMIT 0x0040
#define CMODE_INVITEONLY 0x0080
#define CMODE_NOPRIVMSGS 0x0100
#define CMODE_KEY 0x0200
#define CMODE_EXCEPT 0x0400
#define CMODE_BAN 0x0800
#define CMODE_LIMIT 0x1000
#define CMODE_HIDEOPS 0x2000
#define CMODE_INVEX 0x4000
#define CMODE_CHANADMIN 0x8000
#define CMODE_OPERONLY 0x10000
#define CMODE_REGCHAN 0x20000
2002-10-14 05:44:39 +00:00
/* Cmode macros */
2003-12-14 21:57:45 +00:00
#define is_hidden_chan(x) ((x) && (x->modes & CMODE_SECRET))
2004-01-19 19:04:01 +00:00
#define is_pub_chan(x) ((x) && (x->modes & (CMODE_PRIVATE|CMODE_SECRET|CMODE_INVITEONLY|CMODE_OPERONLY) || CheckChanMode(x, CMODE_KEY) ))
#define is_priv_chan(x) ((x) && (x->modes & (CMODE_PRIVATE|CMODE_SECRET|CMODE_INVITEONLY|CMODE_OPERONLY) || CheckChanMode(x, CMODE_KEY) ))
2002-10-14 05:44:39 +00:00
/* Umode macros */
#define is_oper(x) ((x) && (x->Umode & UMODE_OPER))
#define is_bot(x) (0)
2002-10-14 05:44:39 +00:00
#endif