/* Ultimate IRCD 3 functions
*
* (C) 2003 Anope Team
* Contact us at info@anope.org
*
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#include "services.h"
#include "pseudo.h"
#ifdef IRC_ULTIMATE3
const char version_protocol[] = "UltimateIRCd 3.0.0.a26+";
IRCDVar ircd[] = {
{"UltimateIRCd 3.0.*", /* ircd name */
"+S", /* nickserv mode */
"+S", /* chanserv mode */
"+S", /* memoserv mode */
"+o", /* hostserv mode */
"+iS", /* operserv mode */
"+S", /* botserv mode */
"+Sh", /* helpserv mode */
"+iS", /* Dev/Null mode */
"+iS", /* Global mode */
"+o", /* nickserv alias mode */
"+o", /* chanserv alias mode */
"+o", /* memoserv alias mode */
"+io", /* hostserv alias mode */
"+io", /* operserv alias mode */
"+o", /* botserv alias mode */
"+h", /* helpserv alias mode */
"+i", /* Dev/Null alias mode */
"+io", /* Global alias mode */
"+S", /* Used by BotServ Bots */
5, /* Chan Max Symbols */
"-iklmnpstRKAO", /* Modes to Remove */
"+ao", /* Channel Umode used by Botserv bots */
1, /* SVSNICK */
1, /* Vhost */
0, /* Has Owner */
NULL, /* Mode to set for an owner */
NULL, /* Mode to unset for an owner */
"+rd", /* Mode On Reg */
"-r+d", /* Mode on UnReg */
"+d", /* Mode on Nick Change */
1, /* Supports SGlines */
1, /* Supports SQlines */
1, /* Supports SZlines */
1, /* Supports Halfop +h */
3, /* Number of server args */
0, /* Join 2 Set */
0, /* Join 2 Message */
1, /* Has exceptions +e */
0, /* TS Topic Forward */
0, /* TS Topci Backward */
UMODE_p, /* Protected Umode */
1, /* Has Admin */
0, /* Chan SQlines */
0, /* Quit on Kill */
1, /* SVSMODE unban */
0, /* Has Protect */
0, /* Reverse */
1, /* Chan Reg */
CMODE_r, /* Channel Mode */
0, /* vidents */
0, /* svshold */
1, /* time stamp on mode */
0, /* NICKIP */
1, /* UMODE */
0, /* O:LINE */
1, /* VHOST ON NICK */
0, /* Change RealName */
CHAN_HELP_ULTIMATE3, /* ChanServ extra */
CMODE_K, /* No Knock */
CMODE_A, /* Admin Only */
DEFAULT_MLOCK, /* Default MLOCK */
UMODE_x, /* Vhost Mode */
0, /* +f */
0, /* +L */
0, /* +f Mode */
0, /* +L Mode */
1, /* On nick change check if they could be identified */
1, /* No Knock requires +i */
NULL, /* CAPAB Chan Modes */
1, /* No Knock requires +i */
NULL, /* CAPAB Chan Modes */
},
{NULL}
};
IRCDCAPAB ircdcap[] = {
{
CAPAB_NOQUIT, /* NOQUIT */
CAPAB_TSMODE, /* TSMODE */
CAPAB_UNCONNECT, /* UNCONNECT */
0, /* NICKIP */
CAPAB_NSJOIN, /* SJOIN */
CAPAB_ZIP, /* ZIP */
CAPAB_BURST, /* BURST */
CAPAB_TS5, /* TS5 */
0, /* TS3 */
CAPAB_DKEY, /* DKEY */
0, /* PT4 */
0, /* SCS */
0, /* QS */
0, /* UID */
0, /* KNOCK */
CAPAB_CLIENT, /* CLIENT */
CAPAB_IPV6, /* IPV6 */
CAPAB_SSJ5, /* SSJ5 */
0, /* SN2 */
0, /* TOKEN */
0, /* VHOST */
0, /* SSJ3 */
0, /* NICK2 */
0, /* UMODE2 */
0, /* VL */
0, /* TLKEXT */
CAPAB_DODKEY, /* DODKEY */
CAPAB_DOZIP, /* DOZIP */
0}
};
void anope_set_umode(User * user, int ac, char **av)
{
int add = 1; /* 1 if adding modes, 0 if deleting */
char *modes = av[0];
ac--;
if (debug)
alog("debug: Changing mode for %s to %s", user->nick, modes);
while (*modes) {
add ? (user->mode |= umodes[(int) *modes]) : (user->mode &=
~umodes[(int)
*modes]);
switch (*modes++) {
case '+':
add = 1;
break;
case '-':
add = 0;
break;
case 'a':
if (add && !is_services_oper(user)) {
send_cmd(ServerName, "SVSMODE %s -a", user->nick);
user->mode &= ~UMO
|