public void newMessage(IrcMessage msg) {
    if ((!preferences.isSpamFilterEnabled()
        || new Date().getTime()
            > IrcNotificationManager.getInstance().getLastSoundDate() + 60000L)) {
      Uri sound = preferences.getNotificationSound();
      if (sound != null) {
        MediaPlayer mp = MediaPlayer.create(this, sound);
        if (mp != null) {
          mp.start();
        }
      }

      if (preferences.isVibrationEnabled()) {
        Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
        if (v != null) {
          v.vibrate(500);
        }
      }

      IrcNotificationManager.getInstance().setLastSoundDate(new Date().getTime());
    }

    if (preferences.isFeedViewDefault()) {
      channelToView = FEED;
    } else {
      channelToView = msg.getLogicalChannel();
    }
    startMainApp(false);
  }