[Konversation-devel] [Bug 238203] amsg to only one server
Eike Hein
hein at kde.org
Thu May 20 00:31:30 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=238203
Eike Hein <hein at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #1 from Eike Hein <hein kde org> 2010-05-20 00:31:28 ---
commit f8e391a0b333b188ff8b8c934b256c5cdff108f8
Author: Eike Hein <hein at kde.org>
Date: Thu May 20 00:27:50 2010 +0200
Add a -local parameter to the /amsg and /ame commands.
The parameter limits its scope to channel and query tabs associated
with the same connection as the tab the command is issued in.
BUG:238203
diff --git a/ChangeLog b/ChangeLog
index 04fd09b..2907aa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -120,6 +120,9 @@ Changes since 1.2.3:
* Added an action to switch to the last focused tab, making it possi-
ble to quickly switch forth and back between two tabs. The default
keyboard shortcut for this new action is Alt+Space.
+* Added a "-local" parameter to the '/amsg' and '/ame' commands that
+ limits its scope to the channel and query tabs associated with the
+ same connection as the tab the command is issued in.
Changes from 1.2.2 to 1.2.3:
diff --git a/src/irc/outputfilter.cpp b/src/irc/outputfilter.cpp
index f693dc2..1302c24 100644
--- a/src/irc/outputfilter.cpp
+++ b/src/irc/outputfilter.cpp
@@ -836,9 +836,12 @@ namespace Konversation
OutputFilterResult OutputFilter::command_ame(const OutputFilterInput&
input)
{
if (input.parameter.isEmpty())
- return usage(i18n("Usage: %1AME text",
Preferences::self()->commandChar()));
+ return usage(i18n("Usage: %1AME [-LOCAL] text",
Preferences::self()->commandChar()));
- emit multiServerCommand("me", input.parameter);
+ if (input.parameter.section(' ', 0, 0).toLower() == "-local")
+
m_server->sendToAllChannelsAndQueries(Preferences::self()->commandChar() + "me
" + input.parameter.section(' ', 1));
+ else
+ emit multiServerCommand("me", input.parameter);
return OutputFilterResult();
}
@@ -846,9 +849,12 @@ namespace Konversation
OutputFilterResult OutputFilter::command_amsg(const OutputFilterInput&
input)
{
if (input.parameter.isEmpty())
- return usage(i18n("Usage: %1AMSG text",
Preferences::self()->commandChar()));
+ return usage(i18n("Usage: %1AMSG [-LOCAL] text",
Preferences::self()->commandChar()));
- emit multiServerCommand("msg", input.parameter);
+ if (input.parameter.section(' ', 0, 0).toLower() == "-local")
+ m_server->sendToAllChannelsAndQueries(input.parameter.section(' ',
1));
+ else
+ emit multiServerCommand("msg", input.parameter);
return OutputFilterResult();
}
diff --git a/src/irc/server.h b/src/irc/server.h
index 2c75897..370c783 100644
--- a/src/irc/server.h
+++ b/src/irc/server.h
@@ -482,6 +482,7 @@ void resetNickSelection();
void disconnectServer();
void showSSLDialog();
void sendToAllChannels(const QString& text);
+ void sendToAllChannelsAndQueries(const QString& text);
void notifyTimeout();
void enableIdentifyMsg(bool enabled);
@@ -552,7 +553,6 @@ void resetNickSelection();
void setTopicAuthor(const QString& channel,const QString& author,
QDateTime t);
void endOfWho(const QString& target);
void invitation(const QString& nick,const QString& channel);
- void sendToAllChannelsAndQueries(const QString& text);
void gotOwnResolvedHostByWelcome(const QHostInfo& res);
void gotOwnResolvedHostByUserhost(const QHostInfo& res);
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list