Python script for auto connect/join reddit / irc ---------------------------------------------------------------------- snamreddit · 2015-04-05 14:31 I'm using hexchat and I was wondering if there were any python scripts similar to ones on mirc that connect to servers on startup and autojoin channels: "on *START:{...if...elseif}," etc. I know of the built-in auto connect/join functions, just wanted to delve into python. Any help is appreciated. ---------------------------------------------------------------------- TingPing · 2015-04-06 05:03 >I know of the built-in auto connect/join functions Ok well as long as you understand this has no real value... For a script there is no such event as *"START"* the script is just loaded. So all code in that script at the global scope is just ran. So for example this would functionally be auto-connect on start (though technically on script load). import hexchat __module_name__ = 'example' __module_version__ = '0' __module_description__ = 'just an example' # Just connect hexchat.command('newserver freenode') # Or open it as a URL for very simple autojoin hexchat.command('newserver irc://freenode/hexchat') # These reference 'freenode' by network list name