Diffstat (limited to 'noncore/net/opieirc/ircservertab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 26 |
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) { | |||
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | else if (command == "OP"){ | 122 | else if (command == "OP"){ |
123 | QString nickname; | 123 | QString nickname; |
124 | stream >> nickname; | 124 | stream >> nickname; |
125 | if (nickname.length() > 0) { | 125 | if (nickname.length() > 0) { |
126 | if (line.length() > 7 + nickname.length()) { | 126 | QString text = line.right(line.length()-nickname.length()-5); |
127 | QString text = line.right(line.length()-nickname.length()-7); | ||
128 | IRCPerson person; | ||
129 | person.setNick(nickname); | ||
130 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person, text); | ||
131 | } else { | ||
132 | IRCPerson person; | 127 | IRCPerson person; |
133 | person.setNick(nickname); | 128 | person.setNick(nickname); |
134 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person); | 129 | m_session->op(((IRCChannelTab *)tab)->channel(), &person); |
135 | } | 130 | } |
136 | } | 131 | } |
137 | } | ||
138 | 132 | ||
139 | //SEND MODES | 133 | //SEND MODES |
140 | else if (command == "MODE"){ | 134 | else if (command == "MODE"){ |
141 | QString text = line.right(line.length()-6); | 135 | QString text = line.right(line.length()-6); |
142 | if (text.length() > 0) { | 136 | if (text.length() > 0) { |
143 | m_session->mode(text); | 137 | m_session->mode(text); |
@@ -343,13 +337,25 @@ void IRCServerTab::display(IRCOutput output) { | |||
343 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 337 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
344 | it.current()->list()->update(); | 338 | it.current()->list()->update(); |
345 | } | 339 | } |
346 | } | 340 | } |
347 | } | 341 | } |
348 | break; | 342 | break; |
349 | case OUTPUT_OTHERJOIN: | 343 | /* case OUTPUT_NICKCHANGE: { |
344 | //WAS HERE | ||
345 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); | ||
346 | QListIterator<IRCChannelTab> it(m_channelTabs); | ||
347 | for (; it.current(); ++it) { | ||
348 | if (it.current()->list()->hasPerson(nick)) { | ||
349 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | ||
350 | it.current()->list()->update(); | ||
351 | } | ||
352 | } | ||
353 | } | ||
354 | break; | ||
355 | */ case OUTPUT_OTHERJOIN: | ||
350 | case OUTPUT_OTHERKICK: | 356 | case OUTPUT_OTHERKICK: |
351 | case OUTPUT_CHANPERSONMODE: | 357 | case OUTPUT_CHANPERSONMODE: |
352 | case OUTPUT_OTHERPART: { | 358 | case OUTPUT_OTHERPART: { |
353 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 359 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
354 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 360 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
355 | channelTab->list()->update(); | 361 | channelTab->list()->update(); |