summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/manual.txt15
-rw-r--r--src/fe-common/irc/fe-channels.c17
2 files changed, 22 insertions, 10 deletions
diff --git a/docs/manual.txt b/docs/manual.txt
index 992046a7..f7f922d7 100644
--- a/docs/manual.txt
+++ b/docs/manual.txt
@@ -445,6 +445,9 @@
/SERVER -add -port 6668 irc.server.org 6667
+ If you want to remove some settings from existing server, for
+ example hostname, just give -host "" parameters to it.
+
After connected to server, Irssi can automatically change your user
mode. You can set it with /SET usermode <mode>, default is +i.
@@ -607,7 +610,7 @@
IRC networks. It can also automatically send the password when
manually joining to channel without specifying the password.
- /CHANNEL ADD [-auto] [-bots <botmasks>] [-botcmd <command>]
+ /CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>]
<channel> <ircnet> [<password>]
With -bots and -botcmd arguments you can automatically send
@@ -620,6 +623,10 @@
You can also use the -botcmd without -bots argument. The command is
then sent whenever you join the channel.
+ If you want to remove some settings from existing channel record,
+ for example bots, just give the -bots "" parameters to it. Password
+ can be removed by setting it to - (or actually, "" works too).
+
You can remove the channels with
/CHANNEL REMOVE <channel> <ircnet>
@@ -863,12 +870,16 @@
Irssi's ignoring options should be enough for everyone :)
- /IGNORE [-regexp | -word] [-pattern <pattern>] [-except]
+ /IGNORE [-regexp | -word] [-pattern <pattern>] [-replies] [-except]
[-channels <channel>] <mask> <levels> <^levels>
-regexp: <pattern> is a regular expression
-word: <pattern> must match to full words
-pattern: <pattern> must match to the message's text
+ -replies: Ignore replies to nick in channels. For example
+ "/IGNORE -replies *!*@*.fi PUBLIC" ignores everyone
+ from Finland, but also anyone sending message
+ "tofinnishnick: blahblah".
-except: *DON'T* ignore
-channels: Ignore only in channels
<mask>: Either a nick mask or list of channels
diff --git a/src/fe-common/irc/fe-channels.c b/src/fe-common/irc/fe-channels.c
index 272f954c..0d566fd7 100644
--- a/src/fe-common/irc/fe-channels.c
+++ b/src/fe-common/irc/fe-channels.c
@@ -163,7 +163,7 @@ static void cmd_channel_list(void)
if (rec->autosendcmd != NULL && *rec->autosendcmd != '\0')
g_string_sprintfa(str, "botcmd: %s ", rec->autosendcmd);
- g_string_truncate(str, str->len-1);
+ if (str->len > 0) g_string_truncate(str, str->len-1);
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_CHANSETUP_LINE,
rec->name, rec->ircnet == NULL ? "" : rec->ircnet,
rec->password == NULL ? "" : rec->password, str->str);
@@ -199,14 +199,15 @@ static void cmd_channel_add(const char *data)
rec->name = g_strdup(channel);
rec->ircnet = g_strdup(ircnet);
} else {
- g_free_not_null(rec->botmasks);
- g_free_not_null(rec->autosendcmd);
- g_free_not_null(rec->password);
+ if (stristr(args, "-bots")) g_free_and_null(rec->botmasks);
+ if (stristr(args, "-botcmd")) g_free_and_null(rec->autosendcmd);
+ if (*password != '\0') g_free_and_null(rec->password);
}
- rec->autojoin = stristr(args, "-auto") != NULL;
- rec->botmasks = *botarg == '\0' ? NULL : g_strdup(botarg);
- rec->autosendcmd = *botcmdarg == '\0' ? NULL : g_strdup(botcmdarg);
- rec->password = *password == '\0' ? NULL : g_strdup(password);
+ if (stristr(args, "-auto")) rec->autojoin = TRUE;
+ if (stristr(args, "-noauto")) rec->autojoin = FALSE;
+ if (*botarg != '\0') rec->botmasks = g_strdup(botarg);
+ if (*botcmdarg != '\0') rec->autosendcmd = g_strdup(botcmdarg);
+ if (*password != '\0' && strcmp(password, "-") != 0) rec->password = g_strdup(password);
channels_setup_create(rec);
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_CHANSETUP_ADDED, channel, ircnet);