+
+ // special treatment for welcome messages like:
+ // :ChanServ!ChanServ@services. NOTICE egst :[#apache] Welcome, this is #apache. Please read the in-channel topic message. This channel is being logged by IRSeekBot. If you have any question please see http://blog.freenode.net/?p=68
+ if(!network()->isChannelName(target)) {
+ QString msg = serverDecode(params[1]);
+ QRegExp welcomeRegExp("^\\[([^\\]]+)\\] ");
+ if(welcomeRegExp.indexIn(msg) != -1) {
+ QString channelname = welcomeRegExp.cap(1);
+ msg = msg.mid(welcomeRegExp.matchedLength());
+ CoreIrcChannel *chan = static_cast<CoreIrcChannel *>(network()->ircChannel(channelname)); // we only have CoreIrcChannels in the core, so this cast is safe
+ if(chan && !chan->receivedWelcomeMsg()) {
+ chan->setReceivedWelcomeMsg();
+ emit displayMsg(Message::Notice, BufferInfo::ChannelBuffer, channelname, msg, prefix);
+ return;
+ }
+ }
+ }
+
+ if(prefix.isEmpty() || target == "AUTH") {