Diffstat (limited to 'noncore/net/opieirc/ircmessageparser.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmessageparser.cpp | 61 |
1 files changed, 25 insertions, 36 deletions
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp index ecc7e9a..f8ccbb6 100644 --- a/noncore/net/opieirc/ircmessageparser.cpp +++ b/noncore/net/opieirc/ircmessageparser.cpp | |||
@@ -31,14 +31,15 @@ IRCCTCPMessageParserStruct IRCMessageParser::ctcpParserProcTable[] = { | |||
31 | IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { | 31 | IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { |
32 | { 1, FUNC(parseNumerical001) }, // RPL_WELCOME | 32 | { 1, FUNC(parseNumericalSecondParam) }, // RPL_WELCOME |
33 | { 2, FUNC(parseNumerical002) }, // RPL_YOURHOST | 33 | { 2, FUNC(parseNumericalSecondParam) }, // RPL_YOURHOST |
34 | { 3, FUNC(parseNumerical003) }, // RPL_CREATED | 34 | { 3, FUNC(parseNumericalSecondParam) }, // RPL_CREATED |
35 | { 4, FUNC(parseNumerical004) }, // RPL_MYINFO | 35 | { 4, FUNC(parseNumericalAllParams) }, // RPL_MYINFO |
36 | { 5, FUNC(parseNumerical005) }, // RPL_BOUNCE, RPL_PROTOCTL | 36 | { 5, FUNC(parseNumericalSecondParam) }, // RPL_BOUNCE, RPL_PROTOCTL |
37 | { 251, FUNC(parseNumericalStats) }, // RPL_LUSERCLIENT | 37 | { 250, FUNC(parseNumericalAllParams) }, // RPL_STATSCONN |
38 | { 252, FUNC(parseNumericalStats) }, // RPL_LUSEROP | 38 | { 251, FUNC(parseNumericalSecondParam) }, // RPL_LUSERCLIENT |
39 | { 265, FUNC(parseNumericalStats) }, // RPL_LOCALUSERS | 39 | { 252, FUNC(parseNumericalAllParams) }, // RPL_LUSEROP |
40 | { 266, FUNC(parseNumericalStats) }, // RPL_GLOBALUSERS | 40 | { 253, FUNC(parseNumericalAllParams) }, // RPL_LUSERUNKNOWN |
41 | { 250, FUNC(parseNumericalStats) }, // RPL_STATSCONN | 41 | { 254, FUNC(parseNumericalAllParams) }, // RPL_LUSERCHANNELS |
42 | { 254, FUNC(nullFunc)}, // RPL_LUSERCHANNELS | 42 | { 255, FUNC(parseNumericalSecondParam) }, // RPL_LUSERME |
43 | { 255, FUNC(parseNumericalStats) }, // RPL_LUSERNAME | 43 | { 265, FUNC(parseNumericalAllParams) }, // RPL_LOCALUSERS |
44 | { 266, FUNC(parseNumericalAllParams) }, // RPL_GLOBALUSERS | ||
44 | { 332, FUNC(parseNumericalTopic) }, // RPL_TOPIC | 45 | { 332, FUNC(parseNumericalTopic) }, // RPL_TOPIC |
@@ -47,10 +48,11 @@ IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { | |||
47 | { 366, FUNC(parseNumericalEndOfNames) }, // RPL_ENDOFNAMES | 48 | { 366, FUNC(parseNumericalEndOfNames) }, // RPL_ENDOFNAMES |
48 | { 375, FUNC(parseNumericalStats) }, // RPL_MOTDSTART | 49 | { 372, FUNC(parseNumericalSecondParam) }, // RPL_MOTD |
49 | { 372, FUNC(parseNumericalStats) }, // RPL_MOTD | 50 | { 375, FUNC(parseNumericalSecondParam) }, // RPL_MOTDSTART |
50 | { 376, FUNC(parseNumericalStats) }, // RPL_ENDOFMOTD | 51 | { 376, FUNC(parseNumericalSecondParam) }, // RPL_ENDOFMOTD |
51 | { 377, FUNC(parseNumericalStats) }, // RPL_MOTD2 | 52 | { 377, FUNC(parseNumericalSecondParam) }, // RPL_MOTD2 |
52 | { 378, FUNC(parseNumericalStats) }, // RPL_MOTD3 | 53 | { 378, FUNC(parseNumericalSecondParam) }, // RPL_MOTD3 |
53 | { 401, FUNC(parseNumericalNoSuchNick) }, // ERR_NOSUCHNICK | 54 | { 401, FUNC(parseNumericalNoSuchNick) }, // ERR_NOSUCHNICK |
54 | { 406, FUNC(parseNumericalNoSuchNick) }, // ERR_WASNOSUCHNICK | 55 | { 406, FUNC(parseNumericalNoSuchNick) }, // ERR_WASNOSUCHNICK |
55 | { 412, FUNC(parseNumericalStats) }, // ERR_NOTEXTTOSEND | 56 | { 412, FUNC(parseNumericalSecondParam) }, // ERR_NOTEXTTOSEND |
57 | { 422, FUNC(parseNumericalSecondParam) }, // ERR_NOMOTD | ||
56 | { 433, FUNC(parseNumericalNicknameInUse) }, // ERR_NICKNAMEINUSE | 58 | { 433, FUNC(parseNumericalNicknameInUse) }, // ERR_NICKNAMEINUSE |
@@ -59,2 +61,3 @@ IRCNumericalMessageParserStruct IRCMessageParser::numericalParserProcTable[] = { | |||
59 | 61 | ||
62 | |||
60 | IRCMessageParser::IRCMessageParser(IRCSession *session) { | 63 | IRCMessageParser::IRCMessageParser(IRCSession *session) { |
@@ -462,8 +465,4 @@ void IRCMessageParser::parseLiteralKick(IRCMessage *message) { | |||
462 | 465 | ||
463 | void IRCMessageParser::parseNumerical001(IRCMessage *message) { | ||
464 | /* Welcome to IRC message, display */ | ||
465 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->param(1))); | ||
466 | } | ||
467 | 466 | ||
468 | void IRCMessageParser::parseNumerical002(IRCMessage *message) { | 467 | void IRCMessageParser::parseNumericalSecondParam(IRCMessage *message) { |
469 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->param(1))); | 468 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->param(1))); |
@@ -471,11 +470,3 @@ void IRCMessageParser::parseNumerical002(IRCMessage *message) { | |||
471 | 470 | ||
472 | void IRCMessageParser::parseNumerical003(IRCMessage *message) { | 471 | void IRCMessageParser::parseNumericalAllParams(IRCMessage *message) { |
473 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->param(1))); | ||
474 | } | ||
475 | |||
476 | void IRCMessageParser::parseNumerical004(IRCMessage *message) { | ||
477 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->allParameters())); | ||
478 | } | ||
479 | |||
480 | void IRCMessageParser::parseNumerical005(IRCMessage *message) { | ||
481 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->allParameters())); | 472 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->allParameters())); |
@@ -483,6 +474,2 @@ void IRCMessageParser::parseNumerical005(IRCMessage *message) { | |||
483 | 474 | ||
484 | void IRCMessageParser::parseNumericalStats(IRCMessage *message) { | ||
485 | emit outputReady(IRCOutput(OUTPUT_SERVERMESSAGE, message->param(1))); | ||
486 | } | ||
487 | |||
488 | void IRCMessageParser::parseNumericalNames(IRCMessage *message) { | 475 | void IRCMessageParser::parseNumericalNames(IRCMessage *message) { |
@@ -570 +557,3 @@ void IRCMessageParser::parseNumericalTopicWhoTime(IRCMessage *) { | |||
570 | } | 557 | } |
558 | |||
559 | |||