-
Notifications
You must be signed in to change notification settings - Fork 352
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 CHANTYPES support #248
Conversation
23e55e1
to
16c71cf
Compare
chantypes = "#&!+"; /* normal, local, secure, modeless */ | ||
|
||
/* @#channel, @+#channel */ | ||
if (data[0] == '@' && data[1] == '+') |
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.
You got review'd from a different ticket: #253 (comment)
the logic introduced at [this line] does not account for the fact that an arbitrary number of channel types can be prefixed to the "#channel", including duplicates
The function now skips all the leading characters that are in the STATUSMSG. If the server didn't send the STATUSMSG option then it's assumed to be "@+" for compatibility with bahamut 2.4 (sic).
This looks good to me - I want someone else to review it as well. I like anything that kills these odd defaults. |
@@ -262,7 +262,7 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args, | |||
|
|||
ignore_next = TRUE; | |||
if (*msg != '\001' || msg[strlen(msg)-1] != '\001') { | |||
signal_emit(ischannel(*target) ? | |||
signal_emit(server_ischannel(SERVER(client->server), target) ? |
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.
nit: spaces mixed with tabs
Also looks good to me, tested with a modified bitlbee that used |
Fix the nit and I'll merge it :-) |
@@ -42,6 +42,9 @@ | |||
#include "fe-windows.h" | |||
#include "fe-irc-server.h" | |||
|
|||
int fe_channel_is_opchannel(IRC_SERVER_REC *server, const char *target); | |||
const char *fe_channel_skip_prefix(IRC_SERVER_REC *server, const char *target); |
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.
Would be nice to put these in some header instead
(reposting comment from diff view, thanks github!)
Did some more testing with the last commit, looks good to me. Found some weirdness with formats, but it's not this patch's fault. Well, neither was the STATUSMSG issue, but... (Screenshot from the point of view of Actions with target have the target bolded, own actions with target (or normal messages) don't have it bolded. Oddly enough it doesn't look like that in my main irssi, which uses almost exactly the same theme as the default. It is a mystery. After spending 5 minutes looking at this issue I decided it's not worth spending more time on. Mentioning it here just because. But yeah, looks good to me. Would be nice to have @ahf's opinion on |
@ahf beep |
const char *statusmsg; | ||
|
||
/* Quick check */ | ||
if (server == NULL || server->prefix[(int)(unsigned char)*target] == 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.
The cast's here deserves a comment in the code. Make a follow up patch which cleans that up a bit please :-)
01:36:20 < dx> that's from the old code, anyway, not added by lemon |
LGTM, let's get it in. |
It's almost a matter of replacing stuff here and there, I tested it for a couple of minutes and found no problems (doesn't crash and allows me to join channels).