Skip to content

Conversation

@jhoneycutt
Copy link
Contributor

If a client sets mode +R, unauthenticated clients will receive an error when trying to privmsg, cprivmsg, notice, cnotice, or invite them. The message will be something like:

:London.UK.Eu.UnderNet.org 477 charlie alice :You need to be identified to a
registered account to contact this user -- you can obtain an account from
http://cservice.undernet.org/live/

This is the same numeric used when unauthed users try to join a +r channel, matching InspIRCd.

If a client sets mode +R, unauthenticated clients will receive an error when
trying to privmsg, cprivmsg, notice, cnotice, or invite them. The message will
be something like:

:London.UK.Eu.UnderNet.org 477 charlie alice :You need to be identified to a
  registered account to contact this user -- you can obtain an account from
  http://cservice.undernet.org/live/

This is the same numeric used when unauthed users try to join a +r channel,
matching InspIRCd.

/** Clear the client's net.burst in-progress flag. */
#define ClearBurst(x) ClrFlag(x, FLAG_BURST)
#define ClearBurst(x) ClrFlag(x, FLAG_BURST)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revise this to not touch whitespace on lines that don't have text changes?

if (is_silenced(source, dest))
return 0;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... although I think this whitespace cleanup is fine.

if (IsServer(source) || IsChannelService(source))
return 0;

return IsBlockUnauthUsers(dest) && !IsAccount(source);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably a little clearer and faster to write this whole function as (with line wrapping where appropriate):

return IsBlockUnauthUsers(dest) && !(IsAccount(source) || IsChannelService(source) || IsServer(source));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants