mIRC Homepage
Posted By: Erebus Prevent windows opening - 15/01/06 01:27 PM
Hello,

I have one instance of mIRC which I use for a bot. This mIRCbot is in quite a few channels.

The problem arises due to the windows desktop heap. I do not have enough space in my desktop heap to hold all of these windows. As it is a bot, I have no need for each channel to have it's own window.

Therefore, my question is, is there any way to use mIRC in such a way that the bot can still be in multiple channels and function normally, but without the windows needing to be opened/shown?

(By windows, I refer to the channel windows)
Posted By: DaveC Re: Prevent windows opening - 15/01/06 03:56 PM
Your talking about several 1000 windows from memory arent you? Or at least thsats the numbers i seem to remember about opening custom windows before the OS goes ape about to many windows.

If so i dont think there is a fix.

It might be worth trying to see if Minimized and hidden windows consume these resourse (im pretty sure they do), if it doesnt.....

alias hide.all.channels { var %i = $chan(0) | while (%i) { window -hn $chan(%i) | :error | reseterror | dec %i } }
/timer 0 60 scon -at1 hide.all.channels
Posted By: FiberOPtics Re: Prevent windows opening - 15/01/06 04:03 PM
Why don't you just convert it to a socket bot? You can then be in hundreds of channels, and still only have 1 window open. It'll be a little work because you lose identifiers such as $nick, $chan etc. but it will solve this issue entirely, not to mention it'll be a lot more efficient.

From a memory point of view, it will certainly be better, because each of your windows that are open (even if they are hidden) have a buffer. Imagine how much memory that takes. A socket bot doesn't need windows, you deal with incoming data in a sockread event.
Posted By: Erebus Re: Prevent windows opening - 15/01/06 09:02 PM
Thanks for the replies.

I thought I would ask as I know some peple seem to ahve custom windows displayed for channels rather than the standard ones, so I was wondering if it was possible to prevent any window being opened at all in the same way, or if instead, I had simply misinterpreted what had been achieved.

As for a socket bot, would there be any limitations in difference to doing it normally? Is there a good place to get started with them? I've done some searching and read a few articles, but wondered if there is anything you could recommend, perhaps in the line of going from non-socket to socket?

Thanks smile
Posted By: FiberOPtics Re: Prevent windows opening - 15/01/06 09:13 PM
This is a good starting point.
© mIRC Discussion Forums