summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircconnection.cpp2
-rw-r--r--noncore/net/opieirc/ircmessageparser.cpp2
-rw-r--r--noncore/net/opieirc/ircservereditor.cpp4
-rw-r--r--noncore/net/opieirc/ircservertab.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/opieirc/ircconnection.cpp b/noncore/net/opieirc/ircconnection.cpp
index 5eb0cf2..2325cca 100644
--- a/noncore/net/opieirc/ircconnection.cpp
+++ b/noncore/net/opieirc/ircconnection.cpp
@@ -55,25 +55,25 @@ void IRCConnection::login() {
sendLine(loginString);
}
/* Called when data arrives on the socket */
void IRCConnection::dataReady() {
while(m_socket->canReadLine()) {
IRCMessage message(m_socket->readLine());
if (!m_loggedIn && message.isNumerical() && message.commandNumber() == 1) {
/* Now autojoin all channels specified inside the server profile */
QStringList channels = QStringList::split(QChar(','), m_server->channels());
for (QStringList::Iterator it = channels.begin(); it != channels.end(); ++it) {
QString channelName = (*it).stripWhiteSpace();
- if (channelName.startsWith("#")) {
+ if (channelName.startsWith("#") || channelName.startsWith("+")) {
sendLine("JOIN "+ channelName);
}
}
m_loggedIn = TRUE;
emit outputReady(IRCOutput(OUTPUT_CLIENTMESSAGE, tr("Successfully logged in.")));
}
emit messageArrived(&message);
}
}
/* Called if any type of socket error occurs */
void IRCConnection::error(int num) {
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp
index 2b77414..a95c64e 100644
--- a/noncore/net/opieirc/ircmessageparser.cpp
+++ b/noncore/net/opieirc/ircmessageparser.cpp
@@ -174,25 +174,25 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) {
if (m_session->m_server->nick() == message->param(0)) {
/* IRC Query message detected, verify sender and display it */
IRCPerson mask(message->prefix());
IRCPerson *person = m_session->getPerson(mask.nick());
if (!person) {
/* Person not yet known, create and add to the current session */
person = new IRCPerson(message->prefix());
m_session->addPerson(person);
}
IRCOutput output(OUTPUT_QUERYPRIVMSG, message->param(1));
output.addParam(person);
emit outputReady(output);
- } else if (message->param(0).at(0) == '#') {
+ } else if (message->param(0).at(0) == '#' || message->param(0).at(0) == '+') {
/* IRC Channel message detected, verify sender, channel and display it */
IRCChannel *channel = m_session->getChannel(message->param(0).lower());
if (channel) {
IRCPerson mask(message->prefix());
IRCChannelPerson *person = channel->getPerson(mask.nick());
if (person) {
IRCOutput output(OUTPUT_CHANPRIVMSG, message->param(1));
output.addParam(channel);
output.addParam(person);
emit outputReady(output);
} else {
emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown sender")));
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp
index 5e916ae..f976c84 100644
--- a/noncore/net/opieirc/ircservereditor.cpp
+++ b/noncore/net/opieirc/ircservereditor.cpp
@@ -45,26 +45,26 @@ void IRCServerEditor::accept() {
QMessageBox::critical(this, tr("Error"), tr("Host name required"));
else if (m_port->text().toInt()<=0)
QMessageBox::critical(this, tr("Error"), tr("Port required"));
else if (m_nickname->text().length()==0)
QMessageBox::critical(this, tr("Error"), tr("Nickname required"));
else if (m_realname->text().length()==0)
QMessageBox::critical(this, tr("Error"), tr("Realname required"));
else {
/* Now verify whether the channel list has a valid format */
QStringList channels = QStringList::split(QChar(','), m_channels->text());
for (QStringList::Iterator it = channels.begin(); it != channels.end(); ++it) {
QString channelName = (*it).stripWhiteSpace();
- if (!channelName.startsWith("#")) {
- QMessageBox::critical(this, tr("Error"), tr("The channel list needs to contain a\ncomma separated list of channel\n names which start with '#'"));
+ if (!channelName.startsWith("#") && !channelName.startsWith("+")) {
+ QMessageBox::critical(this, tr("Error"), tr("The channel list needs to contain a\ncomma separated list of channel\n names which start with either '#' or '+'"));
return;
}
}
QDialog::accept();
}
}
IRCServer IRCServerEditor::getServer() {
IRCServer server;
server.setName(m_name->text());
server.setHostname(m_hostname->text());
server.setPort(m_port->text().toInt());
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index aea58a3..d16c05f 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -59,25 +59,25 @@ void IRCServerTab::settingsChanged() {
m_textview->setText("<qt bgcolor=\"" + m_backgroundColor + "\"/>");
}
void IRCServerTab::executeCommand(IRCTab *tab, QString line) {
QTextIStream stream(&line);
QString command;
stream >> command;
command = command.upper().right(command.length()-1);
if (command == "JOIN") {
QString channel;
stream >> channel;
- if (channel.length() > 0 && channel.startsWith("#")) {
+ if (channel.length() > 0 && (channel.startsWith("#") || channel.startsWith("+"))) {
m_session->join(channel);
} else {
tab->appendText("<font color=\"" + m_errorColor + "\">Unknown channel format!</font><br>");
}
} else if (command == "ME") {
QString text = line.right(line.length()-4);
if (text.length() > 0) {
if (tab->isA("IRCChannelTab")) {
tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>");
m_session->sendAction(((IRCChannelTab *)tab)->channel(), text);
} else if (tab->isA("IRCQueryTab")) {
tab->appendText("<font color=\"" + m_selfColor + "\">*" + IRCOutput::toHTML(m_server.nick()) + " " + IRCOutput::toHTML(text) + "</font><br>");