-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement /away and /back commands #745
Conversation
2648956
to
f24f707
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I guess my only issue is that I'm not sure why we want to do "/away" not set you as back, when (as far as I can see) that is the irc standard, apart from hexchat.
if (cmd === "away") { | ||
let reason = " "; | ||
|
||
if (args.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, why do we need to set away if there is no message? That doesn't seem to be part of the standard.
https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands#AWAY
I'm not sure how I feel about this breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YaManicKill, did you mean this because when user types /away
, the command that gets sent is network.irc.raw("AWAY", " ");
and therefore user is marked as away even with no reason given?
I am actually happy with having a way to get away without giving a specific reason, but I definitely see your point. IMO, we have 2 options:
- Current option:
/away <message>
that does what it says, marks you as away, with an optional reason./back
that sets you "unaway". - Close-to-the-protocol option:
/away message
sets you away with a reason,/away
sets you back.
I have looked at other popular IRC clients and both options exist. That being said, most IRC clients out there have a terrible UX and I think The Lounge setting a higher and more modern bar on that end is a really good thing.
Overall, I am OK with both options, but I tend to like @xPaw's as it's simpler to use (and it's not entirely unexpected either, while having to type /away
to set oneself back is rather counter-intuitive). I don't care to not reproduce the protocol 1:1 because it's a client, not a library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean this because when user types /away, the command that gets sent is network.irc.raw("AWAY", " "); and therefore user is marked as away even with no reason given?
Yes, I did mean this.
I'm very against it because the standard is that "/away" sets you as unaway. I am very strongly for standards, why have a standard if we are going to ignore it?
https://tools.ietf.org/html/rfc1459#section-5.1
I do agree with you on the UX side of things, but we shouldn't just unilaterally ignore the standard because we don't agree with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very against it because the standard is that "/away" sets you as unaway. I am very strongly for standards, why have a standard if we are going to ignore it?
Not exactly. While I am myself very much into standardization (just look at my resume lol), this is a protocol, not a standard. The former ensures machine-to-machine compatibility while the latter is more often designed for humans.
In this case, we are talking about a de facto standard, a convention. And the reason for this debate is because we are seeing 2 of these: one with /away [message]
//back
and one with /away message
//away
.
Similarly, if we really wanted The Lounge to talk the same language than the protocol, we would use AWAY
and not /away
but starting with a slash is a convention so well spread that it makes sense to do it. (As far as I know, starting a command with a slash is not part of the protocol). We also send private messages without starting with PRIVMSG
. While it would be terrible to do anything else, that's still a difference between client usage and protocol.
I do agree with you on the UX side of things, but we shouldn't just unilaterally ignore the standard because we don't agree with it.
We're not ignoring the protocol nor the conventions. If there were no other consequences or if /away
setting you away was not used by any other IRC clients out there, I'd agree with you. But to me, and that's the main reason why I'm in favor of @xPaw's solution, typing /away
to remove the away status is completely counter-intuitive and I would not be surprised if that was why so many other clients are going with the same solution.
In short, I definitely agree with you that following the protocol and conforming to standards are very important but we are not ignoring them right now. However, for a client designed to humans, proper UX should not be affected by these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine. I think it's confusing, personally, but I'm unlikely to ever use it (I'll probably use the auto-away feature once that is in) so I'll bend to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly the auto-unaway thing, and /back
vs. /unaway
.
return; | ||
} | ||
|
||
network.irc.raw("AWAY"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand properly, this will be executed whatever the input. If so, that would act as an auto-unaway so that if I send a message while away, this marks me as not away anymore.
I don't like this too much: I have seen many times people sending messages while away, kind of a "do not disturb" mode. I don't see why we would force the unaway even when user doesn't ask it.
I have been out of the game a couple months, am I misunderstanding something? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cant reply above... I think /away should set away without message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@astorije that's only run on /back command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaah, I did not realize that this file was handling both 🤦
Reason why I was confused by this: Not long ago, all input files were being called when sending something, one by one, and at that time they were all starting with a check that the command being sent was the one from the file. I forgot we improved that to lookup for the exact command instead.
Prior to that change, I think that line would have been run whatever input was being sent.
So I think we're all good here, let me know if I'm in the wrong again lol.
if (cmd === "away") { | ||
let reason = " "; | ||
|
||
if (args.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YaManicKill, did you mean this because when user types /away
, the command that gets sent is network.irc.raw("AWAY", " ");
and therefore user is marked as away even with no reason given?
I am actually happy with having a way to get away without giving a specific reason, but I definitely see your point. IMO, we have 2 options:
- Current option:
/away <message>
that does what it says, marks you as away, with an optional reason./back
that sets you "unaway". - Close-to-the-protocol option:
/away message
sets you away with a reason,/away
sets you back.
I have looked at other popular IRC clients and both options exist. That being said, most IRC clients out there have a terrible UX and I think The Lounge setting a higher and more modern bar on that end is a really good thing.
Overall, I am OK with both options, but I tend to like @xPaw's as it's simpler to use (and it's not entirely unexpected either, while having to type /away
to set oneself back is rather counter-intuitive). I don't care to not reproduce the protocol 1:1 because it's a client, not a library.
@@ -15,6 +17,7 @@ $(function() { | |||
"/join", | |||
"/kick", | |||
"/leave", | |||
"/me", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this fixing an unrelated bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
@@ -6,6 +6,8 @@ $(function() { | |||
var path = window.location.pathname + "socket.io/"; | |||
var socket = io({path: path}); | |||
var commands = [ | |||
"/away", | |||
"/back", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know other clients use /back
, but I lean more towards /unaway
. For one, /back
is a very generic word and we might want to keep it for later. But more importantly, it's more consistent with other "toggle" actions we have: /op
vs. /deop
, /voice
vs. /devoice
, /connect
vs. /disconnect
, etc.
Since it's not dictacted by the protocol anyway, we have the freedom to do what we want :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think both might be good to have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather have only one and we agree on it. It doesn't look like we are aliasing a lot of stuff so we might as well avoid doing that here.
I think /back
could be used for some other client stuff. I don't have an exact use case for this yet, so it's hard for me to justify :) I'll let you pick whichever you prefer.
|
@astorije If I'm correct, there is nothing unresolved from your review? Just trying to push through the last 2.2.0 things, would be good to get that release out soon. |
@xPaw, @YaManicKill: 1️⃣ |
Well, personally I think that "/back" is much more obvious in terms of how I would speak, but ¯\_(ツ)_/¯ |
|
All good then, merging! |
Implement /away and /back commands
Fixes #705 as the away message has to be a single argument instead of multiple.
Breaking change:
/away
will now mark you as away with empty message instead of marking you as back. New command/back
is used for that instead. (same as HexChat).