Add cmd_header_inline
authorMyhailo Danylenko <isbear@ukrpost.net>
Sat, 26 Dec 2009 02:00:19 +0200
changeset 7 08aba7a38618
parent 6 8e64b6d3302e
child 8 5771827a4976
Add cmd_header_inline
TODO
cmd.c
cmd.rc
--- a/TODO	Sat Dec 26 01:46:10 2009 +0200
+++ b/TODO	Sat Dec 26 02:00:19 2009 +0200
@@ -1,3 +1,4 @@
 
 Header template option?
+Option to strip leading/trailing whitespace
 
--- a/cmd.c	Sat Dec 26 01:46:10 2009 +0200
+++ b/cmd.c	Sat Dec 26 02:00:19 2009 +0200
@@ -273,7 +273,7 @@
 			cmd_cb_t *cb = g_new (cmd_cb_t, 1);
 
 			if (settings_opt_get_int ("cmd_header")) {
-				if (is_room (jid)) {
+				if (settings_opt_get_int ("cmd_header_inline") || is_room (jid)) {
 					gchar *mesg = g_strdup_printf ("$ %s", arg);
 					gchar *utf  = to_utf8 (mesg);
 					g_free (mesg);
--- a/cmd.rc	Sat Dec 26 01:46:10 2009 +0200
+++ b/cmd.rc	Sat Dec 26 02:00:19 2009 +0200
@@ -7,10 +7,13 @@
 # Redirect stderr to stdout. If not, stderr will be discarded.
 set cmd_redirect_stderr = 1
 
-# Set message header to [<sequence number>] $ <command>
-# Note, that on muc rooms it will just send command line prior
-# to command output, as subject here sets room topic.
+# Set message header to "[<sequence number>] $ <command>"
+# Note, that on muc rooms it will just send "$ <command>" prior
+# to command output, as message subject here sets room topic.
 set cmd_header = 1
 
+# Use room-like behaviour even on non-room buddies.
+set cmd_header_inline = 0
+
 load cmd