Hexchat: hex chat doesn't wait to be identified before joining a channel

Created on 2 Jul 2015  ·  3Comments  ·  Source: hexchat/hexchat

on freenode, i have soe channels that are +r and part of my autojoin. Those channels always fail to join on startup since the identification takes a little while.

hex chat should probably wait to be identified before trying to join.

someone told me that xchat had a setting for this but i didn't verified.

i created myself a small plugin:

import hexchat
import threading

__module_name__ = "keepjoin"
__module_version__ = "1.0"
__module_description__ = "keeping you in the channels that you want to stay in"


def keepjoin():
    isInProgrammeur = False
    for chan in hexchat.get_list('channels'):
        attrs = vars(chan)
        #print ', '.join("%s: %s" % item for item in attrs.items())
        #print chan.channel
        if chan.channel == "#programmeur":
            isInProgrammeur = True
    if isInProgrammeur == False:
        hexchat.command("join #programmeur")


myhook = None

def stop_cb(word, word_eol, userdata):
        global myhook
        if myhook is not None:
                hexchat.unhook(myhook)
                myhook = None
                print("Timeout removed!")

def timeout_cb(userdata):
        #print("Annoying message every 5 seconds! Type /STOP to stop it.")
    keepjoin()
        return 1 # Keep the timeout going

myhook = hexchat.hook_timer(5000, timeout_cb)
hexchat.hook_command("STOP", stop_cb)

Most helpful comment

Preferences > Advanced > Auto join delay

If you want to be very specific about your join times, then you could probably just hook the NOTICE event where NickServ says that you are now identified for , then issue the command for joining the +r channels.

All 3 comments

You should probably use SASL to identify yourself then.

that seems to work. i can't remember why i switched it to something else. i must have been getting troubles with it. probably an isolated case

Preferences > Advanced > Auto join delay

If you want to be very specific about your join times, then you could probably just hook the NOTICE event where NickServ says that you are now identified for , then issue the command for joining the +r channels.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Atario picture Atario  ·  13Comments

Havvy picture Havvy  ·  10Comments

Arnavion picture Arnavion  ·  13Comments

xnite picture xnite  ·  7Comments

AlannahDaw picture AlannahDaw  ·  7Comments