From 07e37c23297201f1584c00233a54ed2a2ab50ad5 Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Thu, 24 Jul 2014 09:42:57 +0200 Subject: [PATCH 1/6] fix rules for italics emphasis while the last patch did stop /path/.xxx from turning italic, it also stopped any other /emphasis/ from becoming italic. correct this by testing for ispunct, so spaces are valid italic terminators --- src/fe-common/core/fe-messages.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 56fe89f8..95d9a9d8 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -82,7 +82,9 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text) continue; if (!ishighalnum(end[-1]) || ishighalnum(end[1]) || end[1] == type || end[1] == '*' || end[1] == '_' || - (type == 29 && end[1] != '\0' && ishighalnum(end[2]))) + /* special case for italics to not emphasise + common paths by skipping /.../.X */ + (type == 29 && i_ispunct(end[1]) && ishighalnum(end[2]))) continue; if (IS_CHANNEL(item)) { From 4beebe3238dda96efd4c3a0a6f6002ad5afc96e7 Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Wed, 30 Jul 2014 13:02:26 +0200 Subject: [PATCH 2/6] Removed the obsolete SQUERY and SERVLIST commands Removed the obsolete SQUERY and SERVLIST commands. --- docs/help/in/say.in | 11 ----------- docs/help/in/servlist.in | 21 --------------------- docs/help/in/squery.in | 12 ------------ src/irc/core/irc-commands.c | 6 ------ 4 files changed, 50 deletions(-) delete mode 100644 docs/help/in/say.in delete mode 100644 docs/help/in/servlist.in delete mode 100644 docs/help/in/squery.in diff --git a/docs/help/in/say.in b/docs/help/in/say.in deleted file mode 100644 index 6997743d..00000000 --- a/docs/help/in/say.in +++ /dev/null @@ -1,11 +0,0 @@ - -SAY -(alias for "/MSG *") - -The actual command used to put into the current channel. A very -useful command if you need aliases for often used phrases. - -For example: /alias brb say I'm off for a while, be right back. - -This would allow you to use /brb to put the "I'm off*" into the channel. - diff --git a/docs/help/in/servlist.in b/docs/help/in/servlist.in deleted file mode 100644 index e9b61a6d..00000000 --- a/docs/help/in/servlist.in +++ /dev/null @@ -1,21 +0,0 @@ - -@SYNTAX:servlist@ - -Works only on IRCnet. - -SERVLIST gives the list of services currently present on the -IRC network. It can take two arguments. - limits the output to the services which names matches - the mask. - limits the output to the services of the specified type. - -The fields returned are: - Service name. - Server who introduced the service. - Distribution mask. - Service type. - Hop count to the service. - A comment. - -See also: SQUERY - diff --git a/docs/help/in/squery.in b/docs/help/in/squery.in deleted file mode 100644 index 9c29b956..00000000 --- a/docs/help/in/squery.in +++ /dev/null @@ -1,12 +0,0 @@ - -@SYNTAX:squery@ - - - Service name - - Commands to pass to the service. - -Works only on IRCnet. - -/SQUERY sends a query to the specified service. - -See also: SERVLIST, NOTE, LIST - diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 71828022..2f33a26c 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -998,15 +998,11 @@ void irc_commands_init(void) command_bind_irc("trace", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: VERSION [|] */ command_bind_irc("version", NULL, (SIGNAL_FUNC) command_self); - /* SYNTAX: SERVLIST [] */ - command_bind_irc("servlist", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: SILENCE [[+|-]] SILENCE [] */ command_bind_irc("silence", NULL, (SIGNAL_FUNC) command_self); command_bind_irc("unsilence", NULL, (SIGNAL_FUNC) cmd_unsilence); command_bind_irc("sconnect", NULL, (SIGNAL_FUNC) cmd_sconnect); - /* SYNTAX: SQUERY [] */ - command_bind_irc("squery", NULL, (SIGNAL_FUNC) command_2self); /* SYNTAX: DIE */ command_bind_irc("die", NULL, (SIGNAL_FUNC) command_self); /* SYNTAX: HASH */ @@ -1077,11 +1073,9 @@ void irc_commands_deinit(void) command_unbind("time", (SIGNAL_FUNC) command_self); command_unbind("trace", (SIGNAL_FUNC) command_self); command_unbind("version", (SIGNAL_FUNC) command_self); - command_unbind("servlist", (SIGNAL_FUNC) command_self); command_unbind("silence", (SIGNAL_FUNC) command_self); command_unbind("unsilence", (SIGNAL_FUNC) cmd_unsilence); command_unbind("sconnect", (SIGNAL_FUNC) cmd_sconnect); - command_unbind("squery", (SIGNAL_FUNC) command_2self); command_unbind("die", (SIGNAL_FUNC) command_self); command_unbind("hash", (SIGNAL_FUNC) command_self); command_unbind("oper", (SIGNAL_FUNC) cmd_oper); From 822db3090f8c144833459cb7d3ed9e0422749f5e Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Wed, 30 Jul 2014 14:29:06 +0200 Subject: [PATCH 3/6] Syntax rewrite for S-commands Rewrote the syntax documentation for all commands starting with S. --- docs/help/in/save.in | 22 ++++++++++++--- docs/help/in/sconnect.in | 23 +++++++++++++-- docs/help/in/script.in | 29 +++++++++++++------ docs/help/in/scrollback.in | 45 ++++++++++++++++++++--------- docs/help/in/set.in | 38 ++++++++++++++++--------- docs/help/in/silence.in | 41 +++++++++++++++------------ docs/help/in/squit.in | 18 ++++++++++-- docs/help/in/stats.in | 58 +++++++++++++++++++++++++------------- docs/help/in/statusbar.in | 36 +++++++++++++++++++---- 9 files changed, 222 insertions(+), 88 deletions(-) diff --git a/docs/help/in/save.in b/docs/help/in/save.in index 8ab25f29..14e29172 100644 --- a/docs/help/in/save.in +++ b/docs/help/in/save.in @@ -1,10 +1,24 @@ +%9Syntax:%9 + @SYNTAX:save@ - -formats: Save all /FORMATs into theme file +%9Parameters:%9 -Saves the current Irssi configuration into the configuration -file. + -formats: Saves all the formats into the theme file. -See also: RELOAD + The file to save the configuration or theme into; if no parameter is given, + the active configuration or theme file will be used. + +%9Description:%9 + + Saves the configuration file. + +%9Examples:%9 + + /SAVE + /SAVE -formats + /SAVE ~/.irssi/config-new + +%9See also:%9 SET, RELOAD diff --git a/docs/help/in/sconnect.in b/docs/help/in/sconnect.in index ed07f4f9..47da885f 100644 --- a/docs/help/in/sconnect.in +++ b/docs/help/in/sconnect.in @@ -1,8 +1,25 @@ +%9Syntax:%9 + @SYNTAX:sconnect@ -IRC Operator command. Makes an IRC server connect -to another server. This is CONNECT on the protocol level. +%9Parameters:%9 -See also: OPER, SQUIT, RESTART + The server to connect to, the connection port and the remote server that + initiates the connection attempt. + + If no remote server is given, the server you are currently connected to will + be used. + +%9Description:%9 + + Connect a server to the IRC network; this command is restricted to IRC + operators. + +%9Examples:%9 + + /SCONNECT ircsource.irssi.org + /SCONNECT ircsource.irssi.org 6667 be.hub + +%9See also:%9 DIE, KILL, OPER, RESTART, SQUIT diff --git a/docs/help/in/script.in b/docs/help/in/script.in index 0354512b..e99dd9ba 100644 --- a/docs/help/in/script.in +++ b/docs/help/in/script.in @@ -1,19 +1,32 @@ +%9Syntax:%9 + @SYNTAX:script@ -Irssi has very powerful support for scripts written in Perl - they can extend functionality of Irssi in almost unlimited way, and they still keep the client's core unbloated, light and fast. You can control loading and execution of such scripts by this command. +%9Parameters:%9 -Without any parameters, /SCRIPT acts in same way as if you would call /SCRIPT LIST. + LIST: Displays the list of loaded scripts. + EXEC: Executes the given code. + LOAD: Loads the given script into the memory and executes it. + UNLOAD: Unloads the given script from the memory. + RESET: Unloads all the scripts. + -permanent: In combination with EXEC, the code will be loaded into the + memory. -/SCRIPT LIST displays list of all currently loaded scripts, together with full path to their source files. + If no argument is given, the list of active scripts will be displayed. -/SCRIPT EXEC executes the as a little perl script. It doesn't preserve it loaded in memory, unless -permanent is specified. +%9Description:%9 -/SCRIPT LOAD loads the