summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-22 16:06:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-22 16:06:06 +0300
commit7aa3784a5d62848af60aabc3f82b19fb068b9d79 (patch)
tree6e1538bf378c54a99ff02fe99d7e79ea6ac504f4 /src/gui/chatwindow.cpp
parent147696620522270d51d15ff3fd1e7e2431ff61ae (diff)
downloadplus-7aa3784a5d62848af60aabc3f82b19fb068b9d79.tar.gz
plus-7aa3784a5d62848af60aabc3f82b19fb068b9d79.tar.bz2
plus-7aa3784a5d62848af60aabc3f82b19fb068b9d79.tar.xz
plus-7aa3784a5d62848af60aabc3f82b19fb068b9d79.zip
Add new chat commands.
/url LINK - put http link in chat. /openurl LINK - open link in browser.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index f3255af97..75ec6d09c 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -329,6 +329,8 @@ void ChatWindow::fillCommands()
mCommands.push_back("<PEOPLE>");
mCommands.push_back("<PARTY>");
mCommands.push_back("/setdrop ");
+ mCommands.push_back("/url ");
+ mCommands.push_back("/open ");
}
void ChatWindow::loadGMCommands()
@@ -1404,9 +1406,12 @@ void ChatWindow::resortChatLog(std::string line, Own own,
size_t idx3 = line.find("@@", idx2);
if (idx3 != std::string::npos)
{
- tradeChatTab->chatLog(line, own, ignoreRecord,
- tryRemoveColors);
- return;
+ if (line.find("http", idx1) != idx1 + 2)
+ {
+ tradeChatTab->chatLog(line, own, ignoreRecord,
+ tryRemoveColors);
+ return;
+ }
}
}
}