Commit Graph

95 Commits

Author SHA1 Message Date
Sam Dodrill 1ac5b0570e replace rb_snprintf with system snprintf 2014-12-15 20:39:52 -08:00
Sam Dodrill 63a50eaabc naiive s/rb_sprintf/sprintf/g 2014-12-15 20:34:55 -08:00
Sam Dodrill 5ba9c76d22 src/chmode: treat invex/ban/quiet/exception discretely
Also prevents unneeded O(n) check of all kinds of list-bans to see if
the list has overflowed and prevents hard-coding of list-like channel
modes in the daemon to allow for future expansion.
2014-10-27 16:07:27 -07:00
Sam Dodrill 9890a48cd9 Change all code to a consistent style
We use the Linux Kernel format now.
2014-08-03 10:38:55 -07:00
Sam Dodrill 050ea2b809 Add channel mode +u to hide banlists
Banlists are silently hidden from all non-halfops or up. Bans still may
be seen as normally. This mode is entirely opt-in.
2014-05-28 19:36:14 -07:00
Sam Dodrill aa294a3a54 Support for channel owner mode added
This is a lot like the previous channel owner mode patch, except the
documentation that previously said "admin" now says "owner" in comments.

src/channel: Kicking logic for owner mode fixed

src/channel: Document the kick/deop logic

decruft: remove temporary files
2013-09-13 11:45:38 -07:00
Sam Dodrill 3189f0761b Merge commit a4db1558bf2b5ca931bd89e4507505a61df06738
Work around a bug in GCC's loop optimization.

Or maybe it's undefined behavior in our C. Or maybe both. Either way,
it wasn't broken before, and now it is. So this fixes it.
2013-09-09 17:23:34 -07:00
JD Horelick 01a8417f75 When setting/unsetting cmode +M, only wallops once, not for every server on the network. 2011-05-15 14:01:07 -04:00
JD Horelick 2f24d19944 Fix some warnings. 2011-01-19 15:59:30 -05:00
B.Greenham 0258787d5d Fix small bug in the VERSION/RPL_MYINFO stuff, as pointed out by init. 2011-01-19 11:28:16 -05:00
JD Horelick 0284952c9f Move cmode +N to cmode +d, so that extensions/m_roleplay can retain cmode +N and maintain a consistent interface with charybdis. 2011-01-19 23:40:21 -05:00
William Pitcock 359d4d5b20 chmode: Remove chm_regonly, a vestige from ratbox which doesn't apply to native charybdis (or shadowircd) networks. 2010-12-06 23:51:14 -05:00
JD Horelick ab72b3e800 Wallops (and log) upon setting/unsetting of +M or any hidden chmode.
(+M is currently the only hidden chmode)
2010-11-22 13:14:02 -05:00
B.Greenham 07db71cda0 Fix VERSION and RPL_MYINFO to only show modes that are enabled. Also fix up some errors from the last commit. 2010-10-11 16:35:18 -04:00
B.Greenham b7262e0cce Return an error upon trying to set orphaned cmode, rather than just silently ignoring the mode command. 2010-10-11 14:27:47 -04:00
B.Greenham e0b0e08d25 Fix a bug that allowed users to set forwards to channels they lack ops in (and not set forwards to channels they have ops in). 2010-07-28 20:26:13 -04:00
B.Greenham 4023293674 Merge. 2010-10-11 11:58:39 -04:00
B.Greenham 90728edb58 Backed out changeset 3097ade953f5
Backout modesets.

They're overly invasive and a bit uglier than is required.
The same thing can be accomplished in a better way with another method.
2010-10-11 11:58:21 -04:00
Jilles Tjoelker cc2a7258f1 Send only one ERR_MLOCKRESTRICTED per MODE command.
This agrees with other error messages from MODE.
2010-08-24 23:03:23 +02:00
William Pitcock fc579e36e7 Enforce TS rules on MLOCKs. 2010-08-23 20:22:59 -05:00
William Pitcock c95fc52d5a Send numeric 735 on MLOCK policy-restricted mode changes that are ignored. 2010-08-23 19:04:46 -05:00
B.Greenham 1fe75e33cc mode api: Remove most modes from the chmode_table, and have them initialized in modeset files.
Modeset files are modules stored in shadowircd/modes. All they do is initalize
a set of modes on load, and orphan said modes on unload.

All cmodes not included in ircd-ratbox are now located in modeset files, rather
than being in the core. These modes no longer simply use defines, their
locations are stored in a the new struct module_modes. Each of these is set
when intializing the mode in the modeset files, and set to 0 when orphaning
the mode upon unloading the modeset file.

