Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

hex chat doesn't wait to be identified before joining a channel #1415

Closed
fcoulombe opened this issue Jul 2, 2015 · 3 comments
Closed

hex chat doesn't wait to be identified before joining a channel #1415

fcoulombe opened this issue Jul 2, 2015 · 3 comments

Comments

@fcoulombe
Copy link

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)
@bendem
Copy link
Contributor

bendem commented Jul 2, 2015

You should probably use SASL to identify yourself then.

@fcoulombe
Copy link
Author

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

@Poorchop
Copy link
Contributor

Poorchop commented Jul 3, 2015

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants