projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
the alias engine can now expand nicks to their hostnames
[quassel.git]
/
src
/
core
/
userinputhandler.cpp
diff --git
a/src/core/userinputhandler.cpp
b/src/core/userinputhandler.cpp
index
bc3bb65
..
6167170
100644
(file)
--- a/
src/core/userinputhandler.cpp
+++ b/
src/core/userinputhandler.cpp
@@
-368,6
+368,8
@@
void UserInputHandler::expand(const QString &alias, const BufferInfo &bufferInfo
for(int i = 0; i < commands.count(); i++) {
QString command = commands[i];
for(int j = params.count(); j > 0; j--) {
for(int i = 0; i < commands.count(); i++) {
QString command = commands[i];
for(int j = params.count(); j > 0; j--) {
+ IrcUser *ircUser = network()->ircUser(params[j - 1]);
+ command = command.replace(QString("$%1:hostname").arg(j), ircUser ? ircUser->host() : QString("*"));
command = command.replace(QString("$%1").arg(j), params[j - 1]);
}
command = command.replace("$0", msg);
command = command.replace(QString("$%1").arg(j), params[j - 1]);
}
command = command.replace("$0", msg);