Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for single-slack in #9 broke multi-slack support #16

Open
jwm opened this issue Jan 10, 2016 · 0 comments
Open

Fix for single-slack in #9 broke multi-slack support #16

jwm opened this issue Jan 10, 2016 · 0 comments

Comments

@jwm
Copy link
Contributor

jwm commented Jan 10, 2016

I think 6f989a6 breaks multiple server support, since init() will match all servers, but only store the server tag for the last one found. Also, slack team hostnames can include dashes, which \w won't match.

I like a slight variation (untested) on @mikegrb's suggestion:

my $svrre = qr/\.irc\.slack\.com$/;
my ($script_filename, undef, undef) = fileparse(__FILE__, '.pl');
if ($script_filename ne 'slack') {
    $script_filename =~ s/^slack_//;
    $IRSSI{name} = $script_filename;
    $svrre = qr/$script_filename\.irc\.slack\.com/;
}

That way, you can have slack.pl, with slack_team1.pl, slack_team2.pl, etc. symlinked to it.

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

No branches or pull requests

1 participant