Hi, I would like a way to be able to send an amsg only to the current server I am on at the moment. So state i'm on server X,Y and Z and I amsg in channel #x that is located on server X, I don't want my message to go to server Y or Z. It's annoying for people on other servers that have no message with what I'm typing elsewhere (online game) Thanks in advance. Ites
commit f8e391a0b333b188ff8b8c934b256c5cdff108f8 Author: Eike Hein <hein@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);