Skip to content
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

Add modify to /channel, /server and /network #498

Merged
merged 9 commits into from Jun 21, 2016

Conversation

Projects
None yet
3 participants
@vague666
Copy link
Member

commented Jun 18, 2016

Rewrite of PR #338

<channel> <network> [<password>] */
static void cmd_channel_add(const char *data)
{
cmd_channel_add_modify(data, 1);

This comment has been minimized.

Copy link
@LemonBoy

LemonBoy Jun 19, 2016

Member

Use a TRUE/FALSE instead of 1/0 when the argument is a gboolean

@@ -50,12 +50,19 @@ const char *get_visible_target(IRC_SERVER_REC *server, const char *target)

return target;
}

/* SYNTAX: SERVER ADD [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_pass <password>]

This comment has been minimized.

Copy link
@LemonBoy

LemonBoy Jun 19, 2016

Member

Just recycle the existing comment block, the options that are accepted are the same for ADD and MODIFY, and that way we don't have to keep in-sync so many different versions of the same text.

@LemonBoy

This comment has been minimized.

Copy link
Member

commented Jun 19, 2016

LGTM beside some minor nits 👍

if (*name == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);

rec = ircnet_find(name);
if (rec == NULL) {
if (!add) {

This comment has been minimized.

Copy link
@LemonBoy

LemonBoy Jun 21, 2016

Member

Ditto.

@@ -124,6 +124,13 @@ static void cmd_server_add(const char *data)
rec = server_setup_find(addr, port, chatnet);

if (rec == NULL) {
if (!add) {

This comment has been minimized.

Copy link
@LemonBoy

LemonBoy Jun 21, 2016

Member

Ditto.

}

botarg = g_hash_table_lookup(optlist, "bots");
botcmdarg = g_hash_table_lookup(optlist, "botcmd");

rec = channel_setup_find(channel, chatnet);
if (rec == NULL) {
if (!add) {

This comment has been minimized.

Copy link
@LemonBoy

LemonBoy Jun 21, 2016

Member

== FALSE

@LemonBoy LemonBoy merged commit 798ce00 into irssi:master Jun 21, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.