[X2serv-cvs] [CVS] Module x2: Change committed
Brought to you by:
sirvulcan
From: Reed L. <r3...@us...> - 2003-06-14 20:24:29
|
Committer : Reed Loden <r3...@us...> CVSROOT : /cvsroot/x2serv Module : x2 Commit time: 2003-06-14 20:24:28 UTC Modified files: INSTALL README configure configure.in HELP/ACCESS doc/config.txt source/commands.c source/config.h source/misc.c source/parse.c source/user.c Log message: Update documentation, remove +h mode and make it a virtual GODMODE, add new cmodes and umodes, and clean-up code. We're calling this X2 v5.2 now. ---------------------- diff included ---------------------- Index: x2/HELP/ACCESS diff -u x2/HELP/ACCESS:1.4 x2/HELP/ACCESS:1.5 --- x2/HELP/ACCESS:1.4 Fri Mar 2 04:22:25 2001 +++ x2/HELP/ACCESS Sat Jun 14 13:24:18 2003 @@ -10,9 +10,9 @@ * This tells you the TOGOP status for the given users host. Rubin is an AfterNet IRC Operator. * This line will show up if `nickname' is an IRCOP. -Rubin has security overrride (+h) enabled. +Rubin has security overrride (GOD) enabled. * This line will show up if `nickname' is an IRCOP who is using the override - mode (+h). + mode (GOD). The ACCESS command can by done by all users. Index: x2/INSTALL diff -u x2/INSTALL:1.6 x2/INSTALL:1.7 --- x2/INSTALL:1.6 Thu Nov 8 00:21:08 2001 +++ x2/INSTALL Sat Jun 14 13:24:17 2003 @@ -1,7 +1,4 @@ Ok, quick and dirty: -X2 WORKS ONLY WITH UNIVERSAL IRCD http://www.sourceforge.net/projects/ircu -it will NOT connect to Undernet ircu2.10.08 or higher without -serious modifications!!! (Undernet has changed the P10 protocol they use) Basic Install procedure: ------------------------- @@ -15,7 +12,7 @@ You can then execute the bot by changing to the directory you installed to and running: ./x2 -You will of course have to add C,N,H lines to the server you will be +You will of course have to add C and H lines to the server you will be connecting too, as well as U: lines on EVERY CONNECTED SERVER for X2 to work properly. Please submit bug reports and suggestions to the bug tracking system on Index: x2/README diff -u x2/README:1.7 x2/README:1.8 --- x2/README:1.7 Thu Nov 8 00:21:08 2001 +++ x2/README Sat Jun 14 13:24:18 2003 @@ -1,11 +1,9 @@ --------- X2 5.1 Channel and Oper Services ------- +-------- X2 5.2 Channel and Oper Services ------- Alright folks here it is. Complete channel and oper services -for universal ircd based IRC network. This version of x2 is compatable -with universal ircd ircu2.10.08.37 or above. The 2.10.09 release is -reccomended. -***X2 DOES NOT WORK WITH UNDERNET IRC DAEMON!*** -Undernet has made changes to the P10 protocol which X2 is NOT COMPATABLE with. +for undernet ircd (IRCu) based IRC network. This version of x2 is +compatable with undernet IRCu u2.10.11 or above. The u2.10.11.05 +release is recommended. I am hereby releasing the source to the channel services we at AfterNet have been using for several years to the general public, under the terms @@ -47,6 +45,20 @@ Add your net? Email me. ru...@af... -- Changes -- +------- Changes for 5.2 ------------------------ +AfterNET swapped to a new and better IRCd (UnderNet IRCu + +modifications) and is now not compatible with older IRCd's such as +universal. + +Some of the things changed: +* Fully support P10 tokens. +* Use extended numerics. +* Recognize the account (AC) token, but do nothing with it currently. + JinX will (maybe) be the new service to use accounts. +* Added new umodes and cmodes. +* Removed +h GODMODE and just left the /msg X2 GOD on/off thing. + + ------- Changes for 5.1 ------------------------ Note: This is a major upgrade. If you're upgrading from a 5.0.3 or earlier release, you should know that we've totally Index: x2/configure diff -u x2/configure:1.3 x2/configure:1.4 --- x2/configure:1.3 Sun Nov 11 03:37:11 2001 +++ x2/configure Sat Jun 14 13:24:18 2003 @@ -524,7 +524,7 @@ PACKAGE=x2serv -VERSION=5.1 +VERSION=5.2 Index: x2/configure.in diff -u x2/configure.in:1.3 x2/configure.in:1.4 --- x2/configure.in:1.3 Thu Nov 8 04:53:07 2001 +++ x2/configure.in Sat Jun 14 13:24:18 2003 @@ -2,7 +2,7 @@ AC_INIT(source/main.c) AC_CONFIG_HEADER(source/setup.h) PACKAGE=x2serv -VERSION=5.1 +VERSION=5.2 AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_PREFIX_DEFAULT(.) Index: x2/doc/config.txt diff -u x2/doc/config.txt:1.1 x2/doc/config.txt:1.2 --- x2/doc/config.txt:1.1 Wed Mar 21 01:17:29 2001 +++ x2/doc/config.txt Sat Jun 14 13:24:18 2003 @@ -17,7 +17,7 @@ NUMERIC - X2 is P10, and this is the server numeric the service x2 connects as should use. This would be the same as the number at the end of the M: line in an ircd.conf. Every server on the network - must have a different numeric (1-63). + must have a different numeric (1-4095). IRCNICK - This is the nickname of the user that is created to interface with your users. Index: x2/source/commands.c diff -u x2/source/commands.c:1.174 x2/source/commands.c:1.175 --- x2/source/commands.c:1.174 Sat Jun 14 06:23:39 2003 +++ x2/source/commands.c Sat Jun 14 13:24:18 2003 @@ -224,9 +224,7 @@ { "DUMP", c_raw, NONE, 0, 0, 0, T, T }, { "RAW", c_raw, NONE, 0, 0, 0, T, T }, #endif -#ifndef AFTERNET /* we have a mode in our ircd for this */ { "GOD", c_god, NONE, 0, 0, 0, T, T }, -#endif { "BACKUP", c_backup, NONE, 0, 0, 0, T, T }, /* ... */ { NULL, null(int(*)()), 0, 0, 0, 0, 0, 0 } @@ -818,7 +816,6 @@ return(TRUE); } -#ifndef AFTERNET int c_god(C_PARAM) { if(uptr != NULL) @@ -846,7 +843,6 @@ return(FALSE); } } -#endif int c_whoami(C_PARAM) { @@ -894,8 +890,14 @@ strcat(modetmp, "k"); if (target->Modes & UMODEg) strcat(modetmp, "g"); + if (target->Modes & UMODEh) + strcat(modetmp, "h"); if (target->Modes & UMODEx) strcat(modetmp, "x"); + if (target->Modes & UMODEB) + strcat(modetmp, "B"); + if (target->Modes & UMODER) + strcat(modetmp, "R"); if (target->Modes & UMODEgod) strcat(modetmp, "(GOD)"); send_to_user(uptr, "\002 Modes : +%s\002", modetmp); @@ -1884,7 +1886,7 @@ if (target && IsOper(target)) send_to_user(uptr, "%s is an \002IRC Operator\002.", target->Nick); if (target && IsGodOper(target)) - send_to_user(uptr, "%s has \002security override (+h)\002 enabled.", target->Nick); + send_to_user(uptr, "%s has \002security override (GOD)\002 enabled.", target->Nick); if (target && IsModeK(target)) send_to_user(uptr, "%s is a \002no-kick service (+k)\002.", target->Nick); return(TRUE); Index: x2/source/config.h diff -u x2/source/config.h:1.73 x2/source/config.h:1.74 --- x2/source/config.h:1.73 Sat Jun 14 06:16:05 2003 +++ x2/source/config.h Sat Jun 14 13:24:18 2003 @@ -35,16 +35,16 @@ /* * Please do not remove the name 'X2' and the version from this reply. If you - * make modifications please use the format: 5.1+<yournet>.<yourversion> + * make modifications please use the format: 5.2+<yournet>.<yourversion> * Or, use one of the replies provided. Obviously theres no way for me * to enforce this, but I have put many hundreds of hours into this program * and I'd like to be able to tell whos using it and what version it is based * on. * [alternate replies] - * #define VERSION "X2 v5.1 - Channel and Oper services" - * #define VERSION "<YourNet> Channel services powered by Rubin's X2 version 5.1" + * #define VERSION "X2 v5.2 - Channel and Oper services" + * #define VERSION "<YourNet> Channel services powered by Rubin's X2 version 5.2" */ -#define VERSION "X2 v5.1 - AfterNET Channel Services" +#define VERSION "X2 v5.2 - AfterNET Channel Services" /* This is used to refer to your network in various places. It should be one word, eg "AfterNET" */ #define NETWORK "AfterNET" @@ -71,20 +71,6 @@ * #define debugon */ -/* Older afternet ircu had a mode (+g) added that made - * IRC Ops able to override X2 security (God mode) - * Current afternet ircu (runs universal ircu) uses - * +h for this (we call it helper). - * If your ircu does not support this, be sure to #undef - * AFTERNET below and choose an unused mode for this: - */ -#define OVERRIDEMODE "h" - -/* If your ircd does not have an override mode for use with X2 - * please undefine this so you can /msg X2 GOD on/off - */ -#define AFTERNET - /* If you dont want the word warez in channel names, define this. * TODO : This is a hack, and would do better in a config file. Do it! */ @@ -104,12 +90,6 @@ #define GLINEFILENAME "gline.dat" #define SUPERGLINEFILENAME "supergline.dat" -/* This is part of the on-connect probes; x2 sends a - * command to crash "fizzer" worms, this text is included - * to explain the probe to the users - */ -#define FIZZER_TEXT "Please pardon this check, it is a probe for 'fizzer' worm drones. Thanks ( )" - /* These are for the Wingate check. */ #define MAXGATESOCKS 20 #define GATECHECKTIMEOUT 60 @@ -220,6 +200,10 @@ /* These are for channel mode parsing */ #define NOMODES 0 +#define CMODEu 8192 +#define CMODEC 4096 +#define CMODEc 2048 +#define CMODEr 1024 #define CMODEe 512 #define CMODER 256 #define CMODEn 128 @@ -232,6 +216,8 @@ #define CMODEm 1 /* These are for User mode parsing.. */ +#define UMODEh 8192 +#define UMODEB 4096 #define UMODEaway 2048 #define UMODEgod 1024 #define UMODER 512 Index: x2/source/misc.c diff -u x2/source/misc.c:1.49 x2/source/misc.c:1.50 --- x2/source/misc.c:1.49 Sat Jun 14 06:16:05 2003 +++ x2/source/misc.c Sat Jun 14 13:24:18 2003 @@ -347,7 +347,7 @@ char buff[MAXLEN*4]; int hidepass = 0; /* global nick!user@host command rest [time] */ -/* #channel nick!user@host +h command rest [time] */ +/* #channel nick!user@host GOD command rest [time] */ if( ! (strcasecmp(command, "LOGIN") && strcasecmp(command, "RESETPASS") && strcasecmp(command, "MLOGIN") ) ) @@ -1157,7 +1157,7 @@ if(IsGodOper(uptr)) { level = 600; - send_to_user(uptr, "\002WARNING:\002 You are using HELP mode (+h) to over-ride channel security!"); + send_to_user(uptr, "\002WARNING:\002 You are using GOD mode to override channel security!"); } } return (level); @@ -1457,6 +1457,18 @@ break; case 'm': ModeNum = ModeNum | CMODEm; + break; + case 'r': + ModeNum = ModeNum | CMODEr; + break; + case 'u': + ModeNum = ModeNum | CMODEu; + break; + case 'c': + ModeNum = ModeNum | CMODEc; + break; + case 'C': + ModeNum = ModeNum | CMODEC; break; default: return (-1); Index: x2/source/parse.c diff -u x2/source/parse.c:1.79 x2/source/parse.c:1.80 --- x2/source/parse.c:1.79 Sat Jun 14 06:16:06 2003 +++ x2/source/parse.c Sat Jun 14 13:24:18 2003 @@ -56,6 +56,7 @@ { "Z", m_pong, TRUE, TRUE }, { "P", m_privmsg, FALSE, TRUE }, { "WC", m_noop, TRUE, TRUE }, + { "WV", m_noop, TRUE, TRUE }, { "S", m_server, TRUE, FALSE }, { "B", m_burst, TRUE, FALSE }, // wtf?? @@ -88,7 +89,12 @@ { "WA", m_noop, TRUE, TRUE }, { "R", m_noop, TRUE, TRUE }, { "SE", m_settime, TRUE, FALSE }, - { "AC", m_noop, TRUE, FALSE }, /* this won't be used in this service */ + { "AC", m_noop, TRUE, FALSE }, /* not used in X2 */ + { "WU", m_noop, TRUE, TRUE }, + { "LL", m_noop, TRUE, FALSE }, + { "SH", m_noop, FALSE, TRUE }, + { "OM", m_noop, TRUE, TRUE }, + { "CM", m_noop, TRUE, TRUE }, { NULL, NULL, FALSE, FALSE } }; /* *INDENT-ON* */ @@ -448,7 +454,6 @@ if(SUB7SCAN != 0) { send_ctcp(UserPtr, "CLIENTINFO"); send_ctcp(UserPtr, "VERSION"); - send_ctcp(UserPtr, "001PING %s", FIZZER_TEXT); } } } @@ -1398,7 +1403,7 @@ static char RemotePass[MAXPASS]; /* should be this or just '10'? */ Arg[0] = (char *) strtok(LineBuff, " "); /* sender numeric */ - Arg[1] = (char *) strtok(NULL, " "); + Arg[1] = (char *) strtok(NULL, " "); if(!strcmp(Arg[0], "PING")) { /* Respond with a ping reply */ @@ -1441,12 +1446,11 @@ return; } Debug(DBGINFO, "PROTOCOL: %s", Arg[5]); - if(strcmp(Arg[5], "J10")) /* If Arg5] is not "J10" then.. */ + if(strcmp(Arg[5], "J10")) /* If Arg[5] is not "J10" then.. */ { Debug(DBGWARNING, "UNKNOWN protocol. This is NOT a compatable irc daemon."); - Debug(DBGWARNING, "Currently X2 works with the following irc servers:"); - Debug(DBGWARNING, " Universal ircd - http://ircu.sourceforge.net"); - Debug(DBGWARNING, "OLD Undernet ircd - 2.10.07 and lower P10 versions."); + Debug(DBGWARNING, "Currently X2 works with the following IRC daemon(s):"); + Debug(DBGWARNING, "UnderNet IRCu - u2.10.11 and above - http://coder-com.undernet.org"); Debug(DBGWARNING, ""); Debug(DBGWARNING, "Making x2 work with other versions requires serious rewriting."); sleep(4); Index: x2/source/user.c diff -u x2/source/user.c:1.34 x2/source/user.c:1.35 --- x2/source/user.c:1.34 Thu Nov 8 00:21:08 2001 +++ x2/source/user.c Sat Jun 14 13:24:18 2003 @@ -1,4 +1,3 @@ - /* * X2 IRC Operator and Channel services * by Rubin (ru...@af...) @@ -549,11 +548,9 @@ case 'i': UserMode = UMODEi; break; -/* New afternet "GOD" mode +h (helper) */ case 'h': - UserMode = UMODEgod; + UserMode = UMODEh; break; -/* ircu hack2 notices +g */ case 'g': UserMode = UMODEg; break; @@ -565,6 +562,9 @@ break; case 'r': UserMode = UMODEr; + break; + case 'B': + UserMode = UMODEB; break; case 'R': UserMode = UMODER; ----------------------- End of diff ----------------------- |