Commit graph

44 commits

Author SHA1 Message Date
megubyte cad61c9d1a
m_invite: send message tags (#173) 2021-06-05 15:57:03 +01:00
Ed Kellett d4f7eb4ce6
Replace most checks for +o with oper:general
I'm preparing to PR a succession of privs changes with the ultimate goal
of severely limiting the scope of the binary oper/user dichotomy and
move conceptually distinct oper functions into their own privs.

Accomplishing this is a non-trivial task, and can wait, but it's
inconvenient now to have such functions enabled by the same mechanism
that grants any privs at all--so I'm moving all of them to a
transitional priv with the intention of eroding that later.
2020-08-04 22:58:30 +01:00
Ariadne Conill 98ac35197b invite: remove hardcoded callerid logic 2020-07-09 16:06:33 -06:00
Aaron Jones b41d97e9ab
m_invite: remove redundant block of code missed by review
I missed this due to refactoring in #341. This function is already
called by the same function we're already in, just further down.

[ci skip]
2020-06-27 14:45:02 +00:00
Ariadne Conill 27590ae0b4 invite: revert the ERR_CHANOPRIVSNEEDED change too 2020-06-26 14:24:26 -06:00
Ariadne Conill e3c27d7dbd Revert "invite: rework the way can_invite hook is called"
This reverts commit ed06fed70a67b0cdd4e53aad575fca7b9d046061.
2020-06-26 14:24:21 -06:00
Ariadne Conill ddb063e2f9 invite: remove redundant parenthesis 2020-06-26 13:58:00 -06:00
Ariadne Conill 4371dcbd55 invite: rework the way can_invite hook is called 2020-06-26 13:57:22 -06:00
Ariadne Conill 0b8910e40b invite: remove hardcoded UMODE_REGONLYMSG code 2020-06-26 11:56:40 -06:00
Ed Kellett f0e4d607c9
m_invite: Don't punch through +g 2020-06-21 14:08:24 +01:00
Ed Kellett 91ccda4f8c
Fix invite-notify and move it to an extension
The existing approach to invite-notify is deeply flawed--it currently
notifies only the target user's server, and that can't be fixed without
sending notifies for invites that end up not happening.

I'm resolving this by broadcasting a second message, INVITED, from the
target user's server. I'm also pulling it out into an extension while
I'm at it--invite notifies reveal new information, so I don't think
they should be mandatory.
2020-04-30 18:17:00 +01:00
Ed Kellett e0622d7519
m_invite: Add hooks
can_invite is called on the source server, can override channel access
invite is called on the target
2020-04-30 18:16:59 +01:00
Simon Arlott 4b1cce65ed
ircd: send tags on every message
Simplify linebuf by introducing fsnprint to manage a list of printfs.
Add a msgbuf unparse cache for send functions that loop.
2017-08-06 16:21:29 +01:00
William Pitcock f88fd40fe9 invite: do not send duplicate invite messages (closes #194) 2016-06-16 20:21:42 -05:00
Elizabeth Myers 79435744c7 common.h: raison d'être is gone, so out it goes.
Fold whatever was left into ircd_defs.h
2016-03-23 09:33:56 -05:00
Elizabeth Myers 3c7d6fcce7 Message handlers should return void.
Also fix up some return values and stuff to use bool (or void if
nothing). I just did it whilst I was here.

According to jilles, the return value used to signify whether or not the
client had exited. This was error-prone and was fixed a long, long time
ago, but the return value was left int for historical reasons.

Since the return type is not used (and has no clear use case anyway),
it's safe to just get rid of it.
2016-03-09 01:37:03 -06:00
Elizabeth Myers eeabf33a7c Move module description headers to the top
This is cleaner.

Note this was broken out of a much larger piece of work I did, so if
there's any problems, I apologise!
2016-03-09 01:29:41 -06:00
Elizabeth Myers df1f1212a8 m_invite: update for AV2 2016-03-07 02:09:21 -06:00
Elizabeth Myers 105a4985b4 Migrate remaining modules to AV2
No descriptions yet. :(
2016-03-07 00:03:39 -06:00
Elizabeth Myers cbeab4bc34 Remove $Id tags from everything.
These are obsolete and none have changed since 10 years gao...
2016-03-06 02:47:27 -06:00
William Pitcock 4c83e47679 invite: implement invite-notify support 2016-03-05 02:49:10 -06:00
William Pitcock d058096aaa invite: broadcast INVITE messages instead of using point to point routing, to facilitate invite-notify 2016-03-05 02:39:42 -06:00
William Pitcock 7baa37a9ef msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag. 2016-02-19 16:43:39 -06:00
William Pitcock 428ca87b01 modules: chase MsgBuf API change 2016-02-10 20:54:17 -06:00
William Pitcock 95cce5f358 Revert "m_invite: add support for CAP invite-notify"
This reverts commit 93eb76cc32.
2015-02-16 17:50:51 -06:00
Max Teufel 93eb76cc32 m_invite: add support for CAP invite-notify
Specification:
<https://github.com/ircv3/ircv3-specifications/blob/master/extensions/invite-notify-3.2.md>
2015-02-16 15:40:34 -06:00
Keith Buck 55abcbb20a Remove trailing whitespace from all .c and .h files.
3134 bytes were removed.
2014-03-03 04:25:47 +00:00
Jilles Tjoelker b5d9427a78 invite: Remove useless IsChannelName check. 2011-06-25 11:34:16 +02:00
Jilles Tjoelker 0cce7774d5 Subject /invite to umodes +g and +R.
The behaviour is the same as /msg except that where
/msg would send RPL_UMODEGMSG to the user, the /invite
is instead let through. This counts as a notification
for caller_id_wait like RPL_UMODEGMSG.

Checks are on the target user's server, which means an
error message will appear after RPL_INVITING.
This must be because the accept list is not globally
known.
2010-02-15 23:07:14 +01:00
Jilles Tjoelker 40b79a3908 Add missing return value. 2010-02-15 22:18:00 +01:00
Jilles Tjoelker 890af0e7c5 Subject /invite to target change.
Similar to /msg, inviting a user that is not in a channel
you have op or voice in requires a free target; opers always
have a free target.

Being invited adds the source as a reply target.
2010-02-15 22:08:55 +01:00
Stephen Bennett c127b45b83 Revert all presence-related changes 2009-12-08 19:22:55 +00:00
William Pitcock 884b5d41c1 presence: Remove user.away, replaced by a metadata entry.
Cache the metadata retrieval value where feasible for minimal performance impact.
2009-06-02 02:03:51 -05:00
Jilles Tjoelker 18fc47e681 Disallow invites to juped channels.
In particular, this is checked when the source is
local and not resv_exempt, or the target is local and
not resv_exempt.
2009-02-06 14:07:03 +01:00
Jilles Tjoelker 161f040940 Update comments for parv[0] removal. 2009-01-18 18:22:43 +01:00
Valery Yatsko 4562c60489 irc_string.h -> match.h, irc_string.h; includes changed 2008-04-20 09:47:38 +04:00
Valery Yatsko 81af5bcb39 libcharybdis includes gone. 2008-04-02 02:39:19 +04:00
Jilles Tjoelker 7018b86a12 More changes for libratbox. 2008-04-01 23:11:11 +02:00
William Pitcock 5b96d9a6b9 start making this compile 2008-04-01 15:18:48 -05:00
Jilles Tjoelker 8c39f0bf04 Fix a UID leak. 2008-02-04 23:56:13 +01:00
jilles 0482ebf7b6 [svn] Target left IRC (more friendly error message if a UID
cannot be found) for /invite.
2007-05-06 07:46:45 -07:00
jilles 1ebf4db4c6 [svn] Allow /invite (but not invex) to override +r, +l, +j in
addition to +i. As before, a restrictive mode must be in
place at /invite time for the invite to have an effect;
+r does not count as a restrictive mode if the user is
logged in; +l and +j always count as restrictive modes to
allow for cases where they would allow join at /invite
time but not when the user tries to join.
2007-03-15 11:09:08 -07:00
jilles 307328bb13 [svn] Remove invite_ops_only, forcing it to YES. 2007-03-13 09:09:28 -07:00
nenolod 212380e3f4 [svn] - the new plan:
+ branches/release-2.1 -> 2.2 base
  + 3.0 -> branches/cxxconversion
  + backport some immediate 3.0 functionality for 2.2
  + other stuff
2007-01-24 22:40:21 -08:00