[smuxi: 62/111] Frontend: added event and format support to /benchmark_message_builder command
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 62/111] Frontend: added event and format support to /benchmark_message_builder command
- Date: Sun, 16 Feb 2014 13:18:28 +0000 (UTC)
commit 32285663184088265850d6e95b6ec83df5176d02
Author: Mirco Bauer <meebey meebey net>
Date: Sat Jan 11 18:22:57 2014 +0100
Frontend: added event and format support to /benchmark_message_builder command
src/Frontend/CommandManager.cs | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/Frontend/CommandManager.cs b/src/Frontend/CommandManager.cs
index 5bf14f2..6144e4d 100644
--- a/src/Frontend/CommandManager.cs
+++ b/src/Frontend/CommandManager.cs
@@ -350,12 +350,16 @@ namespace Smuxi.Frontend
var showHelp = false;
var appendMessage = false;
var appendText = false;
+ var appendEvent = false;
+ var appendFormat = false;
var toMessage = false;
try {
var opts = new NDesk.Options.OptionSet() {
{ "c|count=", v => count = Int32.Parse(v) },
{ "m|append-message", v => appendMessage = true },
{ "t|append-text", v => appendText = true },
+ { "e|append-event", v => appendEvent = true },
+ { "f|append-format", v => appendFormat = true },
{ "T|to-message", v => toMessage = true },
};
opts.Add("h|?|help", x => {
@@ -398,6 +402,15 @@ namespace Smuxi.Frontend
if (appendText) {
builder.AppendText("This is message with just text.");
}
+ if (appendEvent) {
+ builder.AppendEventPrefix();
+ }
+ if (appendFormat) {
+ builder.AppendFormat("{0} [{1}] has joined {2}",
+ "meebey3",
+ "~smuxi 31-18-115-252-dynip superkabel de",
+ "#smuxi-devel");
+ }
if (toMessage) {
var msg = builder.ToMessage();
}
@@ -411,6 +424,12 @@ namespace Smuxi.Frontend
if (appendText) {
builder.AppendText("builder.AppendText() ");
}
+ if (appendEvent) {
+ builder.AppendText("builder.AppendEventPrefix() ");
+ }
+ if (appendFormat) {
+ builder.AppendText("builder.AppendFormat() ");
+ }
if (toMessage) {
builder.AppendText("builder.ToMessage() ");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]