Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv862/src
Modified Files:
chanserv.c hash.h proto-bahamut.c proto-p10.c
Log Message:
support +c, +C channel modes (from ircu-asuka)
add +R channel mode support to Bahamut (I hope)
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.280
retrieving revision 1.281
diff -C2 -r1.280 -r1.281
*** chanserv.c 8 Sep 2002 04:26:27 -0000 1.280
--- chanserv.c 9 Sep 2002 19:13:50 -0000 1.281
***************
*** 921,924 ****
--- 921,926 ----
case 'D': lock_mode(MODE_DELAYJOINS); break;
case 'r': lock_mode(MODE_REGONLY); break;
+ case 'c': lock_mode(MODE_NOCOLORS); break;
+ case 'C': lock_mode(MODE_NOCTCPS); break;
case 'l':
if(lock)
***************
*** 1002,1005 ****
--- 1004,1009 ----
if(mode & MODE_DELAYJOINS) buffer[pos++] = 'D';
if(mode & MODE_REGONLY) buffer[pos++] = 'r';
+ if(mode & MODE_NOCOLORS) buffer[pos++] = 'c';
+ if(mode & MODE_NOCTCPS) buffer[pos++] = 'C';
/* parse_mode_lock() restricts limit to positive numbers. */
Index: hash.h
===================================================================
RCS file: /cvsroot/srvx/services/src/hash.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -r1.91 -r1.92
*** hash.h 23 Aug 2002 04:49:38 -0000 1.91
--- hash.h 9 Sep 2002 19:13:51 -0000 1.92
***************
*** 25,43 ****
#include "dict.h"
! #define MODE_CHANOP 0x0001
! #define MODE_VOICE 0x0002
! #define MODE_PRIVATE 0x0004
! #define MODE_SECRET 0x0008
! #define MODE_MODERATED 0x0010
! #define MODE_TOPICLIMIT 0x0020
! #define MODE_INVITEONLY 0x0040
! #define MODE_NOPRIVMSGS 0x0080
! #define MODE_KEY 0x0100
! #define MODE_BAN 0x0200
! #define MODE_LIMIT 0x0400
! #define MODE_DELAYJOINS 0x0800
! #define MODE_REGONLY 0x1000
!
! #define CHANNEL_MODES (MODE_PRIVATE | MODE_SECRET | MODE_MODERATED | MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS | MODE_KEY | MODE_LIMIT | MODE_DELAYJOINS | MODE_REGONLY)
#define FLAGS_OPER 0x0001 /* Operator +O */
--- 25,43 ----
#include "dict.h"
! #define MODE_CHANOP 0x0001 /* +o */
! #define MODE_VOICE 0x0002 /* +v */
! #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 /* +r */
! #define MODE_NOCOLORS 0x2000 /* +c */
! #define MODE_NOCTCPS 0x4000 /* +C */
#define FLAGS_OPER 0x0001 /* Operator +O */
Index: proto-bahamut.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-bahamut.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** proto-bahamut.c 8 Sep 2002 04:32:11 -0000 1.22
--- proto-bahamut.c 9 Sep 2002 19:13:51 -0000 1.23
***************
*** 450,454 ****
irc_svsnick(struct userNode *from, struct userNode *target, const char *newnick)
{
! putsock(":%s " P10_SVSNICK " %s %s :"FMT_TIME_T, from->nick, target->nick, newnick, now);
}
--- 450,454 ----
irc_svsnick(struct userNode *from, struct userNode *target, const char *newnick)
{
! putsock(":%s SVSNICK %s %s :"FMT_TIME_T, from->nick, target->nick, newnick, now);
}
***************
*** 1111,1114 ****
--- 1111,1116 ----
do_chan_mode(MODE_KEY, 'k');
do_chan_mode(MODE_LIMIT, 'l');
+ do_chan_mode(MODE_REGONLY, 'R');
+ do_chan_mode(MODE_NOCOLORS, 'c');
#undef do_chan_mode
if (chan->modes & MODE_KEY) pos += sprintf(out+pos, " %s", chan->key);
***************
*** 1244,1247 ****
--- 1246,1251 ----
case 'm': do_chan_mode(MODE_MODERATED); break;
case 'D': do_chan_mode(MODE_DELAYJOINS); break;
+ case 'R': do_chan_mode(MODE_REGONLY); break;
+ case 'c': do_chan_mode(MODE_NOCOLORS); break;
#undef do_chan_mode
case 'l':
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** proto-p10.c 8 Sep 2002 04:32:12 -0000 1.30
--- proto-p10.c 9 Sep 2002 19:13:52 -0000 1.31
***************
*** 1883,1886 ****
--- 1883,1888 ----
do_chan_mode(MODE_DELAYJOINS, 'D');
do_chan_mode(MODE_REGONLY, 'r');
+ do_chan_mode(MODE_NOCOLORS, 'c');
+ do_chan_mode(MODE_NOCTCPS, 'c');
#undef do_chan_mode
if (chan->modes & MODE_KEY) pos += sprintf(out+pos, " %s", chan->key);
***************
*** 2019,2022 ****
--- 2021,2026 ----
case 'D': do_chan_mode(MODE_DELAYJOINS); break;
case 'r': do_chan_mode(MODE_REGONLY); break;
+ case 'c': do_chan_mode(MODE_NOCOLORS); break;
+ case 'C': do_chan_mode(MODE_NOCTCPS); break;
#undef do_chan_mode
case 'l':
***************
*** 2167,2170 ****
--- 2171,2175 ----
MODE_DELAYJOINS, 'D',
MODE_REGONLY, 'r',
+ MODE_NOCTCPS, 'C',
0x0, 0x0
};
|