summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc
Unidiff
Diffstat (limited to 'noncore/net/opieirc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmessageparser.cpp20
-rw-r--r--noncore/net/opieirc/ircperson.cpp2
-rw-r--r--noncore/net/opieirc/ircsettings.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp
index e8d3b1a..6b88f34 100644
--- a/noncore/net/opieirc/ircmessageparser.cpp
+++ b/noncore/net/opieirc/ircmessageparser.cpp
@@ -68,29 +68,29 @@ void IRCMessageParser::parse(IRCMessage *message) {
68 for (int i=0; i<numericalParserProcTable[i].commandNumber; i++) { 68 for (int i=0; i<numericalParserProcTable[i].commandNumber; i++) {
69 if (message->commandNumber() == numericalParserProcTable[i].commandNumber) { 69 if (message->commandNumber() == numericalParserProcTable[i].commandNumber) {
70 (this->*(numericalParserProcTable[i].proc))(message); 70 (this->*(numericalParserProcTable[i].proc))(message);
71 return; 71 return;
72 } 72 }
73 } 73 }
74 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled numeric command : ")+QString::number(message->commandNumber()))); 74 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled numeric command: %1").arg( QString::number(message->commandNumber()) )));
75 } else if (message->isCTCP()) { 75 } else if (message->isCTCP()) {
76 for (int i=0; ctcpParserProcTable[i].commandName; i++) { 76 for (int i=0; ctcpParserProcTable[i].commandName; i++) {
77 if (message->ctcpCommand() == ctcpParserProcTable[i].commandName) { 77 if (message->ctcpCommand() == ctcpParserProcTable[i].commandName) {
78 (this->*(ctcpParserProcTable[i].proc))(message); 78 (this->*(ctcpParserProcTable[i].proc))(message);
79 return; 79 return;
80 } 80 }
81 } 81 }
82 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled ctcp command : ")+message->ctcpCommand())); 82 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled ctcp command: %1").arg( message->ctcpCommand())) );
83 } else { 83 } else {
84 for (int i=0; literalParserProcTable[i].commandName; i++) { 84 for (int i=0; literalParserProcTable[i].commandName; i++) {
85 if (message->command() == literalParserProcTable[i].commandName) { 85 if (message->command() == literalParserProcTable[i].commandName) {
86 (this->*(literalParserProcTable[i].proc))(message); 86 (this->*(literalParserProcTable[i].proc))(message);
87 return; 87 return;
88 } 88 }
89 } 89 }
90 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled literal command : ")+message->command())); 90 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received unhandled literal command: %1").arg( message->command()) ));
91 } 91 }
92} 92}
93 93
94void IRCMessageParser::nullFunc(IRCMessage *) { 94void IRCMessageParser::nullFunc(IRCMessage *) {
95 /* Do nothing */ 95 /* Do nothing */
96} 96}
@@ -125,13 +125,13 @@ void IRCMessageParser::parseLiteralJoin(IRCMessage *message) {
125 person = new IRCPerson(message->prefix()); 125 person = new IRCPerson(message->prefix());
126 m_session->addPerson(person); 126 m_session->addPerson(person);
127 } 127 }
128 chanperson->flags = 0; 128 chanperson->flags = 0;
129 chanperson->person = person; 129 chanperson->person = person;
130 channel->addPerson(chanperson); 130 channel->addPerson(chanperson);
131 IRCOutput output(OUTPUT_OTHERJOIN, mask.nick() + tr(" joined channel ") + channelName); 131 IRCOutput output(OUTPUT_OTHERJOIN ,tr("%1 joined channel %2").arg( mask.nick() ).arg( channelName ));
132 output.addParam(channel); 132 output.addParam(channel);
133 output.addParam(chanperson); 133 output.addParam(chanperson);
134 emit outputReady(output); 134 emit outputReady(output);
135 } else { 135 } else {
136 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Person has already joined the channel - desynchronized?"))); 136 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Person has already joined the channel - desynchronized?")));
137 } 137 }
@@ -145,21 +145,21 @@ void IRCMessageParser::parseLiteralPart(IRCMessage *message) {
145 QString channelName = message->param(0).lower(); 145 QString channelName = message->param(0).lower();
146 IRCChannel *channel = m_session->getChannel(channelName); 146 IRCChannel *channel = m_session->getChannel(channelName);
147 IRCPerson mask(message->prefix()); 147 IRCPerson mask(message->prefix());
148 if (channel) { 148 if (channel) {
149 if (mask.nick() == m_session->m_server->nick()) { 149 if (mask.nick() == m_session->m_server->nick()) {
150 m_session->removeChannel(channel); 150 m_session->removeChannel(channel);
151 IRCOutput output(OUTPUT_SELFPART, tr("You left channel ") + channelName); 151 IRCOutput output(OUTPUT_SELFPART, tr("You left channel %1").arg( channelName ));
152 output.addParam(channel); 152 output.addParam(channel);
153 emit outputReady(output); 153 emit outputReady(output);
154 delete channel; 154 delete channel;
155 } else { 155 } else {
156 IRCChannelPerson *person = channel->getPerson(mask.nick()); 156 IRCChannelPerson *person = channel->getPerson(mask.nick());
157 if (person) { 157 if (person) {
158 channel->removePerson(person); 158 channel->removePerson(person);
159 IRCOutput output(OUTPUT_OTHERPART, mask.nick() + tr(" left channel ") + channelName); 159 IRCOutput output(OUTPUT_OTHERPART, tr("%1 left channel %2").arg( mask.nick() ).arg( channelName) );
160 output.addParam(channel); 160 output.addParam(channel);
161 output.addParam(person); 161 output.addParam(person);
162 emit outputReady(output); 162 emit outputReady(output);
163 delete person; 163 delete person;
164 } else { 164 } else {
165 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Parting person not found - desynchronized?"))); 165 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Parting person not found - desynchronized?")));
@@ -195,33 +195,33 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) {
195 output.addParam(person); 195 output.addParam(person);
196 emit outputReady(output); 196 emit outputReady(output);
197 } else { 197 } else {
198 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown sender"))); 198 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown sender")));
199 } 199 }
200 } else { 200 } else {
201 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel ") + message->param(0).lower())); 201 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel %1").arg(message->param(0).lower()) ));
202 } 202 }
203 } else { 203 } else {
204 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received PRIVMSG of unknown type"))); 204 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received PRIVMSG of unknown type")));
205 } 205 }
206} 206}
207 207
208void IRCMessageParser::parseLiteralNick(IRCMessage *message) { 208void IRCMessageParser::parseLiteralNick(IRCMessage *message) {
209 IRCPerson mask(message->prefix()); 209 IRCPerson mask(message->prefix());
210 210
211 if (mask.nick() == m_session->m_server->nick()) { 211 if (mask.nick() == m_session->m_server->nick()) {
212 /* We are changing our nickname */ 212 /* We are changing our nickname */
213 m_session->m_server->setNick(message->param(0)); 213 m_session->m_server->setNick(message->param(0));
214 IRCOutput output(OUTPUT_NICKCHANGE, tr("You are now known as ")+message->param(0)); 214 IRCOutput output(OUTPUT_NICKCHANGE, tr("You are now known as %1").arg( message->param(0)));
215 output.addParam(0); 215 output.addParam(0);
216 emit outputReady(output); 216 emit outputReady(output);
217 } else { 217 } else {
218 /* Someone else is */ 218 /* Someone else is */
219 IRCPerson *person = m_session->getPerson(mask.nick()); 219 IRCPerson *person = m_session->getPerson(mask.nick());
220 if (person) { 220 if (person) {
221 IRCOutput output(OUTPUT_NICKCHANGE, mask.nick() + tr(" is now known as ") + message->param(0)); 221 IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0 )));
222 output.addParam(person); 222 output.addParam(person);
223 emit outputReady(output); 223 emit outputReady(output);
224 } else { 224 } else {
225 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Nickname change of an unknown person"))); 225 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Nickname change of an unknown person")));
226 } 226 }
227 } 227 }
@@ -237,13 +237,13 @@ void IRCMessageParser::parseLiteralQuit(IRCMessage *message) {
237 for (;it.current(); ++it) { 237 for (;it.current(); ++it) {
238 IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick()); 238 IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick());
239 it.current()->removePerson(chanperson); 239 it.current()->removePerson(chanperson);
240 delete chanperson; 240 delete chanperson;
241 } 241 }
242 m_session->removePerson(person); 242 m_session->removePerson(person);
243 IRCOutput output(OUTPUT_QUIT, mask.nick() + tr(" has quit ") + "(" + message->param(0) + ")"); 243 IRCOutput output(OUTPUT_QUIT, tr("%1 has quit (%2)" ).arg( mask.nick() ).arg( message->param(0) ));
244 output.addParam(person); 244 output.addParam(person);
245 emit outputReady(output); 245 emit outputReady(output);
246 delete person; 246 delete person;
247 } else { 247 } else {
248 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person quit - desynchronized?"))); 248 emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person quit - desynchronized?")));
249 } 249 }
diff --git a/noncore/net/opieirc/ircperson.cpp b/noncore/net/opieirc/ircperson.cpp
index 2f5b435..1dd2679 100644
--- a/noncore/net/opieirc/ircperson.cpp
+++ b/noncore/net/opieirc/ircperson.cpp
@@ -38,13 +38,13 @@ void IRCPerson::setUser(QString user) {
38 m_user = user; 38 m_user = user;
39} 39}
40 40
41void IRCPerson::setHost(QString host) { 41void IRCPerson::setHost(QString host) {
42 m_host = host; 42 m_host = host;
43} 43}
44 44 // -- GETTER FUNCS --
45QString IRCPerson::nick() { 45QString IRCPerson::nick() {
46 return m_nick; 46 return m_nick;
47} 47}
48 48
49QString IRCPerson::user() { 49QString IRCPerson::user() {
50 return m_user; 50 return m_user;
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index b110a5b..70d5445 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -6,13 +6,13 @@
6#include <qwhatsthis.h> 6#include <qwhatsthis.h>
7#include "ircsettings.h" 7#include "ircsettings.h"
8#include "irctab.h" 8#include "irctab.h"
9#include "ircmisc.h" 9#include "ircmisc.h"
10 10
11IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) { 11IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
12 setCaption("Settings"); 12 setCaption(tr("Settings") );
13 m_config = new Config("OpieIRC"); 13 m_config = new Config("OpieIRC");
14 m_config->setGroup("OpieIRC"); 14 m_config->setGroup("OpieIRC");
15 QHBoxLayout *l = new QHBoxLayout(this, 2, 2); 15 QHBoxLayout *l = new QHBoxLayout(this, 2, 2);
16 OTabWidget *tw = new OTabWidget(this); 16 OTabWidget *tw = new OTabWidget(this);
17 l->addWidget(tw); 17 l->addWidget(tw);
18 /* General Configuration */ 18 /* General Configuration */