From 47d66d214f426ac191b92dc5c3739783d852d8f0 Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Tue, 8 Jul 2014 01:38:08 +0100 Subject: [PATCH 1/5] Only show banner if not connecting to servers It's tricky to make the banner show first in all cases and it's unlikely to be seen if someone is connecting to a server already, so just don't show it. --- src/fe-text/irssi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index a77ded49..4dda7d39 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -27,6 +27,7 @@ #include "core.h" #include "settings.h" #include "session.h" +#include "servers.h" #include "printtext.h" #include "fe-common-core.h" @@ -205,8 +206,10 @@ static void textui_finish_init(void) signal_emit("irssi init finished", 0); statusbar_redraw(NULL, TRUE); - printtext_window(active_win, MSGLEVEL_CRAP, - "%s", banner_text); + if (servers == NULL && lookup_servers == NULL) { + printtext(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, + "%s", banner_text); + } if (display_firsttimer) { printtext_window(active_win, MSGLEVEL_CRAP, From 4e2299f1b702f84fab738a51ce9eed32c2826bc3 Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Tue, 8 Jul 2014 09:23:55 +0100 Subject: [PATCH 2/5] Change to printtext for first time message too --- src/fe-text/irssi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index 4dda7d39..1004f515 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -212,8 +212,8 @@ static void textui_finish_init(void) } if (display_firsttimer) { - printtext_window(active_win, MSGLEVEL_CRAP, - "%s", firsttimer_text); + printtext(NULL, NULL, MSGLEVEL_CRAP|MSGLEVEL_NO_ACT, + "%s", firsttimer_text); } } From 7fe47826ea5b8015ba81f2eabf2af750c7f56a47 Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Tue, 8 Jul 2014 09:24:12 +0100 Subject: [PATCH 3/5] Suggest /HELP rather than HELP At this point cmdchars is definitely / and the user might not know they need to add / to a command. --- src/fe-text/irssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index 1004f515..c0524247 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -96,7 +96,7 @@ static const char *firsttimer_text = "documentation to get you going.\n\n" "Our community and staff are available to assist you or\n" "to answer any questions you may have.\n\n" - "Use the HELP command to get detailed information about\n" + "Use the /HELP command to get detailed information about\n" "the available commands.\n" "- - - - - - - - - - - - - - - - - - - - - - - - - - - -"; From a5a7fdbe5fb01654a832ad2cf482d40966e1d9df Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Tue, 8 Jul 2014 13:42:06 +0200 Subject: [PATCH 4/5] more strict rules for italic emphasis to avoid file name clashes this additional check avoids /root/.hiddendir from italicising /root/, because that is often used in path names --- src/fe-common/core/fe-messages.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 25c20109..fcc55a67 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -81,7 +81,8 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text) if ((end = strchr(bgn+1, *bgn)) == NULL) continue; if (!ishighalnum(end[-1]) || ishighalnum(end[1]) || - end[1] == type || end[1] == '*' || end[1] == '_') + end[1] == type || end[1] == '*' || end[1] == '_' || + (type == 29 && end[1] != NULL && ishighalnum(end[2]))) continue; if (IS_CHANNEL(item)) { From 7ee7bf79ed835f5fcd9802b1d067ad123624ac4e Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Tue, 8 Jul 2014 21:02:35 +0200 Subject: [PATCH 5/5] Syntax documentation rewrite for M-commands Rewrote the syntax documentation for all commands starting with the letter M. --- docs/help/in/action.in | 2 +- docs/help/in/map.in | 13 ++++- docs/help/in/me.in | 19 +++++- docs/help/in/mircdcc.in | 27 +++++++-- docs/help/in/mode.in | 125 +++++++++++++++++++--------------------- docs/help/in/motd.in | 22 ++++++- docs/help/in/msg.in | 23 +++++--- 7 files changed, 145 insertions(+), 86 deletions(-) diff --git a/docs/help/in/action.in b/docs/help/in/action.in index 23b1a5d6..9a2912c6 100644 --- a/docs/help/in/action.in +++ b/docs/help/in/action.in @@ -7,7 +7,7 @@ -: The server tag you want to send the action emote to. - A target nickname or channel and the message. + A target nickname or channel and the message to emote. %9Description:%9 diff --git a/docs/help/in/map.in b/docs/help/in/map.in index 7ddf696e..81994cf2 100644 --- a/docs/help/in/map.in +++ b/docs/help/in/map.in @@ -1,7 +1,16 @@ +%9Syntax:%9 + @SYNTAX:map@ -Works only in some IRC networks and is often restricted to IRC operators. +%9Description:%9 -Shows a graphical map of the IRC network, often with user counts. + Displays the network map of an IRC network; this command is usally + reserved for IRC operators and does not work on all servers. + +%9Examples:%9 + + /MAP + +%9See also:%9 DIE, LINKS, LUSERS diff --git a/docs/help/in/me.in b/docs/help/in/me.in index b918ec71..0da1e5ca 100644 --- a/docs/help/in/me.in +++ b/docs/help/in/me.in @@ -1,8 +1,21 @@ +%9Syntax:%9 + @SYNTAX:me@ -Sends a CTCP ACTION to the current channel or query. -For example: /me sits back. +%9Parameters:%9 -See also: ACTION, CTCP + The message to emote. + +%9Description:%9 + + Sends an action emote to the active nickname or channel. + +%9Examples:%9 + + /ME is hungry! + /ME had an awesome day @ work + /ME is happy it's Friday + +%9See also:%9 ACTION, CTCP diff --git a/docs/help/in/mircdcc.in b/docs/help/in/mircdcc.in index d3402e0a..3282d68c 100644 --- a/docs/help/in/mircdcc.in +++ b/docs/help/in/mircdcc.in @@ -1,11 +1,28 @@ +%9Syntax:%9 + @SYNTAX:mircdcc@ -Selects whether to send mIRC style CTCPs in DCC chat -session. +%9Parameters:%9 -If a mIRC user sends first a CTCP, mIRC style CTCPs is -automatically selected for that DCC Chat session. + ON: Enables mIRC compatibility mode. + OFF: Disables mIRC compatibility mode. -See also: SET MIRC +%9Description:%9 + + After establishing a DCC CHAT connection that you initiated, you might + encounter some protocol issues if the target is using mIRC. + + If you or your target sees some unexpected output or behaviour inside a DCC + CHAT session, use this command to enable mIRC compatibility mode. + + When receiving a connection from an mIRC user, the compatibility mode will + automatically be enabled. + +%9Examples:%9 + + /MIRCDCC ON + /MIRCDCC OFF + +%9See also:%9 ACTION, DCC, CTCP diff --git a/docs/help/in/mode.in b/docs/help/in/mode.in index 9642d95e..d4cf2d25 100644 --- a/docs/help/in/mode.in +++ b/docs/help/in/mode.in @@ -1,82 +1,77 @@ +%9Syntax:%9 + @SYNTAX:mode@ -Common channel modes are: +%9Parameters:%9 - i - Invite only - People can't join to channel without being - /INVITEd, or being in invite list (+I, see below). - m - Moderated - People who don't have voices (+v) can't send - messages to channel - p - Private - People who aren't joined to channel can't see it - for example with /WHOISing people who are in channel. - s - Secret - Like private, but the channel isn't displayed in - /LIST's output. - n - No external msgs - Without this mode, anyone can send messages - to channel without even being joined. - t - Topic can be changed only by channel operators. + The target nickname or channel and the modes with their parameters to set or + remove. - k - Channel password (aka. key) - The channel can't be joined - without specifying the channel key (see section 6.2). + If the target nickname or channel is omitted, the active nickname or channel + will be used. - l - User limit - No more than people can join to - channel. This can be overridden with /INVITE with some - servers. +%9Description:%9 - This is usually used for protecting channel from join - flooding, like some bot allows max. 5 users to join in - one minute or so. + Modifies the user or channel modes for which you are privileged to modify. - b - Set/remove ban. For example MODE #channel +b *!*@*.org bans - everyone from .org domain. + You can specify multiple modes in one command and prepend them by using the + "+" sign to set or "-" sign to unset; modes that require a parameter will be + retrieved from the argument list. - If someone from .org domain was already in channel before the - ban was set, he/she cannot send any messages to channel (doesn't - work with all servers). + Some common channel modes are: - Bans can also be overridden with /INVITE, although many stupid - IRC clients automatically kick the user out because they see - the ban and think that because of it the user shouldn't be in - the channel (doesn't work with all servers). + b : Adds or removes a ban; a ban will prevent a user who + matches the given mask from joining the channel unless + he or she is invited or in the excempt list. + e : Adds or removes a ban exception; users who match a mask + on the excempt list are able to join a channel even if + they also match an entry on the banlist. + i: When enabled, users need to be invited into the channel + or have a matching entry in the invite list. + I : Adds or removes an invite; users who match a mask on + the invite list are able to join even if the channel is + set to invite only. + k : Adds or removes a channel key, aka a password; users + will not be able to join the channel without providing + the key. + l : Adds, removes or updates the maximum amount of users + that may join the channel. + m: When enabled, users who are not opped or voiced cannot + send messages to the channel. + n: When enabled, users who are not on the channel cannnot + send messages to it. + p: When enabled, the channel will not be displayed in your + WHOIS output. + s: When enabled, the channel will not be displayed in the + LIST output. + t: When enabled, users who are not opped or voices cannot + modify the channel topic. + o : Adds or removes the operator status from a nickname. + v : Adds or removes the voice status from a nickname. - e - Ban exceptions. You could for example ban everyone from - *!*@*.org but set ban exception to *!*@*.host.org - does not work - with all servers. + Some common user modes are: - I - Invite list. If channel is invite only (+i), people in this - list can join it without being /INVITEd - does not work with all - servers. + i: When enabled, other users will not be able to see you + on a WHO output unless they are in the channel + themselves. + w: When enabled, you will receive WALLOP messages from IRC + operators. + s: When enabled, you will receive special notices or debug + messages from the server. - This is excellent for in-country channels that don't want - foreigners (spammers!) to join the channel, for example setting - channel's mode to +i and +I *!*@*.fi allows only finnish people - to join the channel. In addition to this, there's usually a bot - in the channels and sending /MSG bot invite command to it - /INVITEs you to the channel. + Many networks have additional user and channel modes; we highly recommend + you to read the documentation of the networks you frequently connect to and + maximize your IRC experience. - On IRCnet, the ':' feature in channel names can also be used for - a similar effect, see section 6.2. +%9Examples:%9 - o - Grant or revoke channel operator status from nick - v - Grant or revoke voice status from nick, only people with - +v (or +o) can talk to channel when it's moderated (+m). + /MODE #irssi +o mike + /MODE #irssi -o+iI mike mike!*@*.irssi.org + /MODE +b mike!*@*.irssi.org + /MODE -o mike + /MODE +impsnkl secret_hideout 100 + /MODE mike +iw -You can send multiple mode changes with one mode command: - -/MODE #channel +nto-o+v nick1 nick2 nick3 - -This would set channel's mode to +nt, give ops to nick1, take ops -from nick2 and give voices to nick3. - -You can set only a limited number of modes that require an argument -in one command. In IRCnet it's 3, in EFnet it's 4 and in many others -it's 6. If it's not known, Irssi defaults to 3. Irssi will also -automatically split them, so you can use /MODE +oooooo n1 n2 ... -command to op 6 people and Irssi will split it to two commands in -IRCnet/EFnet. - -Many networks have additional modes and/or change the meaning of existing -modes. Check the documentation for the network or the server software in -use for details. - -See also: OP, DEOP, VOICE, DEVOICE, BAN, UNBAN +%9See also:%9 BAN, DEOP, DEVOICE, UNBAN, OP, VOICE diff --git a/docs/help/in/motd.in b/docs/help/in/motd.in index 8d66d04b..5a69d59e 100644 --- a/docs/help/in/motd.in +++ b/docs/help/in/motd.in @@ -1,7 +1,23 @@ + +%9Syntax:%9 + @SYNTAX:motd@ -Shows the motd of the current or specified server. This contains -usually some useful info on the server, administrator and -the rules. +%9Parameters:%9 + + The server or the server the target nickname is on; if no parameter is + given, the active server will be used. + +%9Description:%9 + + Displays the "Message of the Day" of an IRC server. + +%9Examples:%9 + + /MOTD + /MOTD orwel.freenode.org + /MOTD bob + +%9See also:%9 ADMIN, INFO, LINKS, MAP diff --git a/docs/help/in/msg.in b/docs/help/in/msg.in index f58ba41a..dc70f1f3 100644 --- a/docs/help/in/msg.in +++ b/docs/help/in/msg.in @@ -1,15 +1,24 @@ +%9Syntax:%9 + @SYNTAX:msg@ -Sends a message to a nick or a channel. Usually this -is used for sending private messages to other persons. +%9Parameters:%9 -Examples: + -: The server tag the targets are on. + -channel: Indicates that the target is a channel. + -nick: Indicates that the target is a nickname. -/MSG friend Hi, what's up? + The target nickname or channel and the message to send. -/MSG #irssi Hello, is the new gtk-version out already? -(This format is rarely needed.) +%9Description:%9 -See also: CTCP + Sends a message to a nickname or channel. + +%9Examples:%9 + + /MSG mike Hi, what's up? + /MSG #irssi I am awesome :) + +%9See also:%9 ACTION, DCC, JOIN