author | zecke <zecke> | 2004-09-06 22:47:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-06 22:47:48 (UTC) |
commit | 8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5 (patch) (unidiff) | |
tree | 39158cd8abe423cf2df95b5038cdc7848de2e3dc /noncore/net/opieirc/ircservertab.cpp | |
parent | 8bf99aaa1b31e770b21b7bf50407a650a8f5d646 (diff) | |
download | opie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.zip opie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.tar.gz opie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.tar.bz2 |
-Some keyboard handling
-ping notification
merge of zautrixs work
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); |