author | wazlaf <wazlaf> | 2002-09-20 23:28:14 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-09-20 23:28:14 (UTC) |
commit | 912092425248f7fc5155b4c7c46b7d00ec2676bc (patch) (unidiff) | |
tree | 5bbf746e83b2dffad89542c42031a573c34da751 /noncore/net/opieirc/ircchanneltab.cpp | |
parent | cd3df897c1b0ed93c2be3ab411011a0bdfe88bf9 (diff) | |
download | opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.zip opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.tar.gz opie-912092425248f7fc5155b4c7c46b7d00ec2676bc.tar.bz2 |
support for client commands (only /join implemented so far), crash bugfix, fixed 2 leaks, server browser now includes a channel list
Diffstat (limited to 'noncore/net/opieirc/ircchanneltab.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index c96a365..754442a 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -40,8 +40,20 @@ IRCChannelTab::~IRCChannelTab() { | |||
40 | void IRCChannelTab::processCommand() { | 40 | void IRCChannelTab::processCommand() { |
41 | if (m_field->text().length()>0) { | 41 | QString text = m_field->text(); |
42 | if (text.length()>0) { | ||
43 | if (session()->isSessionActive()) { | ||
44 | if (text.startsWith("/") && !text.startsWith("//")) { | ||
45 | /* Command mode */ | ||
46 | m_parentTab->executeCommand(this, text);; | ||
47 | } else { | ||
48 | if (session()->isSessionActive()) { | ||
42 | session()->sendMessage(m_channel, m_field->text()); | 49 | session()->sendMessage(m_channel, m_field->text()); |
43 | appendText("<<font color=\"#dd0000\">"+m_parentTab->server()->nick()+"</font>> "+m_field->text()+"<br>"); | 50 | appendText("<<font color=\"#dd0000\">"+m_parentTab->server()->nick()+"</font>> "+m_field->text()+"<br>"); |
44 | m_field->clear(); | ||
45 | } | 51 | } |
46 | } | 52 | } |
53 | } else { | ||
54 | appendText("<font color=\"#ff0000\">"+tr("Disconnected")+"</font><br>"); | ||
55 | } | ||
56 | } | ||
57 | m_field->clear(); | ||
58 | } | ||
47 | 59 | ||
@@ -67,3 +79,7 @@ IRCSession *IRCChannelTab::session() { | |||
67 | void IRCChannelTab::remove() { | 79 | void IRCChannelTab::remove() { |
80 | if (session()->isSessionActive()) { | ||
68 | session()->part(m_channel); | 81 | session()->part(m_channel); |
82 | } else { | ||
83 | m_mainWindow->killTab(this); | ||
84 | } | ||
69 | } | 85 | } |