PatchBot's F.A.Q.

Well, not totally true, but it's a sort of synthesis between a FAQ and a readme.txt

### Table of Cuestions (pun intended)

- Q1: What is patchbot?
- Q2: What is 'patching' ?
- Q3: Why would I need to patch ?
- Q4: When should I patch?
- Q5: How patching works?
- Q6: What are those 'sides' you're talking about ?
- Q7: What does patchbot ?
- Q8: How do I install patchbot?
- Q9: How do I remove it?
- Q10: How do I setup it?
- Q11: What's 'Network Box' for ?
- Q12: Some IRC servers don't work!
- Q13: What's the list of folders for ?
- Q14: Are the subfolders used?
- Q15: What's 'Assigned channels' box for ?
- Q16: Why all this mess for source files ?
- Q17: What is 'queue pool' ?
- Q18: Why is 'queue pool' greyed in the GUI?
- Q19: What is 'Cache' box for ?
- Q20: How cache is done?
- Q21: What happens if patchbot is off ?
- Q22: How do I request patch from a patchbot?
- Q23: Patchbot didn't send me a patch, and I got an error; what should I do?
- Q24: How do I quickly reset patchbot status after a failure on client side ?
- Q25: Why can't I select sendCDT again ?
- Q26: I keep having CRC errors: what's wrong ?
- Q27: It says the patch is ready, but it never got sent! How to fix that?
- Q28: Patchbot is slow! Why?
- Q29: Patchbot is slow! I have a quadri-processor system of PIV! Can you optimize?
- Q30: Patchbot is too quick, it gonna kill my system! Help!
- Q30a: I need to use my comp for other things more important. What should I do ?
- Q31: What does the strange thing at the bottom right of the GUI?
- Q32: What does "server replies" tick does?
- Q32a: I don't want the patchbot to reply to a !list. What should I do?
- Q33: I'm using Windows 2000 Advanced Server and mIRC can't load the dll. How can I fix that?

### Replies

