+
+void CoreSessionEventProcessor::processIrcEventPong(IrcEvent *e) {
+ // the server is supposed to send back what we passed as param. and we send a timestamp
+ // but using quote and whatnought one can send arbitrary pings, so we have to do some sanity checks
+ if(checkParamCount(e, 2)) {
+ QString timestamp = e->params().at(1);
+ QTime sendTime = QTime::fromString(timestamp, "hh:mm:ss.zzz");
+ if(sendTime.isValid())
+ e->network()->setLatency(sendTime.msecsTo(QTime::currentTime()) / 2);
+ }
+}
+
+void CoreSessionEventProcessor::processIrcEventTopic(IrcEvent *e) {
+ if(checkParamCount(e, 2)) {
+ e->network()->updateNickFromMask(e->prefix());
+ IrcChannel *channel = e->network()->ircChannel(e->params().at(0));
+ if(channel)
+ channel->setTopic(e->params().at(1));
+ }
+}
+
+/* RPL_WELCOME */
+void CoreSessionEventProcessor::processIrcEvent001(IrcEvent *e) {
+ if(!checkParamCount(e, 1))
+ return;
+
+ QString myhostmask = e->params().at(0).section(' ', -1, -1);
+ e->network()->setCurrentServer(e->prefix());
+ e->network()->setMyNick(nickFromMask(myhostmask));
+}
+
+/* RPL_UMODEIS - "<user_modes> [<user_mode_params>]" */
+void CoreSessionEventProcessor::processIrcEvent221(IrcEvent *) {
+ // TODO: save information in network object
+}
+
+/* RPL_STATSCONN - "Highest connection cout: 8000 (7999 clients)" */
+void CoreSessionEventProcessor::processIrcEvent250(IrcEvent *) {
+ // TODO: save information in network object
+}
+
+/* RPL_LOCALUSERS - "Current local user: 5024 Max: 7999 */
+void CoreSessionEventProcessor::processIrcEvent265(IrcEvent *) {
+ // TODO: save information in network object
+}
+
+/* RPL_GLOBALUSERS - "Current global users: 46093 Max: 47650" */
+void CoreSessionEventProcessor::processIrcEvent266(IrcEvent *) {
+ // TODO: save information in network object
+}
+
+/* template
+void CoreSessionEventProcessor::processIrcEvent(IrcEvent *e) {
+ if(!checkParamCount(e, 1))
+ return;
+
+}
+*/