X-Chat plugin: AniDB Search

More useless plugins for X-Chat: AniDBSearch, triggered by channel text starting with .anidb, looks up the search string on AniDB and prints the corresponding AniDB entry url, or the search url if multiple results matching the search string were found. Nothing too fancy. Can also be triggered by typing /anidb.

PS: No AniDB API calls. Just HTTP fetch and some regexps.

Current: AniDBSearch 2.2

Changelog:

  • 2.2
    • Updated AniDB regexps.
    • Added official Japanese title to output. Be sure to set server encoding to UTF-8, this isn’t 1990 anymore!
    • When more than one anime matches the search string, AniDBSearch now prints the first few results instead of just the actual search URL.
    • Added message throttling to avoid being flooded off during above operation.
    • No longer uses threaded HTTP fetch on win32. This means that the client will become unresponsive for a while after each command. It also means that the script might now actually work on win32. After some poking around I’m no longer sure it ever did. If anyone manages to fit threads and the X-Chat Python plugin – especially xchat.command – together, be sure to let me know.
    • Various other, minor cleanups.
  • 2.1.4
    • Fixed wrong results when disabling command or trigger (disabling the trigger actually disabled the command and vice versa)
    • Fixed printing in the wrong context (Thanks to protospork for pointing it out, I never noticed)
  • 2.1.3
    • Fixed crash due to invalid arguments to /anidb
    • Fixed exception in connection handler
  • 2.1.2
    • Updated AniDB URL and regexps
  • 2.1.1:
    • Added /anidb -b to open AniDB URL in browser
    • Added /anidb -p to output the URL to the current channel instead of privmsg.
      This can be considered a workaround to using .anidb yourself (see below)
    • Disabled “Your Message” hook on win32 – locks up X-Chat
    • Fixes for backward compatibility to Python 2.4
  • 2.1.0:
    • Completely rewritten previous code

2 Responses to “X-Chat plugin: AniDB Search”

  1. protospork says:

    I tried this and when someone used the trigger in a channel I didn’t have in focus, it printed the response in the focused window (say I’m talking in #A and someone in #5 uses .anidb, my client will print the link into #A instead of #5, even if #A is excluded) :\

    I tried to remove the trigger so I’d at least have the /anidb command for myself, but it disabled the script completely. Any ideas?

  2. Anonymous says:

    You are indeed right, this was a pretty silly mistake. I never noticed though, so thanks for pointing that out. Fixed both issues in 2.1.4.

    Oh, and sorry about this rather delayed response, your comment was filtered out by my spam plugin for some reason.

Leave a Reply