author | wazlaf <wazlaf> | 2002-10-16 21:28:25 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-10-16 21:28:25 (UTC) |
commit | 98bf2fd8027b5e10a82c0f4bde27d7977b919bcc (patch) (unidiff) | |
tree | f512cd6b1d66ed69a33b57e2ffa07eb8a7e4dbb4 | |
parent | fd6aee0559a2f2f68b14f9913ebbf482c2561572 (diff) | |
download | opie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.zip opie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.tar.gz opie-98bf2fd8027b5e10a82c0f4bde27d7977b919bcc.tar.bz2 |
qwhatsthis fix
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index a46f105..5aa447f 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -1,279 +1,279 @@ | |||
1 | #include <qpe/config.h> | 1 | #include <qpe/config.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
3 | #include <qwhatsthis.h> | 3 | #include <qwhatsthis.h> |
4 | #include "ircservertab.h" | 4 | #include "ircservertab.h" |
5 | 5 | ||
6 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 6 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
7 | m_server = server; | 7 | m_server = server; |
8 | m_session = new IRCSession(&m_server); | 8 | m_session = new IRCSession(&m_server); |
9 | m_mainWindow = mainWindow; | 9 | m_mainWindow = mainWindow; |
10 | m_close = FALSE; | 10 | m_close = FALSE; |
11 | m_lines = 0; | 11 | m_lines = 0; |
12 | m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); | 12 | m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); |
13 | m_textview = new QTextView(this); | 13 | m_textview = new QTextView(this); |
14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
16 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Server messages")); | 17 | QWhatsThis::add(m_textview, tr("Server messages")); |
18 | m_layout->add(m_textview); | 18 | m_layout->add(m_textview); |
19 | m_field = new IRCHistoryLineEdit(this); | 19 | m_field = new IRCHistoryLineEdit(this); |
20 | QWhatsThis::add(m_textview, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); | 20 | QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); |
21 | m_layout->add(m_field); | 21 | m_layout->add(m_field); |
22 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 22 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
23 | m_field->setFocus(); | 23 | m_field->setFocus(); |
24 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); | 24 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); |
25 | settingsChanged(); | 25 | settingsChanged(); |
26 | } | 26 | } |
27 | 27 | ||
28 | void IRCServerTab::appendText(QString text) { | 28 | void IRCServerTab::appendText(QString text) { |
29 | /* not using append because it creates layout problems */ | 29 | /* not using append because it creates layout problems */ |
30 | QString txt = m_textview->text() + text + "\n"; | 30 | QString txt = m_textview->text() + text + "\n"; |
31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
32 | int firstBreak = txt.find('\n'); | 32 | int firstBreak = txt.find('\n'); |
33 | if (firstBreak != -1) { | 33 | if (firstBreak != -1) { |
34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
35 | } | 35 | } |
36 | } else { | 36 | } else { |
37 | m_lines++; | 37 | m_lines++; |
38 | } | 38 | } |
39 | m_textview->setText(txt); | 39 | m_textview->setText(txt); |
40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
41 | emit changed(this); | 41 | emit changed(this); |
42 | } | 42 | } |
43 | 43 | ||
44 | IRCServerTab::~IRCServerTab() { | 44 | IRCServerTab::~IRCServerTab() { |
45 | delete m_session; | 45 | delete m_session; |
46 | } | 46 | } |
47 | 47 | ||
48 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { | 48 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { |
49 | m_channelTabs.remove(tab); | 49 | m_channelTabs.remove(tab); |
50 | } | 50 | } |
51 | 51 | ||
52 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { | 52 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { |
53 | m_queryTabs.remove(tab); | 53 | m_queryTabs.remove(tab); |
54 | } | 54 | } |
55 | 55 | ||
56 | void IRCServerTab::addQueryTab(IRCQueryTab *tab) { | 56 | void IRCServerTab::addQueryTab(IRCQueryTab *tab) { |
57 | m_queryTabs.append(tab); | 57 | m_queryTabs.append(tab); |
58 | } | 58 | } |
59 | 59 | ||
60 | QString IRCServerTab::title() { | 60 | QString IRCServerTab::title() { |
61 | return "Server"; | 61 | return "Server"; |
62 | } | 62 | } |
63 | 63 | ||
64 | IRCSession *IRCServerTab::session() { | 64 | IRCSession *IRCServerTab::session() { |
65 | return m_session; | 65 | return m_session; |
66 | } | 66 | } |
67 | 67 | ||
68 | IRCServer *IRCServerTab::server() { | 68 | IRCServer *IRCServerTab::server() { |
69 | return &m_server; | 69 | return &m_server; |
70 | } | 70 | } |
71 | 71 | ||
72 | void IRCServerTab::settingsChanged() { | 72 | void IRCServerTab::settingsChanged() { |
73 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); | 73 | m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>"); |
74 | m_lines = 0; | 74 | m_lines = 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | 77 | void IRCServerTab::executeCommand(IRCTab *tab, QString line) { |
78 | QTextIStream stream(&line); | 78 | QTextIStream stream(&line); |
79 | QString command; | 79 | QString command; |
80 | stream >> command; | 80 | stream >> command; |
81 | command = command.upper().right(command.length()-1); | 81 | command = command.upper().right(command.length()-1); |
82 | 82 | ||
83 | if (command == "JOIN") { | 83 | if (command == "JOIN") { |
84 | QString channel; | 84 | QString channel; |
85 | stream >> channel; | 85 | stream >> channel; |
86 | if (channel.length() > 0 && (channel.startsWith("#") || channel.startsWith("+"))) { | 86 | if (channel.length() > 0 && (channel.startsWith("#") || channel.startsWith("+"))) { |
87 | m_session->join(channel); | 87 | m_session->join(channel); |
88 | } else { | 88 | } else { |
89 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown channel format!</font><br>"); | 89 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown channel format!</font><br>"); |
90 | } | 90 | } |
91 | } else if (command == "ME") { | 91 | } else if (command == "ME") { |
92 | QString text = line.right(line.length()-4); | 92 | QString text = line.right(line.length()-4); |
93 | if (text.length() > 0) { | 93 | if (text.length() > 0) { |
94 | if (tab->isA("IRCChannelTab")) { | 94 | if (tab->isA("IRCChannelTab")) { |
95 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); | 95 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); |
96 | m_session->sendAction(((IRCChannelTab *)tab)->channel(), text); | 96 | m_session->sendAction(((IRCChannelTab *)tab)->channel(), text); |
97 | } else if (tab->isA("IRCQueryTab")) { | 97 | } else if (tab->isA("IRCQueryTab")) { |
98 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); | 98 | tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>"); |
99 | m_session->sendAction(((IRCQueryTab *)tab)->person(), text); | 99 | m_session->sendAction(((IRCQueryTab *)tab)->person(), text); |
100 | } else { | 100 | } else { |
101 | tab->appendText("<font color=\"" + m_errorColor + "\">Invalid tab for this command</font><br>"); | 101 | tab->appendText("<font color=\"" + m_errorColor + "\">Invalid tab for this command</font><br>"); |
102 | } | 102 | } |
103 | } | 103 | } |
104 | } else if (command == "MSG") { | 104 | } else if (command == "MSG") { |
105 | QString nickname; | 105 | QString nickname; |
106 | stream >> nickname; | 106 | stream >> nickname; |
107 | if (nickname.length() > 0) { | 107 | if (nickname.length() > 0) { |
108 | if (line.length() > 6 + nickname.length()) { | 108 | if (line.length() > 6 + nickname.length()) { |
109 | QString text = line.right(line.length()-nickname.length()-6); | 109 | QString text = line.right(line.length()-nickname.length()-6); |
110 | IRCPerson person; | 110 | IRCPerson person; |
111 | person.setNick(nickname); | 111 | person.setNick(nickname); |
112 | tab->appendText("<font color=\"" + m_textColor + "\">></font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(nickname)+"</font><font color=\"" + m_textColor + "\">< "+IRCOutput::toHTML(text)+"</font><br>"); | 112 | tab->appendText("<font color=\"" + m_textColor + "\">></font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(nickname)+"</font><font color=\"" + m_textColor + "\">< "+IRCOutput::toHTML(text)+"</font><br>"); |
113 | m_session->sendMessage(&person, text); | 113 | m_session->sendMessage(&person, text); |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } else { | 116 | } else { |
117 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown command</font><br>"); | 117 | tab->appendText("<font color=\"" + m_errorColor + "\">Unknown command</font><br>"); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | void IRCServerTab::processCommand() { | 121 | void IRCServerTab::processCommand() { |
122 | QString text = m_field->text(); | 122 | QString text = m_field->text(); |
123 | if (text.startsWith("/") && !text.startsWith("//")) { | 123 | if (text.startsWith("/") && !text.startsWith("//")) { |
124 | /* Command mode */ | 124 | /* Command mode */ |
125 | executeCommand(this, text); | 125 | executeCommand(this, text); |
126 | } | 126 | } |
127 | m_field->clear(); | 127 | m_field->clear(); |
128 | } | 128 | } |
129 | 129 | ||
130 | void IRCServerTab::doConnect() { | 130 | void IRCServerTab::doConnect() { |
131 | m_session->beginSession(); | 131 | m_session->beginSession(); |
132 | } | 132 | } |
133 | 133 | ||
134 | void IRCServerTab::remove() { | 134 | void IRCServerTab::remove() { |
135 | /* Close requested */ | 135 | /* Close requested */ |
136 | if (m_session->isSessionActive()) { | 136 | if (m_session->isSessionActive()) { |
137 | /* While there is a running session */ | 137 | /* While there is a running session */ |
138 | m_close = TRUE; | 138 | m_close = TRUE; |
139 | m_session->endSession(); | 139 | m_session->endSession(); |
140 | } else { | 140 | } else { |
141 | /* Session has previously been closed */ | 141 | /* Session has previously been closed */ |
142 | m_channelTabs.first(); | 142 | m_channelTabs.first(); |
143 | while (m_channelTabs.current() != 0) { | 143 | while (m_channelTabs.current() != 0) { |
144 | m_mainWindow->killTab(m_channelTabs.current()); | 144 | m_mainWindow->killTab(m_channelTabs.current()); |
145 | } | 145 | } |
146 | m_queryTabs.first(); | 146 | m_queryTabs.first(); |
147 | while (m_queryTabs.current() != 0) { | 147 | while (m_queryTabs.current() != 0) { |
148 | m_mainWindow->killTab(m_queryTabs.current()); | 148 | m_mainWindow->killTab(m_queryTabs.current()); |
149 | } | 149 | } |
150 | m_mainWindow->killTab(this); | 150 | m_mainWindow->killTab(this); |
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | IRCChannelTab *IRCServerTab::getTabForChannel(IRCChannel *channel) { | 154 | IRCChannelTab *IRCServerTab::getTabForChannel(IRCChannel *channel) { |
155 | QListIterator<IRCChannelTab> it(m_channelTabs); | 155 | QListIterator<IRCChannelTab> it(m_channelTabs); |
156 | 156 | ||
157 | for (; it.current(); ++it) { | 157 | for (; it.current(); ++it) { |
158 | if (it.current()->channel() == channel) | 158 | if (it.current()->channel() == channel) |
159 | return it.current(); | 159 | return it.current(); |
160 | } | 160 | } |
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | IRCQueryTab *IRCServerTab::getTabForQuery(IRCPerson *person) { | 164 | IRCQueryTab *IRCServerTab::getTabForQuery(IRCPerson *person) { |
165 | QListIterator<IRCQueryTab> it(m_queryTabs); | 165 | QListIterator<IRCQueryTab> it(m_queryTabs); |
166 | 166 | ||
167 | for (; it.current(); ++it) { | 167 | for (; it.current(); ++it) { |
168 | if (it.current()->person()->nick() == person->nick()) | 168 | if (it.current()->person()->nick() == person->nick()) |
169 | return it.current(); | 169 | return it.current(); |
170 | } | 170 | } |
171 | return 0; | 171 | return 0; |
172 | } | 172 | } |
173 | 173 | ||
174 | void IRCServerTab::display(IRCOutput output) { | 174 | void IRCServerTab::display(IRCOutput output) { |
175 | 175 | ||
176 | /* All messages to be displayed inside the GUI get here */ | 176 | /* All messages to be displayed inside the GUI get here */ |
177 | switch (output.type()) { | 177 | switch (output.type()) { |
178 | case OUTPUT_CONNCLOSE: | 178 | case OUTPUT_CONNCLOSE: |
179 | if (m_close) { | 179 | if (m_close) { |
180 | m_channelTabs.first(); | 180 | m_channelTabs.first(); |
181 | while (m_channelTabs.current() != 0) { | 181 | while (m_channelTabs.current() != 0) { |
182 | m_mainWindow->killTab(m_channelTabs.current()); | 182 | m_mainWindow->killTab(m_channelTabs.current()); |
183 | } | 183 | } |
184 | m_queryTabs.first(); | 184 | m_queryTabs.first(); |
185 | while (m_queryTabs.current() != 0) { | 185 | while (m_queryTabs.current() != 0) { |
186 | m_mainWindow->killTab(m_queryTabs.current()); | 186 | m_mainWindow->killTab(m_queryTabs.current()); |
187 | } | 187 | } |
188 | m_mainWindow->killTab(this); | 188 | m_mainWindow->killTab(this); |
189 | } else { | 189 | } else { |
190 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() +"</font><br>"); | 190 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() +"</font><br>"); |
191 | QListIterator<IRCChannelTab> it(m_channelTabs); | 191 | QListIterator<IRCChannelTab> it(m_channelTabs); |
192 | for (; it.current(); ++it) { | 192 | for (; it.current(); ++it) { |
193 | it.current()->appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() +"</font><br>"); | 193 | it.current()->appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() +"</font><br>"); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | break; | 196 | break; |
197 | case OUTPUT_SELFJOIN: { | 197 | case OUTPUT_SELFJOIN: { |
198 | IRCChannelTab *channeltab = new IRCChannelTab((IRCChannel *)output.getParam(0), this, m_mainWindow, (QWidget *)parent()); | 198 | IRCChannelTab *channeltab = new IRCChannelTab((IRCChannel *)output.getParam(0), this, m_mainWindow, (QWidget *)parent()); |
199 | m_channelTabs.append(channeltab); | 199 | m_channelTabs.append(channeltab); |
200 | m_mainWindow->addTab(channeltab); | 200 | m_mainWindow->addTab(channeltab); |
201 | } | 201 | } |
202 | break; | 202 | break; |
203 | case OUTPUT_CHANPRIVMSG: { | 203 | case OUTPUT_CHANPRIVMSG: { |
204 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 204 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
205 | channelTab->appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(((IRCChannelPerson *)output.getParam(1))->person->nick())+"</font><font color=\"" + m_textColor + "\">> " + output.htmlMessage()+"</font><br>"); | 205 | channelTab->appendText("<font color=\"" + m_textColor + "\"><</font><font color=\"" + m_otherColor + "\">"+IRCOutput::toHTML(((IRCChannelPerson *)output.getParam(1))->person->nick())+"</font><font color=\"" + m_textColor + "\">> " + output.htmlMessage()+"</font><br>"); |
206 | } | 206 | } |
207 | break; | 207 | break; |
208 | case OUTPUT_QUERYACTION: | 208 | case OUTPUT_QUERYACTION: |
209 | case OUTPUT_QUERYPRIVMSG: { | 209 | case OUTPUT_QUERYPRIVMSG: { |
210 | IRCQueryTab *queryTab = getTabForQuery((IRCPerson *)output.getParam(0)); | 210 | IRCQueryTab *queryTab = getTabForQuery((IRCPerson *)output.getParam(0)); |
211 | if (!queryTab) { | 211 | if (!queryTab) { |
212 | queryTab = new IRCQueryTab((IRCPerson *)output.getParam(0), this, m_mainWindow, (QWidget *)parent()); | 212 | queryTab = new IRCQueryTab((IRCPerson *)output.getParam(0), this, m_mainWindow, (QWidget *)parent()); |
213 | m_queryTabs.append(queryTab); | 213 | m_queryTabs.append(queryTab); |
214 | m_mainWindow->addTab(queryTab); | 214 | m_mainWindow->addTab(queryTab); |
215 | } | 215 | } |
216 | queryTab->display(output); | 216 | queryTab->display(output); |
217 | } | 217 | } |
218 | break; | 218 | break; |
219 | case OUTPUT_SELFPART: { | 219 | case OUTPUT_SELFPART: { |
220 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 220 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
221 | if (channelTab) | 221 | if (channelTab) |
222 | m_mainWindow->killTab(channelTab); | 222 | m_mainWindow->killTab(channelTab); |
223 | } | 223 | } |
224 | break; | 224 | break; |
225 | case OUTPUT_SELFKICK: { | 225 | case OUTPUT_SELFKICK: { |
226 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); | 226 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); |
227 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 227 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
228 | if (channelTab) | 228 | if (channelTab) |
229 | m_mainWindow->killTab(channelTab); | 229 | m_mainWindow->killTab(channelTab); |
230 | } | 230 | } |
231 | break; | 231 | break; |
232 | case OUTPUT_CHANACTION: { | 232 | case OUTPUT_CHANACTION: { |
233 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 233 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
234 | channelTab->appendText("<font color=\"" + m_otherColor + "\">"+output.htmlMessage()+"</font><br>"); | 234 | channelTab->appendText("<font color=\"" + m_otherColor + "\">"+output.htmlMessage()+"</font><br>"); |
235 | } | 235 | } |
236 | break; | 236 | break; |
237 | case OUTPUT_TOPIC: { | 237 | case OUTPUT_TOPIC: { |
238 | IRCChannel *channel = (IRCChannel *) output.getParam(0); | 238 | IRCChannel *channel = (IRCChannel *) output.getParam(0); |
239 | if (channel) { | 239 | if (channel) { |
240 | IRCChannelTab *channelTab = getTabForChannel(channel); | 240 | IRCChannelTab *channelTab = getTabForChannel(channel); |
241 | if (channelTab) { | 241 | if (channelTab) { |
242 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 242 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
243 | return; | 243 | return; |
244 | } | 244 | } |
245 | } | 245 | } |
246 | appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 246 | appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
247 | } | 247 | } |
248 | break; | 248 | break; |
249 | case OUTPUT_QUIT: { | 249 | case OUTPUT_QUIT: { |
250 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); | 250 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); |
251 | QListIterator<IRCChannelTab> it(m_channelTabs); | 251 | QListIterator<IRCChannelTab> it(m_channelTabs); |
252 | for (; it.current(); ++it) { | 252 | for (; it.current(); ++it) { |
253 | if (it.current()->list()->hasPerson(nick)) { | 253 | if (it.current()->list()->hasPerson(nick)) { |
254 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 254 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
255 | it.current()->list()->update(); | 255 | it.current()->list()->update(); |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } |
259 | break; | 259 | break; |
260 | case OUTPUT_OTHERJOIN: | 260 | case OUTPUT_OTHERJOIN: |
261 | case OUTPUT_OTHERKICK: | 261 | case OUTPUT_OTHERKICK: |
262 | case OUTPUT_CHANPERSONMODE: | 262 | case OUTPUT_CHANPERSONMODE: |
263 | case OUTPUT_OTHERPART: { | 263 | case OUTPUT_OTHERPART: { |
264 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 264 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
265 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 265 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
266 | channelTab->list()->update(); | 266 | channelTab->list()->update(); |
267 | } | 267 | } |
268 | break; | 268 | break; |
269 | case OUTPUT_CTCP: | 269 | case OUTPUT_CTCP: |
270 | appendText("<font color=\"" + m_notificationColor + "\">" + output.htmlMessage() + "</font><br>"); | 270 | appendText("<font color=\"" + m_notificationColor + "\">" + output.htmlMessage() + "</font><br>"); |
271 | break; | 271 | break; |
272 | case OUTPUT_ERROR: | 272 | case OUTPUT_ERROR: |
273 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); | 273 | appendText("<font color=\"" + m_errorColor + "\">" + output.htmlMessage() + "</font><br>"); |
274 | break; | 274 | break; |
275 | default: | 275 | default: |
276 | appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() + "</font><br>"); | 276 | appendText("<font color=\"" + m_serverColor + "\">" + output.htmlMessage() + "</font><br>"); |
277 | break; | 277 | break; |
278 | } | 278 | } |
279 | } | 279 | } |