@@ -0,0 +1,627 @@
+import hexchat%0A%0A__module_name__ = %22Detach%22%0A__module_author__ = %22Poorchop%22%0A__module_version__ = %220.1%22%0A__module_description__ = %22Detach and close the current channel on ZNC with a simple /detach%22%0A%0Adetached = False%0A%0A%0Adef detach_cb(word, word_eol, userdata):%0A    global detached%0A%0A    if detached or len(word) %3E 1:%0A        return%0A    else:%0A        chan = hexchat.get_info(%22channel%22)%0A        detached = True%0A        hexchat.command(%22DETACH %7B%7D%22.format(chan))%0A        detached = False%0A%0A    return hexchat.EAT_ALL%0A%0A%0Ahexchat.hook_command(%22DETACH%22, detach_cb)%0A%0Ahexchat.prnt(__module_name__ + %22 version %22 + __module_version__ + %22 loaded%22)%0A

Create detach.py