To start off with I configured the bot to work in 1 channel. This worked fine and allowed me to restart the bot without any problems. Shortly after I decided to use the bot in another channel as well as the current one. I did this by adding the appropriate lines in the config file and then doing a rehash. The bot joined the new channel and worked perfectly in both channels!
This was until it became disconnected and did the sitting looking dumb thing :/
To get the bot working again, I had to remove the lines which configure the new channel from the config and then start the bot again. Once the bot was in IRC, then re-added the lines for the new channel and rehash'ed. The bot then worked perfectly again. As you can imagine this is a real pain :/ also the bot loses the user flags for the channel, so I have to .chattr all the users for the new channel again.
Once I have gone through this process it all works again!
Does anyone know why my bot does this? and more importantly how can I fix it?

Many thanks