diff -c -r -N irc2.8.21+CSr16/README.CS irc2.8.21+CSr17/README.CS *** irc2.8.21+CSr16/README.CS Tue Dec 19 21:15:29 1995 --- irc2.8.21+CSr17/README.CS Fri Dec 22 21:20:56 1995 *************** *** 1,3 **** --- 1,6 ---- + New in CSr17: + + 1) Updates for +TSora New in CSr16: diff -c -r -N irc2.8.21+CSr16/include/patchlevel.h irc2.8.21+CSr17/include/patchlevel.h *** irc2.8.21+CSr16/include/patchlevel.h Tue Dec 19 21:05:30 1995 --- irc2.8.21+CSr17/include/patchlevel.h Fri Dec 22 21:21:38 1995 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr16" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr17" #endif diff -c -r -N irc2.8.21+CSr16/include/struct.h irc2.8.21+CSr17/include/struct.h *** irc2.8.21+CSr16/include/struct.h Mon Dec 18 23:49:22 1995 --- irc2.8.21+CSr17/include/struct.h Fri Dec 22 21:17:47 1995 *************** *** 485,491 **** #define TS_CURRENT 1 /* current TS protocol version */ #define TS_MIN 1 /* minimum supported TS protocol version */ - #define TS_LEAVEIT 0x10000000 #define TS_DOESTS 0x20000000 #define DoesTS(x) ((x)->tsinfo == TS_DOESTS) --- 485,490 ---- diff -c -r -N irc2.8.21+CSr16/ircd/channel.c irc2.8.21+CSr17/ircd/channel.c *** irc2.8.21+CSr16/ircd/channel.c Tue Dec 19 21:24:55 1995 --- irc2.8.21+CSr17/ircd/channel.c Fri Dec 22 21:09:10 1995 *************** *** 1061,1069 **** whatt = 0; /* if it's a non-deopped non-op on a TS channel from a TS ! ** server, allow only deops and ignore everything else (to ! ** avoid "i deop you you deop me"-type desynchs) -orabidoo ! */ if (!ischop && isok) { Reg1 int i; --- 1061,1069 ---- whatt = 0; /* if it's a non-deopped non-op on a TS channel from a TS ! ** server, allow only ops and deops and ignore everything ! ** else (to avoid having desynched ops) -orabidoo ! */ if (!ischop && isok) { Reg1 int i; *************** *** 1071,1077 **** new = oldm.mode; for (i = 0, j = 0; i < opcnt; i++) ! if (chops[i].flags == (MODE_CHANOP | MODE_DEL)) chops[j++] = chops[i]; else count--; --- 1071,1077 ---- new = oldm.mode; for (i = 0, j = 0; i < opcnt; i++) ! if (chops[i].flags == (MODE_CHANOP|MODE_VOICE)) chops[j++] = chops[i]; else count--; *************** *** 1231,1238 **** if (c == 'o' && whatt == MODE_ADD && isdeop && !is_chan_op(lp->value.cptr, chptr)) set_deopped(lp, chptr); ! if ((ischop || (isok && c == 'o' && ! whatt == MODE_DEL)) && change_chan_flag(lp, chptr, MyClient(sptr))) { *mbuf++ = c; --- 1231,1237 ---- if (c == 'o' && whatt == MODE_ADD && isdeop && !is_chan_op(lp->value.cptr, chptr)) set_deopped(lp, chptr); ! if (isok && change_chan_flag(lp, chptr, MyClient(sptr))) { *mbuf++ = c; diff -c -r -N irc2.8.21+CSr16/ircd/s_bsd.c irc2.8.21+CSr17/ircd/s_bsd.c *** irc2.8.21+CSr16/ircd/s_bsd.c Mon Dec 18 21:01:59 1995 --- irc2.8.21+CSr17/ircd/s_bsd.c Fri Dec 22 21:12:08 1995 *************** *** 932,938 **** return -1; } if (!BadPtr(aconf->passwd)) ! sendto_one(cptr, "PASS :%s", aconf->passwd); aconf = find_conf(cptr->confs, cptr->name, CONF_NOCONNECT_SERVER); if (!aconf) --- 932,938 ---- return -1; } if (!BadPtr(aconf->passwd)) ! sendto_one(cptr, "PASS %s :TS", aconf->passwd); aconf = find_conf(cptr->confs, cptr->name, CONF_NOCONNECT_SERVER); if (!aconf) *************** *** 940,947 **** sendto_ops("Lost N-Line for %s", get_client_name(cptr,FALSE)); return -1; } - sendto_one(cptr, "SVINFO %d %d %d :%ld", TS_CURRENT, TS_MIN, - (ts_servcount() == 0 ? 1 : 0), (ts_val)time(NULL)+timedelta); sendto_one(cptr, "SERVER %s 1 :%s", my_name_for_link(me.name, aconf), me.info); if (!IsDead(cptr)) --- 940,945 ---- diff -c -r -N irc2.8.21+CSr16/ircd/s_serv.c irc2.8.21+CSr17/ircd/s_serv.c *** irc2.8.21+CSr16/ircd/s_serv.c Mon Dec 18 21:01:59 1995 --- irc2.8.21+CSr17/ircd/s_serv.c Fri Dec 22 21:16:06 1995 *************** *** 392,406 **** { Reg1 ts_val v; ! if (cptr != sptr || (!IsUnknown(cptr) && !IsHandshake(cptr)) || ! parc < 5 || TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN) return 0; if (atoi(parv[3])) v = (atol(parv[4]) - (ts_val)time(NULL) - timedelta) / 2; else v = atol(parv[4]) - (ts_val)time(NULL) - timedelta; ! cptr->tsinfo = (v ? v : (ts_val)TS_LEAVEIT); return 0; } --- 392,408 ---- { Reg1 ts_val v; ! if (!IsServer(sptr) || !MyConnect(sptr) || !DoesTS(sptr) || parc < 5 || ! TS_CURRENT < atoi(parv[2]) || atoi(parv[1]) < TS_MIN) return 0; if (atoi(parv[3])) v = (atol(parv[4]) - (ts_val)time(NULL) - timedelta) / 2; else v = atol(parv[4]) - (ts_val)time(NULL) - timedelta; ! ! if (ts_servcount() == 1) ! timedelta += v; return 0; } *************** *** 749,761 **** if (IsUnknown(cptr)) { if (bconf->passwd[0]) ! sendto_one(cptr,"PASS :%s",bconf->passwd); /* ** Pass my info to the new server */ - sendto_one(cptr, "SVINFO %d %d %d :%ld", TS_CURRENT, TS_MIN, - (ts_servcount() == 0 ? 1 : 0), - (ts_val)time(NULL) + timedelta); sendto_one(cptr, "SERVER %s 1 :%s", my_name_for_link(me.name, aconf), (me.info[0]) ? (me.info) : "IRCers United"); --- 751,760 ---- if (IsUnknown(cptr)) { if (bconf->passwd[0]) ! sendto_one(cptr,"PASS %s :%TS",bconf->passwd); /* ** Pass my info to the new server */ sendto_one(cptr, "SERVER %s 1 :%s", my_name_for_link(me.name, aconf), (me.info[0]) ? (me.info) : "IRCers United"); *************** *** 779,791 **** *s = '@'; } ! if (cptr->tsinfo && cptr->tsinfo != (ts_val)TS_LEAVEIT && ! !DoesTS(cptr) && ts_servcount() == 0) ! timedelta += cptr->tsinfo; ! ! if (cptr->tsinfo) ! cptr->tsinfo = TS_DOESTS; ! det_confs_butmask(cptr, CONF_LEAF|CONF_HUB|CONF_NOCONNECT_SERVER); /* ** *WARNING* --- 778,788 ---- *s = '@'; } ! if (DoesTS(cptr)) ! sendto_one(cptr, "SVINFO %d %d %d :%ld", TS_CURRENT, TS_MIN, ! (ts_servcount() == 0 ? 1 : 0), ! (ts_val)time(NULL) + timedelta); ! det_confs_butmask(cptr, CONF_LEAF|CONF_HUB|CONF_NOCONNECT_SERVER); /* ** *WARNING* diff -c -r -N irc2.8.21+CSr16/ircd/s_user.c irc2.8.21+CSr17/ircd/s_user.c *** irc2.8.21+CSr16/ircd/s_user.c Mon Dec 18 22:41:33 1995 --- irc2.8.21+CSr17/ircd/s_user.c Fri Dec 22 21:17:31 1995 *************** *** 709,720 **** me.name, parv[0]); return 0; } ! if (!IsServer(sptr) && IsServer(cptr)) ! if (parc > 2) ! newts = atol(parv[2]); ! else ! newts = sptr->tsinfo; ! else if (parc > 3 && IsServer(cptr)) newts = atol(parv[3]); doests = (IsServer(cptr) && DoesTS(cptr)); --- 709,717 ---- me.name, parv[0]); return 0; } ! if (!IsServer(sptr) && IsServer(cptr) && parc > 2) ! newts = atol(parv[2]); ! else if (IsServer(sptr) && parc > 3) newts = atol(parv[3]); doests = (IsServer(cptr) && DoesTS(cptr)); *************** *** 877,883 **** ** A new NICK being introduced by a neighbouring ** server (e.g. message type "NICK new" received) */ ! sameuser = (parc > 5) && mycmp(acptr->user->username, parv[5]) == 0 && mycmp(acptr->user->host, parv[6]) == 0; if (!doests || !newts || !acptr->tsinfo --- 874,880 ---- ** A new NICK being introduced by a neighbouring ** server (e.g. message type "NICK new" received) */ ! sameuser = (parc > 6) && mycmp(acptr->user->username, parv[5]) == 0 && mycmp(acptr->user->host, parv[6]) == 0; if (!doests || !newts || !acptr->tsinfo *************** *** 1052,1073 **** ** on a channel, send note of change to all clients ** on that channel. Propagate notice to other servers. */ ! if (mycmp(parv[0], nick) || (!MyClient(sptr) && parc > 2 && ! newts < sptr->tsinfo)) sptr->tsinfo = newts ? newts : (ts_val)time(NULL) + timedelta; sendto_common_channels(sptr, ":%s NICK :%s", parv[0], nick); if (sptr->user) add_history(sptr); ! if (sptr->tsinfo) ! { ! sendto_TS_serv_butone(1, cptr, ":%s NICK %s :%ld", ! parv[0], nick, sptr->tsinfo); ! sendto_TS_serv_butone(0, cptr, ":%s NICK :%s", parv[0], ! nick); ! } ! else ! sendto_serv_butone(cptr, ":%s NICK :%s", parv[0], nick); #ifdef USE_SERVICES check_services_butone(SERVICE_WANT_NICK, sptr, ":%s NICK :%s", parv[0], nick); --- 1049,1064 ---- ** on a channel, send note of change to all clients ** on that channel. Propagate notice to other servers. */ ! if (mycmp(parv[0], nick)) sptr->tsinfo = newts ? newts : (ts_val)time(NULL) + timedelta; sendto_common_channels(sptr, ":%s NICK :%s", parv[0], nick); if (sptr->user) add_history(sptr); ! sendto_TS_serv_butone(1, cptr, ":%s NICK %s :%ld", ! parv[0], nick, sptr->tsinfo); ! sendto_TS_serv_butone(0, cptr, ":%s NICK :%s", parv[0], ! nick); #ifdef USE_SERVICES check_services_butone(SERVICE_WANT_NICK, sptr, ":%s NICK :%s", parv[0], nick); *************** *** 2325,2330 **** --- 2316,2322 ---- ** m_pass ** parv[0] = sender prefix ** parv[1] = password + ** parv[2] = optional extra version information */ int m_pass(cptr, sptr, parc, parv) aClient *cptr, *sptr; *************** *** 2346,2351 **** --- 2338,2352 ---- return 0; } strncpyzt(cptr->passwd, password, sizeof(cptr->passwd)); + if (parc > 2) + { + int l = strlen(parv[2]); + + if (l < 2) + return 0; + if (strcmp(parv[2]+l-2, "TS") == 0) + cptr->tsinfo = (ts_val)TS_DOESTS; + } return 0; }