summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircservertab.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircservertab.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index 1d9520a..2c28507 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -119,25 +119,19 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) {
}
}
else if (command == "OP"){
QString nickname;
stream >> nickname;
- if (nickname.length() > 0) {
- if (line.length() > 7 + nickname.length()) {
- QString text = line.right(line.length()-nickname.length()-7);
- IRCPerson person;
- person.setNick(nickname);
- m_session->kick(((IRCChannelTab *)tab)->channel(), &person, text);
- } else {
+ if (nickname.length() > 0) {
+ QString text = line.right(line.length()-nickname.length()-5);
IRCPerson person;
person.setNick(nickname);
- m_session->kick(((IRCChannelTab *)tab)->channel(), &person);
+ m_session->op(((IRCChannelTab *)tab)->channel(), &person);
}
}
- }
//SEND MODES
else if (command == "MODE"){
QString text = line.right(line.length()-6);
if (text.length() > 0) {
m_session->mode(text);
@@ -343,13 +337,25 @@ void IRCServerTab::display(IRCOutput output) {
it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
it.current()->list()->update();
}
}
}
break;
- case OUTPUT_OTHERJOIN:
+/* case OUTPUT_NICKCHANGE: {
+ //WAS HERE
+ QString nick = ((IRCPerson *)output.getParam(0))->nick();
+ QListIterator<IRCChannelTab> it(m_channelTabs);
+ for (; it.current(); ++it) {
+ if (it.current()->list()->hasPerson(nick)) {
+ it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
+ it.current()->list()->update();
+ }
+ }
+ }
+ break;
+ */ case OUTPUT_OTHERJOIN:
case OUTPUT_OTHERKICK:
case OUTPUT_CHANPERSONMODE:
case OUTPUT_OTHERPART: {
IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0));
channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>");
channelTab->list()->update();