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

Allow per server configuration in server list for network #899

Open
jetuser opened this issue Feb 17, 2014 · 6 comments
Open

Allow per server configuration in server list for network #899

jetuser opened this issue Feb 17, 2014 · 6 comments

Comments

@jetuser
Copy link

jetuser commented Feb 17, 2014

I have a case where I have access to a network's hub server which requires a server password to connect and I wish to also add the main network address in case things go sideways (the hub is on a separate host for security reasons). However, I am unable to add the main address properly to the server list as it thinks the password is for this particular host and not the hub, could we add a way to configure per server passwords for a given network?

@TingPing
Copy link
Member

Make another network entirely.

@jetuser
Copy link
Author

jetuser commented Feb 18, 2014

Part of the use case I'm trying to enable is, if the hub goes down say due to maint or some other issue, I'd like to automatically move over to the main host and connect to a leaf... which is the point of the server list

@TingPing
Copy link
Member

Network options are already limited and painful to extend, adding another layer to servers sounds like a huge pain for a single users use case.

@jetuser
Copy link
Author

jetuser commented Feb 18, 2014

Is this something that can be accomplished by a plugin or a script then? Based on what I've found so far seems the answer is no.

@TingPing
Copy link
Member

Here is a rough idea, untested and not very flexible:

import hexchat

__module_name__ = 'ServerPass'
__module_author__ = 'TingPing'
__module_version__ = '1'
__module_description__ = 'Sends a specific password for a specific server.'

def connected_cb(word, word_eol, userdata):
    if hexchat.get_info('host') == 'example.org':
        username = hexchat.get_prefs ('irc_user_name')
        password = 'hunter2'
        hexchat.command('quote PASS {}:{}'.format(username, password))

hexchat.hook_print('Connected', connected_cb)

@jetuser
Copy link
Author

jetuser commented Feb 18, 2014

Excellent, thank you. I'll see what I can do with this and maybe make it a usable plugin.

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

2 participants