[smuxi] Engine-Twitter: fixed sent text of /say command
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi] Engine-Twitter: fixed sent text of /say command
- Date: Tue, 30 Dec 2014 12:03:37 +0000 (UTC)
commit 40b3faaf7ba1838f3cb948c5fe221387e8663bb8
Author: Mirco Bauer <meebey meebey net>
Date: Tue Dec 30 13:01:55 2014 +0100
Engine-Twitter: fixed sent text of /say command
.../Protocols/Twitter/TwitterProtocolManager.cs | 22 +++++++++++++++++--
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
b/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
index aa16c73..faab1ff 100644
--- a/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
+++ b/src/Engine-Twitter/Protocols/Twitter/TwitterProtocolManager.cs
@@ -1,6 +1,6 @@
// Smuxi - Smart MUltipleXed Irc
//
-// Copyright (c) 2009-2013 Mirco Bauer <meebey meebey net>
+// Copyright (c) 2009-2014 Mirco Bauer <meebey meebey net>
//
// Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
//
@@ -671,6 +671,10 @@ namespace Smuxi.Engine
CommandReply(command);
handled = true;
break;
+ case "say":
+ CommandSay(command);
+ handled = true;
+ break;
}
}
switch (command.Command) {
@@ -870,7 +874,7 @@ namespace Smuxi.Engine
case TwitterChatType.FriendsTimeline:
case TwitterChatType.Replies: {
try {
- PostUpdate(cmd.Data);
+ PostUpdate(cmd);
} catch (Exception ex) {
var msg = CreateMessageBuilder().
AppendEventPrefix().
@@ -895,7 +899,7 @@ namespace Smuxi.Engine
}
} else if (cmd.Chat.ChatType == ChatType.Person) {
try {
- SendMessage(cmd.Chat.Name, cmd.Data);
+ SendMessage(cmd);
} catch (Exception ex) {
#if LOG4NET
f_Logger.Error(ex);
@@ -1682,6 +1686,12 @@ namespace Smuxi.Engine
return options;
}
+ void PostUpdate(CommandModel cmd)
+ {
+ var text = cmd.IsCommand ? cmd.Parameter : cmd.Data;
+ PostUpdate(text);
+ }
+
void PostUpdate(string text)
{
PostUpdate(text, null);
@@ -1697,6 +1707,12 @@ namespace Smuxi.Engine
f_FriendsTimelineEvent.Set();
}
+ void SendMessage(CommandModel cmd)
+ {
+ var text = cmd.IsCommand ? cmd.Parameter : cmd.Data;
+ SendMessage(cmd.Chat.Name, text);
+ }
+
private void SendMessage(string target, string text)
{
var res = TwitterDirectMessage.Send(f_OAuthTokens, target, text,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]