---
#id: insane
name: iNSANE
identifier: insane
description: iNSANE is a HUNGARIAN Private Torrent Tracker for 0DAY / GENERAL
language: hu
urls:
  - https://newinsane.info/
privacy: private
protocol: torrent
supports:
  - irc
  - rss
# source: custom
settings:
  - name: passkey
    type: secret
    required: true
    label: Passkey
    help: "Check in Settings (newinsane.info/settings.php) or RSS (newinsane.info/rss_list.php) to find your passkey."

irc:
  network: IRC2 iNSANE
  server: irc2.hu
  port: 6697
  tls: true
  channels:
    - "#insane"
  announcers:
    - Insane
  settings:
    - name: nick
      type: text
      required: true
      label: Nick
      help: Bot nick. Eg. user_bot

    - name: auth.account
      type: text
      required: false
      label: NickServ Account
      help: NickServ account. Make sure to group your user and bot.

    - name: auth.password
      type: secret
      required: false
      label: NickServ Password
      help: NickServ password

  parse:
    type: single
    lines:
      - tests:
        - line: '[Új] Good.Kids.2016.BDRip.x264.HuN-No1 -== Film/Hun/SD ==- 923.67 MB - 5 file => https://newinsane.info/details.php?id=652387'
          expect:
            torrentName: Good.Kids.2016.BDRip.x264.HuN-No1
            category: 'Film/Hun/SD'
            torrentSize: "923.67 MB"
            baseUrl: https://newinsane.info/
            torrentId: "652387"
        pattern: \[Új\] (.*) -== (.*) ==- (.*) - .* file => (https://.*/)details.php.*id=(.*)
        vars:
          - torrentName
          - category
          - torrentSize
          - baseUrl
          - torrentId

    match:
      infourl: "/details.php?id={{ .torrentId }}"
      torrenturl: "/download.php/{{ .torrentId }}/{{ .passkey }}/[iNs-{{ .torrentId }}][{{ .category }}]{{ .torrentName }}.torrent"
      encode:
        - torrentName
