[X2serv-cvs] [CVS] Module srvx2: Change committed
Brought to you by:
sirvulcan
From: Alex S. <ru...@us...> - 2004-06-14 07:32:37
|
Committer : Alex Schumann <ru...@us...> CVSROOT : /cvsroot/x2serv Module : srvx2 Commit time: 2004-06-14 07:32:16 UTC Modified files: chanserv.help nickserv.help srvx src/chanserv.c src/chanserv.help src/hash.h src/modules-list.h src/nickserv.c src/nickserv.help src/proto-p10.c Log message: Support modes SMNQTO and commented support for z to use later added limit for account length of 15 (to go along with nefarious) ---------------------- diff included ---------------------- Index: srvx2/chanserv.help diff -u srvx2/chanserv.help:1.3 srvx2/chanserv.help:1.4 --- srvx2/chanserv.help:1.3 Thu Jun 10 13:14:32 2004 +++ srvx2/chanserv.help Mon Jun 14 00:32:02 2004 @@ -157,6 +157,13 @@ "=---------------------------------------=" ); +"LOGIN" ("=-- Logging In --=", + " Please login using:", + " /MSG $N AUTH <account> <password>", + " or the shortcut:", + " /AUTH <account> <password>" + ); + "MYACCESS" ("/msg $S MYACCESS [<nick|*account>]", "Lists channels where you have access and infolines in each.", "Network staff may specify a nickname or *account to view the list for another user.", Index: srvx2/nickserv.help diff -u srvx2/nickserv.help:1.2 srvx2/nickserv.help:1.3 --- srvx2/nickserv.help:1.2 Thu Jun 10 13:14:32 2004 +++ srvx2/nickserv.help Mon Jun 14 00:32:02 2004 @@ -307,6 +307,9 @@ "If no account is given, it will cancel the allowauth for the user (assuming the user has an allowauth).", "If the account is marked as a helper or oper, the STAFF qualifier must be given afterwards. This reduces social engineering attacks.", "$uSee Also:$u addmask, auth"); + +"LOGIN" ("See /MSG $N HELP AUTH"); + "AUTH" { "/services/nickserv/email_enabled" ( "/msg $N@$s AUTH [account] <password>", Index: srvx2/src/chanserv.c diff -u srvx2/src/chanserv.c:1.2 srvx2/src/chanserv.c:1.3 --- srvx2/src/chanserv.c:1.2 Thu Jun 3 16:34:02 2004 +++ srvx2/src/chanserv.c Mon Jun 14 00:32:05 2004 @@ -5806,6 +5806,11 @@ * full, see if they're on the banlist for the channel. If so, * kickban them. */ + /* This is really, really stupid. not all banned people are kicked. + * sometimes we like to leave them unkicked. + * I tried to explain this to the srvx developers and + * got insulted.. hence one reason for this fork. + * if(user->uplink->burst && !mNode->modes) { unsigned int ii; @@ -5813,12 +5818,13 @@ { if(user_matches_glob(user, channel->banlist.list[ii]->ban, 1)) { - /* Riding a netburst. Naughty. */ + ** Riding a netburst. Naughty. ** KickChannelUser(user, channel, chanserv, "User from far side of netsplit should have been banned - bye."); return 1; } } } + */ mod_chanmode_init(&change); change.argc = 1; Index: srvx2/src/chanserv.help diff -u srvx2/src/chanserv.help:1.3 srvx2/src/chanserv.help:1.4 --- srvx2/src/chanserv.help:1.3 Thu Jun 3 16:55:32 2004 +++ srvx2/src/chanserv.help Mon Jun 14 00:32:05 2004 @@ -157,6 +157,13 @@ "=---------------------------------------=" ); +"LOGIN" ("=-- Logging In --=", + " Please login using:", + " /MSG $N AUTH <account> <password>", + " or the shortcut:", + " /AUTH <account> <password>" + ); + "MYACCESS" ("/msg $S MYACCESS [<nick|*account>]", "Lists channels where you have access and infolines in each.", "Network staff may specify a nickname or *account to view the list for another user.", Index: srvx2/src/hash.h diff -u srvx2/src/hash.h:1.2 srvx2/src/hash.h:1.3 --- srvx2/src/hash.h:1.2 Thu Jun 10 13:14:33 2004 +++ srvx2/src/hash.h Mon Jun 14 00:32:05 2004 @@ -25,22 +25,29 @@ #include "dict.h" #include "policer.h" -#define MODE_CHANOP 0x0001 /* +o USER */ -#define MODE_VOICE 0x0002 /* +v USER */ -#define MODE_PRIVATE 0x0004 /* +p */ -#define MODE_SECRET 0x0008 /* +s */ -#define MODE_MODERATED 0x0010 /* +m */ -#define MODE_TOPICLIMIT 0x0020 /* +t */ -#define MODE_INVITEONLY 0x0040 /* +i */ -#define MODE_NOPRIVMSGS 0x0080 /* +n */ -#define MODE_KEY 0x0100 /* +k KEY */ -#define MODE_BAN 0x0200 /* +b BAN */ -#define MODE_LIMIT 0x0400 /* +l LIMIT */ -#define MODE_DELAYJOINS 0x0800 /* +D */ -#define MODE_REGONLY 0x1000 /* ircu +r, Bahamut +R */ -#define MODE_NOCOLORS 0x2000 /* +c */ -#define MODE_NOCTCPS 0x4000 /* +C */ -#define MODE_REGISTERED 0x8000 /* Bahamut +r */ +#define MODE_CHANOP 0x00000001 /* +o USER */ +#define MODE_VOICE 0x00000002 /* +v USER */ +#define MODE_PRIVATE 0x00000004 /* +p */ +#define MODE_SECRET 0x00000008 /* +s */ +#define MODE_MODERATED 0x00000010 /* +m */ +#define MODE_TOPICLIMIT 0x00000020 /* +t */ +#define MODE_INVITEONLY 0x00000040 /* +i */ +#define MODE_NOPRIVMSGS 0x00000080 /* +n */ +#define MODE_KEY 0x00000100 /* +k KEY */ +#define MODE_BAN 0x00000200 /* +b BAN */ +#define MODE_LIMIT 0x00000400 /* +l LIMIT */ +#define MODE_DELAYJOINS 0x00000800 /* +D */ +#define MODE_REGONLY 0x00001000 /* ircu +r, Bahamut +R */ +#define MODE_NOCOLORS 0x00002000 /* +c */ +#define MODE_NOCTCPS 0x00004000 /* +C */ +#define MODE_REGISTERED 0x00008000 /* Bahamut +r */ +#define MODE_STRIPCOLOR 0x00010000 /* +S Strip mirc color codes */ +#define MODE_MODUNREG 0x00020000 /* +M mod unregister */ +#define MODE_NONOTICE 0x00040000 /* +N no notices */ +#define MODE_OPERSONLY 0x00080000 /* +O Opers only */ +#define MODE_NOQUITMSGS 0x00100000 /* +Q suppress messages from quit notices */ +#define MODE_NOAMSG 0x00200000 /* +T no multi-target messages */ +#define MODE_SSLONLY 0x00400000 /* +z ssl only */ #define MODE_REMOVE 0x80000000 #define FLAGS_OPER 0x0001 /* Operator +O */ Index: srvx2/src/modules-list.h diff -u srvx2/src/modules-list.h:1.1.1.1 srvx2/src/modules-list.h:1.2 --- srvx2/src/modules-list.h:1.1.1.1 Thu Jun 3 10:14:00 2004 +++ srvx2/src/modules-list.h Mon Jun 14 00:32:05 2004 @@ -1 +1,4 @@ +WITH_MODULE(helpserv) +WITH_MODULE(snoop) +WITH_MODULE(memoserv) Index: srvx2/src/nickserv.c diff -u srvx2/src/nickserv.c:1.2 srvx2/src/nickserv.c:1.3 --- srvx2/src/nickserv.c:1.2 Thu Jun 3 16:34:03 2004 +++ srvx2/src/nickserv.c Mon Jun 14 00:32:05 2004 @@ -130,6 +130,7 @@ static unsigned int flag_access_levels[32]; static const struct message_entry msgtab[] = { { "NSMSG_HANDLE_EXISTS", "Account $b%s$b is already registered." }, + { "NSMSG_HANDLE_TOLONG", "The account name %s is too long. Account names must be %lu charactors or less."}, { "NSMSG_PASSWORD_SHORT", "Your password must be at least %lu characters long." }, { "NSMSG_PASSWORD_ACCOUNT", "Your password may not be the same as your account name." }, { "NSMSG_PASSWORD_DICTIONARY", "Your password should not be the word \"password\", or any other dictionary word." }, @@ -959,6 +960,12 @@ return 0; } + if(strlen(handle) > 15) + { + send_message(user, nickserv, "NSMSG_HANDLE_TOLONG", handle, 15); + return 0; + } + if (!is_secure_password(handle, passwd, user)) return 0; @@ -1491,6 +1498,11 @@ reply("NSMSG_HANDLE_EXISTS", argv[2]); return 0; } + if(strlen(argv[2]) > 15) + { + reply("NMSG_HANDLE_TOLONG", argv[2], 15); + return 0; + } dict_remove2(nickserv_handle_dict, old_handle = hi->handle, 1); hi->handle = strdup(argv[2]); Index: srvx2/src/nickserv.help diff -u srvx2/src/nickserv.help:1.2 srvx2/src/nickserv.help:1.3 --- srvx2/src/nickserv.help:1.2 Fri Jun 4 14:39:23 2004 +++ srvx2/src/nickserv.help Mon Jun 14 00:32:06 2004 @@ -307,6 +307,9 @@ "If no account is given, it will cancel the allowauth for the user (assuming the user has an allowauth).", "If the account is marked as a helper or oper, the STAFF qualifier must be given afterwards. This reduces social engineering attacks.", "$uSee Also:$u addmask, auth"); + +"LOGIN" ("See /MSG $N HELP AUTH"); + "AUTH" { "/services/nickserv/email_enabled" ( "/msg $N@$s AUTH [account] <password>", Index: srvx2/src/proto-p10.c diff -u srvx2/src/proto-p10.c:1.2 srvx2/src/proto-p10.c:1.3 --- srvx2/src/proto-p10.c:1.2 Thu Jun 10 13:14:33 2004 +++ srvx2/src/proto-p10.c Mon Jun 14 00:32:06 2004 @@ -548,8 +548,8 @@ void irc_gline(struct server *srv, struct gline *gline) { - putsock("%s " P10_GLINE " %s +%s %ld :%s", - self->numeric, (srv ? srv->numeric : "*"), gline->target, gline->expires-now, gline->reason); + putsock("%s " P10_GLINE " %s +%s %ld :<%s> %s", + self->numeric, (srv ? srv->numeric : "*"), gline->target, gline->expires-now, gline->issuer, gline->reason); } void @@ -2114,6 +2114,14 @@ case 'r': do_chan_mode(MODE_REGONLY); break; case 's': do_chan_mode(MODE_SECRET); break; case 't': do_chan_mode(MODE_TOPICLIMIT); break; + case 'S': do_chan_mode(MODE_STRIPCOLOR); break; + case 'M': do_chan_mode(MODE_MODUNREG); break; + case 'N': do_chan_mode(MODE_NONOTICE); break; + case 'Q': do_chan_mode(MODE_NOQUITMSGS); break; + case 'T': do_chan_mode(MODE_NOAMSG); break; + case 'O': do_chan_mode(MODE_OPERSONLY); break; +// uncomment this when ssl is enabled on the network. +// case 'z': do_chan_mode(MODE_SSLONLY); break; #undef do_chan_mode case 'l': if (add) { @@ -2257,6 +2265,14 @@ DO_MODE_CHAR(REGONLY, 'r'); DO_MODE_CHAR(NOCOLORS, 'c'); DO_MODE_CHAR(NOCTCPS, 'C'); + DO_MODE_CHAR(STRIPCOLOR, 'S'); + DO_MODE_CHAR(MODUNREG, 'M'); + DO_MODE_CHAR(NONOTICE, 'N'); + DO_MODE_CHAR(NOQUITMSGS, 'Q'); + DO_MODE_CHAR(NOAMSG, 'T'); + DO_MODE_CHAR(OPERSONLY, 'O'); + // uncomment this for ssl support + //DO_MODE_CHAR(SSLONLY, 'z'); #undef DO_MODE_CHAR if (change->modes_clear & channel->modes & MODE_KEY) mod_chanmode_append(&chbuf, 'k', channel->key); @@ -2295,6 +2311,14 @@ DO_MODE_CHAR(REGONLY, 'r'); DO_MODE_CHAR(NOCOLORS, 'c'); DO_MODE_CHAR(NOCTCPS, 'C'); + DO_MODE_CHAR(STRIPCOLOR, 'S'); + DO_MODE_CHAR(MODUNREG, 'M'); + DO_MODE_CHAR(NONOTICE, 'N'); + DO_MODE_CHAR(NOQUITMSGS, 'Q'); + DO_MODE_CHAR(NOAMSG, 'T'); + DO_MODE_CHAR(OPERSONLY, 'O'); + // uncomment this for ssl support + //DO_MODE_CHAR(SSLONLY, 'z'); #undef DO_MODE_CHAR if(change->modes_set & MODE_KEY) mod_chanmode_append(&chbuf, 'k', change->new_key); @@ -2350,6 +2374,14 @@ DO_MODE_CHAR(REGONLY, 'r'); DO_MODE_CHAR(NOCOLORS, 'c'); DO_MODE_CHAR(NOCTCPS, 'C'); + DO_MODE_CHAR(STRIPCOLOR, 'S'); + DO_MODE_CHAR(MODUNREG, 'M'); + DO_MODE_CHAR(NONOTICE, 'N'); + DO_MODE_CHAR(NOQUITMSGS, 'Q'); + DO_MODE_CHAR(NOAMSG, 'T'); + DO_MODE_CHAR(OPERSONLY, 'O'); + // uncomment this for ssl support + //DO_MODE_CHAR(SSLONLY, 'z'); #undef DO_MODE_CHAR } if (change->modes_set) { @@ -2365,6 +2397,14 @@ DO_MODE_CHAR(REGONLY, 'r'); DO_MODE_CHAR(NOCOLORS, 'c'); DO_MODE_CHAR(NOCTCPS, 'C'); + DO_MODE_CHAR(STRIPCOLOR, 'S'); + DO_MODE_CHAR(MODUNREG, 'M'); + DO_MODE_CHAR(NONOTICE, 'N'); + DO_MODE_CHAR(NOQUITMSGS, 'Q'); + DO_MODE_CHAR(NOAMSG, 'T'); + DO_MODE_CHAR(OPERSONLY, 'O'); + // uncomment this for ssl support + //DO_MODE_CHAR(SSLONLY, 'z'); #undef DO_MODE_CHAR switch (change->modes_set & (MODE_KEY|MODE_LIMIT)) { case MODE_KEY|MODE_LIMIT: @@ -2410,6 +2450,12 @@ case 'r': remove |= MODE_REGONLY; break; case 'c': remove |= MODE_NOCOLORS; case 'C': remove |= MODE_NOCTCPS; break; + case 'S': remove |= MODE_STRIPCOLOR; break; + case 'M': remove |= MODE_MODUNREG; break; + case 'N': remove |= MODE_NONOTICE; break; + case 'Q': remove |= MODE_NOQUITMSGS; break; + case 'T': remove |= MODE_NOAMSG; break; + case 'O': remove |= MODE_OPERSONLY; break; } } Index: srvx2/srvx ----------------------- End of diff ----------------------- |