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

Can't set a sound #4

Open
OboTheHobo opened this issue Jun 7, 2018 · 5 comments
Open

Can't set a sound #4

OboTheHobo opened this issue Jun 7, 2018 · 5 comments

Comments

@OboTheHobo
Copy link

I am doing the command "/alerts sound ratsignal [ratsignal.wav]" and when I run it I get the following error:
Traceback (most recent call last):
File "", line 2255, in command_hook
File "", line 1323, in call
File "", line 1456, in wrapper
IndexError: list index out of range
Traceback (most recent call last):
File "", line 2255, in command_hook
File "", line 1323, in call
File "", line 1456, in wrapper
IndexError: list index out of range
Traceback (most recent call last):
File "", line 2255, in command_hook
File "", line 1323, in call
File "", line 1456, in wrapper
IndexError: list index out of range
Traceback (most recent call last):
File "", line 2255, in command_hook
File "", line 1323, in call
File "", line 1456, in wrapper
IndexError: list index out of range

@OboTheHobo
Copy link
Author

as well I have tried many alternatives and yes, it does work using /splay

@RyanWolfe556
Copy link

RyanWolfe556 commented Nov 9, 2018

I am having the same issue.

However, I have discovered a way around this, use
/alerts set <alert> sound [<soundfile>|OFF]
and that works just fine.

A side note of this, if you install HexChat outside of main C:\ then you cannot find the audio files.

@tyrope
Copy link

tyrope commented Nov 20, 2018

Is this a HexChat limitation, or a plugin limitation? Seems silly that %appdata% isn't accessible outside a C:\ install, perhaps we need to run it with admin privileges?

@Poikilos
Copy link

@tyrope The purpose of %APPDATA% is storing user-specific settings and data without admin priveleges. The problem may be spaces in the path, or assuming C: when translating from unix-like paths, if that is a problem somewhere in the code. @RyanWolfe556 By "outside of main c:" do you mean on another drive letter, or somewhere deeper? What is the install path that does not work?

@Poikilos
Copy link

Poikilos commented Feb 13, 2020

@dewiniaid Are you here? The issue seems to be a missing length checking for the params list. The same occurs in 2.14.3 on Fedora 31:

Traceback (most recent call last):
   File "/home/owner/.config/hexchat/addons/alerts.py", line 2255, in command_hook
     event.call()
   File "/home/owner/.config/hexchat/addons/alerts.py", line 1323, in call
     self.fn(self)
   File "/home/owner/.config/hexchat/addons/alerts.py", line 1456, in wrapper
     args.append(event.word_eol[max_args - 1])

Expected behavior:

  • If the param after /alert is a setting, say: print("Your syntax is incorrect. To set variables you must do /alerts set <alert> {setting_name} <value>.".format(setting_name=params[0])) or where params[0] is the setting that should instead be a command.

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

4 participants