Q1: | What is patchbot?
A: | An addon running under mIRC and eventually SysReset (www.sysreset.com), which helps and automates patching of files.
Q2: | What is 'patching' ?
A: | It's to apply a small file containing only differences between a corrupted file and a clean one.
Q3: | Why would I need to patch ?
A: | For different kinds of transfer (IRC,FTP,P2P), corruption may occurs for whatever reason. The consequences of this corruption range from audio out of synch to unusable 700MB RAR archive. Even with higly corrupted files, it's quite better to download a patch of 15MB than redownloading a whole 700MB set.
Q4: | When should I patch?
A: | When SFV or CRC32 values (see www.baka-updates.com for such values with fansubs) don't match the release one.
Q5: | How patching works?
A: | 1. You scan the file with an utility which generates a checksum file (.cdt) 2. You send it to someone that can make the patch (because he has an uncorrupted file 3. He scans to his file with that .cdt, which generates an .cdp 4. You get the cdp and does a last scan with the cdp on your corrupte file
Q6: | What are those 'sides' you're talking about ?
A: | Patchbot is divided into two parts. One is called 'server side' and is to reply automatically to patch requests, make those patches, and can be switched off through the GUI. The other is called 'client side' and automatically makes CDT for you and, if the person making you the patch makes it before the time-out, automatically apply it.
Q7: | What does patchbot ?
A: | Its patching used Zidrav files, hence I'll use its terminology. On the server side, it uses folders to search for files to use as source for making patch (.cdp). It also interacts with users to offer/refuse them patches On the client side, it creates and send the .cdt, waits for a corresponding .cdp, and if he receives a valid one, apply this patch.
Q8: | How do I install patchbot?
A: | If you run SysReset: unpack the archive in sysreset\addons and use the addon manager to load patchobot(.ini) If not: Install it in a folder in mirc folder. Let %fullfilename% be the full pathname of patchbot.ini, like C:\sysreset\addons\patchbot.ini Type /load -rs %fullfilename% and it's done!
Q9: | How do I remove it?
A: | If you use SR: use addon manager Otherwise, type /unload -rs %fullfilename% For further remove deletes all files starting with patchbot in the install dir, plus patchbot.log and Pchanstats.log in mIRC root dir if they exist.
Q10: | How do I set it up ?
A: | Well, you made a first good step: you guessed it should be configured :) In SysReset (or Commands under plain mirc) dropdown menu, an option 'Patchbot' should have appeared. Select it and look at the GUI popping up.
Q11: | What's 'Network Box' for ?
A: | You here manage how networks (like aniverse, dalnet) should be monitored. You therefore can select an existing one, add manually or delete the one selected, or add the current one (no need to guess its name).
Q12: | Some IRC servers don't work!
A: | That's not a question! To find the network in which a server is, mIRC internal database is used... If it doesn't hold it (newer DALnet servers, test servers often act like this, it will only report it as an unknown server. You better avoid those places.
Q13: | What's the list of folders for ?
A: | for the selected network, you can choose folders made available for finding source files in them. If you add a subfolder of a folder already in the list, it will be managed on its own (even for the cache)
Q14: | Are the subfolders used?
A: | Indeed, so be carefull not to put everything in them
Q15: | What's 'Assigned channels' box for ?
A: | When you have selected a folder and a network, you can then select which channels have acces to it
Q16: | Why all this mess for source files ?
A: | mIRC can have several networks at a time. Then, most fileservers work that way: setup a trigger, assign it a folder, restrict access op this trigger to some channels. I could have done a selection by channels then by folders, but I prefer it that way (easier to handle in the code)
Q17: | What is 'queue pool' ?
A: | A nice features of SysReset, allowing for instance to queue 10 MP3 on a trigger, but only one AVI on another.
Q18: | Why is 'queue pool' greyed?
A: | Because you don't run SysReset. Queuepool is only available there.
Q19: | What is 'Cache' box for ?
A: | As @find addon works, it scans a folder to generate a cache or disable the cache. It's done on a per-folder basis. OFF is disabled if no cache is available
Q20: | How cache is done?
A: | If under SR, and if you have cached a folder with @find, patchbot will automatically detect it. Otherwise, patchbot runs its own cache. Contrary to @find addon, it stays in memory, and isn't saved to disk. If you crash, you may have to redo all caching. It is done once, therefore it has none of the options of @find (cyclic recache, recache on load, ...)
Q21: | What happens if patchbot is off ?
A: | The server side will be disabled, and this will be reported by the !patch command It will not report to channel operators when running the /pchanstats command
Q22: | How do I request patch from a patchbot?
A: | First, check where it offers this service (ie what channel), then run the !patch command, which works as @find, ie you can use wildcards and keywords. Check if the results show a file matching yours, and what is the exact name of it. Rename your file to match the reported filename. In the nicklist, select the nick of the patchbot, right-click on it and select SendCDT. Select the file you want to be patched. Wait a bit, a .cdt file should be sent. If a corresponding .cdp is sent back, the patch will be automatically applied.
Q23: | Patchbot didn't send me a patch, and I got an error; what should I do?
A: | By reading the error, you should guess if the problem is you or the patchbot to which you sent the .cdt You have 10 minutes to confirm what patchbot should do with the .cdt. By default it will erase it and reset patchbot status after those 10 minutes. You should then use the /patchbot command (see next question)
Q24: | How do I quickly reset patchbot status after a failure on client side ?
Q25: | Why can't I select sendCDT again ?
A: | Patchbot can only have one process at a time, be it making a .cdt, a .cdp, waiting for a .cdp or applying a .cdp Therefore SendCDT or Patchbot are disabled during such operations. If an error occurs, you can use /patchbot command to reset the bot. In order to keep the .cdt made, you'll have to use /patchbot save; otherwise, use /patchbot del
Q26: | I keep having CRC errors: what's wrong ?
A: | Something went wrong it seems, and files weren't deleted properly. You either have to delete all cdp or cdt left depending what happened (this most often happens because a file made with a blocksize X was resumed with a blocksize Y, be it a cdp or a cdt).
Q27: | It says the patch is ready, but it never got sent! How to fix that?
A: | This should only happen on SysReset. This is due to the fileserver off, and thus the queue used by patchbot is disabled
Q28: | Patchbot is slow! Why?
A: | There are 2 possible reasons: Something in the system eats all resources available (like an encoding, an crashed application). Patchbot only takes ressources from the idle parts of the system time. 8192 is the default rate (now), but can be increased to match your need for speed.
Q29: | Patchbot is slow! I have a quadri-processor system of PIV! Can you optimize?
A: | I'm glad for you. Gimme it and I'll see what I can do for you afterwards. ;) seriously, little can be done to use SMP, or so I think: CRC calculation can't be parallelized. Neither several processors nor MMX/SSE/3DNow! parallel instruction can do something. Furthermore, I'm lazy and never done that before.
Q30: | Patchbot is too quick, it gonna kill my system! Help!
Q30a: | I need to use my comp for other things more important. What should I do ?
A: | Patchbot runs its file-processing threads on Idle priority. Therefore, it comes almost last when it comes to CPU time. It can't be responsible for a choppy video (unless HD speed is the matter). I only suggest to shut the server down when burning/copying/acquiring video on the same drive. If you want to run it the more smoothly possible (ie you don't want it to oveheat your system), set a low speed HD rate (like 2000), then set the "Pause delay" to a big value, in order to give time to the system to cool down.
Q31: | What does the strange thing at the bottom right of the GUI?
A: | It's here to setup the progress report for the dll, and will only be used for the next operation, not the current one. Every 'x' seconds, the addon will echo out in the active mIRC window the percentage done. It can be done for cdt (in case you wonder if it has crashed while in fact your comp is just running slowly) and cdp (in case people have problem getting files from you).
Q32: | What does "server replies" tick does?
Q32a: | I don't want the patchbot to reply to a !list. What should I do?
A: | The "server replies" tick affects how the patchbot replies to a !list trigger. If you don't want it to display its ad, untick this box. It doesn't affect !patch trigger or /ctcp status, which are only affected by antiflood protection (patchbot will take 9s to make itself available again to any request in this case (even if the antiflood protection was trigger by someone else/on another channel@server/...)
Q33: | I'm using Windows 2000 Advanced Server and mIRC can't load the dll. How can I fix that?
A: | This is a security option of Windows 2000, and was found by Nono_Rbot. Install the support tools from the CD and launch the "Global Flags Editor" tool. Tick the option "Disable protected DLL Verification". Et voilà ! For more info, check this page.