Summary: | expando nick variable for use in server commands (e.g., "/mode %n +x") | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Languid Heap <LanguidHeap> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Languid Heap
2006-08-30 04:22:32 UTC
SVN commit 578875 by hein: * Support %nick as a placeholder for the current nick in the auto-connect commands. BUG:133240 * Don't balk on leading whitespace in the auto-connect commands. I assume I'm not the only one who by reflex puts a space after the separating ";". M +2 -0 ChangeLog M +1 -1 src/commit.h M +7 -2 src/server.cpp --- trunk/extragear/network/konversation/ChangeLog #578874:578875 @@ -185,6 +185,8 @@ * If given no parameter, the "/away" command will now set the away state with the default away message. The "/back" and "/unaway" commands can be used to unset the away state. +* You may now use "%nick" as a placeholder for your own nickname in the auto- + connect commands for a network. * A bug that could lead to the auto-connect commands for a network not being executed correctly has been fixed. --- trunk/extragear/network/konversation/src/commit.h #578874:578875 @@ -1,4 +1,4 @@ // This COMMIT number is added to version string to be used as "patch level" #ifndef COMMIT -#define COMMIT 3156 +#define COMMIT 3157 #endif --- trunk/extragear/network/konversation/src/server.cpp #578874:578875 @@ -961,13 +961,18 @@ { if (!m_serverGroup->connectCommands().isEmpty()) { - QStringList connectCommands = QStringList::split(";", m_serverGroup->connectCommands()); + QString connectCommands = m_serverGroup->connectCommands(); + if (!getNickname().isEmpty()) + connectCommands.replace("%nick", getNickname()); + + QStringList connectCommandsList = QStringList::split(";", connectCommands); QStringList::iterator iter; - for(iter = connectCommands.begin(); iter != connectCommands.end(); ++iter) + for(iter = connectCommandsList.begin(); iter != connectCommandsList.end(); ++iter) { QString output(*iter); + output = output.simplifyWhiteSpace(); Konversation::OutputFilterResult result = outputFilter->parse(getNickname(),output,QString::null); queue(result.toServer); } |