summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircchanneltab.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp
index 754442a..3267525 100644
--- a/noncore/net/opieirc/ircchanneltab.cpp
+++ b/noncore/net/opieirc/ircchanneltab.cpp
@@ -24,51 +24,53 @@ IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainW
m_layout->add(m_field);
m_field->setFocus();
connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
}
void IRCChannelTab::appendText(QString text) {
/* not using append because it creates layout problems */
m_textview->setText(m_textview->text() + text);
m_textview->ensureVisible(0, m_textview->contentsHeight());
}
IRCChannelTab::~IRCChannelTab() {
m_parentTab->removeChannelTab(this);
}
void IRCChannelTab::processCommand() {
QString text = m_field->text();
if (text.length()>0) {
if (session()->isSessionActive()) {
if (text.startsWith("/") && !text.startsWith("//")) {
/* Command mode */
m_parentTab->executeCommand(this, text);;
} else {
+ if (text.startsWith("//"))
+ text = text.right(text.length()-1);
if (session()->isSessionActive()) {
session()->sendMessage(m_channel, m_field->text());
- appendText("&lt;<font color=\"#dd0000\">"+m_parentTab->server()->nick()+"</font>&gt; "+m_field->text()+"<br>");
+ appendText("&lt;<font color=\"#dd0000\">"+m_parentTab->server()->nick()+"</font>&gt; "+IRCOutput::toHTML(m_field->text())+"<br>");
}
}
} else {
appendText("<font color=\"#ff0000\">"+tr("Disconnected")+"</font><br>");
}
}
m_field->clear();
}
void IRCChannelTab::toggleList() {
if (m_listVisible) {
m_list->setMaximumWidth(0);
m_listButton->setText("<");
} else {
m_list->setMaximumWidth(LISTWIDTH);
m_listButton->setText(">");
}
m_listVisible = !m_listVisible;
}
QString IRCChannelTab::title() {
return m_channel->channelname();
}