Diffstat (limited to 'noncore/net/opieirc/ircmessageparser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmessageparser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp index a2be5a4..4038673 100644 --- a/noncore/net/opieirc/ircmessageparser.cpp +++ b/noncore/net/opieirc/ircmessageparser.cpp | |||
@@ -23,12 +23,13 @@ IRCLiteralMessageParserStruct IRCMessageParser::literalParserProcTable[] = { | |||
23 | IRCCTCPMessageParserStruct IRCMessageParser::ctcpParserProcTable[] = { | 23 | IRCCTCPMessageParserStruct IRCMessageParser::ctcpParserProcTable[] = { |
24 | { "PING", FUNC(parseCTCPPing) }, | 24 | { "PING", FUNC(parseCTCPPing) }, |
25 | { "VERSION", FUNC(parseCTCPVersion) }, | 25 | { "VERSION", FUNC(parseCTCPVersion) }, |
26 | { "ACTION", FUNC(parseCTCPAction) }, | 26 | { "ACTION", FUNC(parseCTCPAction) }, |
27 | { 0 , 0 } | 27 | { 0 , 0 } |
28 | }; | 28 | }; |
29 | |||
29 | /* Lookup table for numerical commands */ | 30 | /* Lookup table for numerical commands */ |
30 | IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { | 31 | IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { |
31 | { 1, FUNC(parseNumerical001) }, // RPL_WELCOME | 32 | { 1, FUNC(parseNumerical001) }, // RPL_WELCOME |
32 | { 2, FUNC(parseNumerical002) }, // RPL_YOURHOST | 33 | { 2, FUNC(parseNumerical002) }, // RPL_YOURHOST |
33 | { 3, FUNC(parseNumerical003) }, // RPL_CREATED | 34 | { 3, FUNC(parseNumerical003) }, // RPL_CREATED |
34 | { 4, FUNC(parseNumerical004) }, // RPL_MYINFO | 35 | { 4, FUNC(parseNumerical004) }, // RPL_MYINFO |
@@ -225,17 +226,19 @@ void IRCMessageParser::parseLiteralQuit(IRCMessage *message) { | |||
225 | QList<IRCChannel> channels; | 226 | QList<IRCChannel> channels; |
226 | m_session->getChannelsByPerson(person, channels); | 227 | m_session->getChannelsByPerson(person, channels); |
227 | QListIterator<IRCChannel> it(channels); | 228 | QListIterator<IRCChannel> it(channels); |
228 | for (;it.current(); ++it) { | 229 | for (;it.current(); ++it) { |
229 | IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick()); | 230 | IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick()); |
230 | it.current()->removePerson(chanperson); | 231 | it.current()->removePerson(chanperson); |
232 | delete chanperson; | ||
231 | } | 233 | } |
232 | m_session->removePerson(person); | 234 | m_session->removePerson(person); |
233 | IRCOutput output(OUTPUT_QUIT, mask.nick() + tr(" has quit ") + "(" + message->param(0) + ")"); | 235 | IRCOutput output(OUTPUT_QUIT, mask.nick() + tr(" has quit ") + "(" + message->param(0) + ")"); |
234 | output.addParam(person); | 236 | output.addParam(person); |
235 | emit outputReady(output); | 237 | emit outputReady(output); |
238 | delete person; | ||
236 | } else { | 239 | } else { |
237 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person quit - desynchronized?"))); | 240 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person quit - desynchronized?"))); |
238 | } | 241 | } |
239 | } | 242 | } |
240 | 243 | ||
241 | void IRCMessageParser::parseLiteralError(IRCMessage *message) { | 244 | void IRCMessageParser::parseLiteralError(IRCMessage *message) { |