home *** CD-ROM | disk | FTP | other *** search
- export int QuitAndKill_hook(int bufferid)
- {
- int ret = 0;
- int firstid = GetBufferID();
- int id = firstid;
- int numbufs = 0;
-
- if (!bufferid)
- {
- bufferid = GetBufferID();
- }
-
- do
- {
- if(ReadInfo("type") & 1)
- numbufs++;
- id = NextBuffer(id);
- if (id == firstid)
- {
- id = 0;
- }
- } while (id);
-
- if(numbufs == 2)
- {
- Clean("QuitAll();");
- }
- }
-
- Hook("Kill", "QuitAndKill_hook"); /* Patch Kill() with QuitAndKill_hook()! */
-