And let's not forget about the "perform" script, where you fill in all operations that should be handled on startup (like /join, /register, /nick and so on). Otherwise you'd have to join every channel anew when you disconnect.