summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircservertab.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircservertab.cpp39
1 files changed, 30 insertions, 9 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index e031d4d..90353f2 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -19,3 +19,3 @@ IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *pa
19 m_lines = 0; 19 m_lines = 0;
20 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); 20 m_description->setText(tr("Connecting to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>");
21 m_textview = new QTextView(this); 21 m_textview = new QTextView(this);
@@ -37,2 +37,3 @@ IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *pa
37 connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); 37 connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling()));
38 connect(m_session, SIGNAL(updateChannels()), this, SLOT(slotUpdateChannels()));
38 settingsChanged(); 39 settingsChanged();
@@ -115,3 +116,9 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) {
115 stream >> channel; 116 stream >> channel;
116 if (channel.length() > 0 && (channel.startsWith("#") || channel.startsWith("+"))) { 117 /* According to RFC 1459 */
118 if (channel.length() > 0 && channel.length() < 200 &&
119 channel.find(",") == -1 && channel.find("") == -1) {
120
121 if (!channel.startsWith("#") && !channel.startsWith("&")) {
122 channel = channel.prepend("#");
123 }
117 m_session->join(channel); 124 m_session->join(channel);
@@ -347,3 +354,3 @@ void IRCServerTab::display(IRCOutput output) {
347 } 354 }
348 appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); 355 IRCChannelTab::enqueue(channel->channelname(), "<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
349 } 356 }
@@ -361,15 +368,18 @@ void IRCServerTab::display(IRCOutput output) {
361 break; 368 break;
362/* case OUTPUT_NICKCHANGE: { 369 case OUTPUT_NICKCHANGE: {
363 //WAS HERE 370 QString *nick = static_cast<QString*>(output.getParam(0));
364 QString nick = ((IRCPerson *)output.getParam(0))->nick(); 371 if(!nick) {
372 appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
373 break;
374 }
365 QListIterator<IRCChannelTab> it(m_channelTabs); 375 QListIterator<IRCChannelTab> it(m_channelTabs);
366 for (; it.current(); ++it) { 376 for (; it.current(); ++it) {
367 if (it.current()->list()->hasPerson(nick)) { 377 if (it.current()->list()->hasPerson(*nick)) {
368 it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); 378 it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
369 it.current()->list()->update();
370 } 379 }
371 } 380 }
381 delete nick;
372 } 382 }
373 break; 383 break;
374 */ case OUTPUT_OTHERJOIN: 384 case OUTPUT_OTHERJOIN:
375 case OUTPUT_OTHERKICK: 385 case OUTPUT_OTHERKICK:
@@ -388,2 +398,5 @@ void IRCServerTab::display(IRCOutput output) {
388 break; 398 break;
399 case OUTPUT_TITLE:
400 m_description->setText(output.message());
401 break;
389 default: 402 default:
@@ -393 +406,9 @@ void IRCServerTab::display(IRCOutput output) {
393} 406}
407
408void IRCServerTab::slotUpdateChannels() {
409 QListIterator<IRCChannelTab> it(m_channelTabs);
410 for (; it.current(); ++it) {
411 it.current()->list()->update();
412 }
413}
414