Skip to content

Fetching from other bots, the way AutoGet did it: understand their replies, keep the queue working by itself #926

Description

@chchatzop

The operator had me read AutoGet 6.1 (^OmeN^) and the Autoget 7.40b4 rebuild (eMpTy, 2005) in full, as the download manager that went with OmeNServE. Hardly anyone runs AutoGet now (AutoQ replaced it; AutoGet breaks on current mIRC), so this is not about being compatible with AutoGet users. It's about taking its practices into DCCore's own fetch side (dcc_fetch.py, list_fetch.py). I checked each item against the code first.

Phase 1: a fetch queue that keeps working by itself (the gap)

  1. Understand other servers' replies. Today only "!rar is disabled" is recognised (dcc_fetch.handle_refusal_notice). Everything else waits out FETCH_OFFER_TIMEOUT and ends as "no response". AutoGet 7 carries the exact phrases for OmeNServE (1.31–2.x), SDFind, SpR Jukebox (English and French) and BWI, plus DCCore's own. Each maps to one of four outcomes:
    • accepted, queue position N: shown on the row, and no timeout while queued.
    • bad filename / file deleted / "you need sharing": fail at once, no retry, say why.
    • busy / queue full / "maxed out": back off, retry later.
    • already in your queue: keep waiting.
  2. The queue survives a restart (only finished and failed rows are saved today), and a bot that's offline can be queued for (refused today).
  3. Re-request when the bot is back (JOIN or an advert), after a random delay, plus a periodic retry sweep. The next file from a bot is requested when one finishes, capped by a per-bot limit on files queued there.
  4. Pause a bot after 3 connection failures, with a per-bot on/off switch. Stop fetching when the disk is full (a failed write fails only that row today).

Phase 2: lists

  1. Opt-in automatic list grabbing for bots that advertise and have no list held, on AutoGet's rules:

    • a random 5–360 s delay per request, at most one automatic grab every N minutes;
    • cancel our own request if someone else in the channel just asked for that list;
    • 3 tries, then stop, with 30-minute cool-downs;
    • skip bots below a minimum file count or speed, and bots in "servers only" mode.

    Its author's own counter says 37% of list requests arrived (2,175 of 5,835), so the retry limits matter.

  2. List expiry (refresh when older than N days) and a "seen" mark per list.

  3. "Online only" filter in the cross-list search, since presence is already known.

  4. Slots, queue and speed per bot in the List Browser. The advert already carries them; irc._record_bot() drops them.

Each item is its own PR. I'm starting with 1, since it's what lets 2–4 decide between retrying and giving up. Identity across nick changes stays on #376.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions