Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index d1aab40..2a34c0b 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -2,6 +2,12 @@ | |||
2 | #include <qwhatsthis.h> | 2 | #include <qwhatsthis.h> |
3 | #include "ircservertab.h" | 3 | #include "ircservertab.h" |
4 | 4 | ||
5 | |||
6 | bool IRCServerTab::containsPing( const QString& text, IRCServerTab* tab ) { | ||
7 | return (text.find("ping") != -1 && text.find( tab->server()->nick() != -1)); | ||
8 | } | ||
9 | |||
10 | |||
5 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 11 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
6 | m_server = server; | 12 | m_server = server; |
7 | m_session = new IRCSession(&m_server); | 13 | m_session = new IRCSession(&m_server); |
@@ -16,6 +22,11 @@ IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *pa | |||
16 | QWhatsThis::add(m_textview, tr("Server messages")); | 22 | QWhatsThis::add(m_textview, tr("Server messages")); |
17 | m_layout->add(m_textview); | 23 | m_layout->add(m_textview); |
18 | m_field = new IRCHistoryLineEdit(this); | 24 | m_field = new IRCHistoryLineEdit(this); |
25 | connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab())); | ||
26 | connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); | ||
27 | connect(m_field, SIGNAL(closeTab()), this, SIGNAL(closeTab())); | ||
28 | connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus())); | ||
29 | |||
19 | QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); | 30 | QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); |
20 | m_layout->add(m_field); | 31 | m_layout->add(m_field); |
21 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 32 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
@@ -121,14 +132,14 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
121 | else if (command == "OP"){ | 132 | else if (command == "OP"){ |
122 | QString nickname; | 133 | QString nickname; |
123 | stream >> nickname; | 134 | stream >> nickname; |
124 | if (nickname.length() > 0) { | 135 | if (nickname.length() > 0) { |
125 | QString text = line.right(line.length()-nickname.length()-5); | 136 | QString text = line.right(line.length()-nickname.length()-5); |
126 | IRCPerson person; | 137 | IRCPerson person; |
127 | person.setNick(nickname); | 138 | person.setNick(nickname); |
128 | m_session->op(((IRCChannelTab *)tab)->channel(), &person); | 139 | m_session->op(((IRCChannelTab *)tab)->channel(), &person); |
129 | } | 140 | } |
130 | } | 141 | } |
131 | 142 | ||
132 | //SEND MODES | 143 | //SEND MODES |
133 | else if (command == "MODE"){ | 144 | else if (command == "MODE"){ |
134 | QString text = line.right(line.length()-6); | 145 | QString text = line.right(line.length()-6); |