+
+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));
+}
+
+/* template
+void CoreSessionEventProcessor::processIrcEvent(IrcEvent *e) {
+ if(!checkParamCount(e, 1))
+ return;
+
+}
+*/