In addition, use_forward has been removed, as it is now obsoleted by modesets.
2010-07-02 19:09:46 -04:00
JD Horelick 133755685e Removal of ancient SVN ID's part one 2010-06-10 21:22:44 -04:00
Stephen Bennett c554add299 Allow the final parameter of MLOCK to be empty, to remove an existing mlock 2010-05-02 20:42:46 +01:00
Stephen Bennett b72bd23a03 Rework ircd-side MLOCK enforcement: instead of trying to track modes locked on or off, instead keep a simple list of mode letters that are locked, and reject any change to those modes. 2010-04-30 22:01:21 +01:00
JD Horelick f0e0e5672d Backed out changeset 9bd802724b74 2010-05-21 04:08:05 -04:00
JD Horelick 446c7d4f57 Remove +J chmode (KICKNOREJOIN) 2010-05-21 03:29:07 -04:00
JD Horelick 015b28a06c Branch Merge 2010-04-04 16:25:20 -04:00
Jilles Tjoelker 6795400d0a New custom channel mode API allowing reloading such modules.
Additionally, attempting to use too many modes or two times
the same letter is now detected and prevented.

Modules now request that a channel mode be added/orphaned,
instead of ugly manipulation from which that request had
to be guessed.

Slight changes are needed to modules that provide channel modes.
From the old API, one important function has been made static,
the other important function has been renamed, so loading old
modules should fail safely.
2010-04-01 01:16:16 +02:00
B.Greenham 92b26e74a9 Make chm_staff (staff only modes) only settable if you have ops in the channel in question.
If operators need to set such modes in a channel where they don't have ops, that's what override/omode are for.
2010-03-31 11:22:32 -04:00
William Pitcock e7c34075dd chm_simple(): enforce MLOCK 2010-03-07 23:15:52 -06:00
William Pitcock 28805dc5fc Add propagation of MLOCK state for simple modes.
Special modes like +j can be tracked easily just by adding the necessary
code to parse them to set_channel_mlock().  This will cover propagation
as well.
2010-03-07 23:13:39 -06:00
Alexander F?r?y 360742bdf4 Use RPL_QUIETLIST and RPL_ENDOFQUIETLIST instead of RPL_BANLIST and
RPL_ENDOFBANLIST for channel mode +q.
2010-02-27 01:08:41 +01:00
JD Horelick 71ea606903 Make override WALLOPS actually send netwide this time. 2010-03-07 23:22:07 -05:00
B.Greenham c1c91f9438 s/owner/admin/ throughout the source code and docs. 2010-03-07 23:18:39 -05:00
JD Horelick 34d8ef4d14 Change all override snotes to wallops to match m_o* and to
make it a lot more obvious when a oper is using override.
2010-03-07 22:42:51 -05:00
JD Horelick c809010b89 Make +-a give you the appropriate error message if you don't have
the proper privs.
2010-03-07 21:57:00 -05:00
B.Greenham bc4764aefd Looks like irc_dictionary things cannot support more than one key with the same value. Therefore, a rework of +J and OACCEPT's metadata are required to make them work properly with multiple users. 2010-03-06 19:22:59 -05:00
JD Horelick a039358ed0 Fix a typo 2010-03-05 19:18:38 -05:00
B.Greenham 67cecc2b22 Should just specify the name here. 2010-03-05 19:16:27 -05:00
B.Greenham 8e3b2b85c7 Clean up cmode norepeat's metadata when unsetting +K. 2010-03-05 19:10:24 -05:00
B.Greenham 2f39232fab Fix the 'mode changes appear multiple times' bug. 2010-03-05 18:49:57 -05:00
B.Greenham d3b90aaad3 Clean up +J to work nicely and properly. 2010-03-05 13:45:01 -05:00
JD Horelick 3da167f207 Really fix the ugly-ass desync by re-adding some code i accidentally
deleted on the first chmode.c override commit.
2010-03-04 04:28:53 -05:00
JD Horelick e853274c16 Fix a warning which may fix a real ugly desync.
If this doesn't fix the desync, i have an idea of how to do so.
2010-03-04 04:22:14 -05:00
JD Horelick cb097b8840 Don't discard self-oppings from remote override opers.
There's a small chance this could be incorrect.

Also, the final set of override cleanups.
2010-03-03 15:34:57 -05:00
JD Horelick 1cdd8fdfd7 Framework for hidden (only opers can see/set them) chmodes.
The first one of these is +M and the actual extension which handles
+M will be added next commit.
2010-03-03 14:35:54 -05:00
JD Horelick b869e117f0 Woohoo! Override is complete barring a few possible cleanups in the futures. 2010-03-03 14:11:53 -05:00
JD Horelick 4ed822ed95 Add override support to ban/quiet, owner, op, halfop and voice. 2010-03-03 13:52:31 -05:00
JD Horelick eccd1c58d2 Initial support for 'noisy' oper-override of channel modes, using omode-type code. Supports simple modes at present. 2010-03-02 19:54:59 -05:00