I got a handle on the PM system and chat system in RPH. I've been able to implement a custom action command (a simple dice roller) and manipulating PMs (sending one programmatically and working around blocking). Which means I can get something up and running to implement more features that were either not there or were flaky.
Expect something new and exciting to happen (within a month maybe)
Small update to those that still use the legacy branch. I updated the code base to match the multi-username's logic, only tweaked for global settings. This was just to make it so bug fixes that could affect both versions can be applied.
And although I do muck with cookies, I've decided to not be mean and added hooks to look for cookies that were used between 0.5.0 and 0.6.1 and it will convert it to the new format.
UPDATE 1: If you've updated at or before 1PM PST today, please update again. I added a small fix that will make sure the cookies of actively used names have their expiration dates refreshed automatically.
After user feedback (See? This is important!), I found out that the way 0.7.x handles data is extremely limited and is prone to issues if RPH is acting up. This update is to fix that as well as a few other minor tweaks. You can see the version history as usual at the Test Version. Of course, since I yet again buggered with how cookies are saved, your old cookies no longer work. Be sure to back up your settings before updating!
Also I redid the branches. I'm no longer using the test branch as a poor repo and instead is the debug version. The older version is now named Legacy, and is under RPH Pings Legacy. I also rolled in the fix in case ping matching screws up so it'll post messages regardless of what happens.
And in case you were wondering, yes I mucked with the versioning. But this is to make it a bit more consistent, somehow. Versioning is as follows:
- x: Major revision. This is if I change some major feature of the script.
- y: If this is 0, it's RPH Pings Legacy. If it's 1, it's this version
- z: Minor revision. This is for bug fixes and such.
- How to install
- How to use
- Known Issues
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This script is a modification of https://openuserjs.org/scripts/nick_rp1986yahoo.com/RPH_Pings. It adds pings back to RPH, which will highlight and give an audible "ping" sound whenever someone sends a message that has a word you want to be pinged.
- Settings are per-username.
- Custom inputted names and words to trigger pinging.
- Plays an audio ping upon matching.
- Supports only .wav, .mp3. and .ogg files.
- Custom text and highlight colors.
- Text can be bold or italicized.
- Exact and case sensitive matching.
- Settings saved in a cookie for persistent storage.
- Settings can be tested before committing.
- If the ping happens in another room, the room tab will be highlighted.
####How to Install
- You must have (one or the other)
- If you have a previous version, you should remove it.
- Click on the "Install" button on top to add the script or...
- Click on the "Source Code" tab and copy the source code, then...
- In Greasemonkey, select "Add new script", enter some information then press OK, then paste the code in there. Make sure to save it and enable it.
- In Tampermonkey, select "Add a new script", then paste the code in there. Press the save icon and enable it.
- Refresh RPH if you're on it already for the script to take effect.
####How to Use
- Click on the "Pings" text on the top right corner
- Click on the drop-down menu and select the username whose settings you want to edit.
- Enter all the names or words you want to be pinged by. Separate each entry with a comma.
- Enter the URL of the sound file to play when a ping is matched. It must be a WAV, MP3, or OGG file.
- For ping names and URL, do not use the pipe ( | ), as this is the delimiter for the script's cookie saving. If you use it, your settings will be screwed up.
- Enter the text and highlight color as an RGB hex value. This uses HTML compatible hex codes, so you can enter #FFF for white instead of #FFFFFF.
- Check if you want the text in the to have bold and/or italics
- Check if you want words in the chat to exactly match the words on the list to get a ping.
- e.g., if using "Mel", it must match that and will not trigger on "Melody" or "Melanie"
- Check if you want case sensitivity.
- e.g., if using "Mel" with this checked, it will not ping on "mel".
- You can check if the ping is to your liking by putting one of the words on the list into the chat (it will not ping that word/name if it's been previously posted). To save your settings, you must press the "Pings" button again.
- If a setting is invalid, it will mark the field red and the window will not close or save settings until it's fixed.
- This script is designed to not need a page refresh, but in case the settings aren't taking, refresh the page anyway.
- Refresh the page after installing
- Make sure you are using one version of this script. If you installed the other versions, they probably won't play nice with each other.
- Delete cookies related to pings
- Go into your browser's options and search for RPH's cookies. You can either delete them all (which will just make it forget you were logged in) or find the ones labeled "nb_pings" or similar.
- Versions 0.4.4 or below will have about eight with the label "nb_ping", such as "nb_pingItalicsEnable"
- Versions 0.5.0 to 0.6.1 will have two labeled "nb_pings" and "nb_pingsSettings"
- Version 0.7.0 and above will have one labeled "nb_rphPings"
- Version 1.0.x will have two labeled "nb_pings" and "nb_pingsSettings"
- Version 1.1.x will have several labled "rphPings_[username]"
- RPH has a quirk with how the chat is buffered. There's only one buffer (i.e., place where all the messages get posted) and all your names that log into the chat room reference that. So expect funny things to happen.
- This script relies on account fetching callbacks. Under normal operation, RPH should send the user's account information once the PM server connection is established. This is needed to populate the drop list for names. So if there is some issues with getting account info, this script may not work.
- Offers no sanitizing of inputs, but I'm not sure how necessary this is.
- Greasemonkey/Tampermonkey has no access to local files for security reasons. Therefore, any audio you use for pings must be online somewhere.
- Do not use the pipe ( | ) in the text fields, I use that as the delimiter for cookie saving.
Use the issue tracker in the "Issue" tab to report a problem please :D
Or if you're on RPH, use the support forum, topic "RPH Pings Support/News thread"