AUTOMATED GROUP NOTICE & IM SCHEDULER
This scripted object lets you send automated group notices to multiple groups. It works in tandem with a Corrade bot (https://grimore.org/secondlife/scripted_agents/corrade) already running in Second Life.
Before setting this up, you must first set up and configure a Corrade bot. For instructions on how to download and set up a Corrade bot, see the document “CORRADE SETUP FOR GROUP NOTICE/IM SCHEDULER“.
HOW IT WORKS:
You tell the object what notices or group IMs to send by dropping in notecards. Each notecard contains one or more schedules. A schedule consists of a timestamp for sending the notice, a list of groups to send to, the subject and message, and an attachment if needed.
The “! config” notecard contains the following four parameters:
- corrade= UUID of the bot
- group= key of the SL group to be used for issuing commands (the one you defined in the Corrade config)
- password= Corrade password assigned to the above group in the Corrade config
- home= your (default) home region; this is the region that will be used for SLURLs if only coordinates are given.
The good news is, you already created the “! config” notecard when you completed step 5 of the Corrade setup! Just keep the notecard handy because you’ll need it for the scheduler setup.
First and foremost, for each group receiving notices, the bot that is sending the notices must be a member of that group, and its group role must allow it to send notices and/or messages to that group.
Any group to which you wish to send notices or IMs must be included in a notecard called “! groups“. Each line of that notecard consists of a group abbreviation (up to 3 characters), followed by a vertical line (|), followed by a group name. After the group name, insert another vertical line (|), followed by the group’s key (which can be retrieved from the top of the group profile in Firestorm viewer).
Here are some examples of how to specify groups:
II|Inspiration Island Land Group|ab4e4316-9b9a-5907-5e7d-23599916629a
WBH|WHOLE BRAIN HEALTH|505d2c32-97cb-f804-90cc-57b428bd2665
RK*|Rockcliffe University – Students|76d84a6e-db0a-3759-e080-85a65b4cf016
Group abbreviations ending in an asterisk (*) indicates that this will be a cross-group post, so the phrase “(x-grp)” will be added to the beginning of the subject line.
IMPORTANT: As you type in group lines, make sure that you press the Enter key at the end of each notecard line!
A group notice or group IM is described by a schedule consisting of multiple notecard lines. Each line starts with an identifying character followed by a vertical bar (|), followed by the contents of that line. Identifying characters are:
T — timestamp
X — message types (i.e., whether this is a notice, an IM, or both)
G — list of group abbreviations, separated by spaces
S — subject of message
M — message (this line can be repeated as many times as necessary)
A — name of attachment, spelled exactly as it is in the bot’s inventory.
These lines MUST be placed in the notecard in the order shown above. The “A” (attachment) line can be left off if no attachment is needed.
IMPORTANT: As you type in lines, make sure that you press the Enter key at the end of each notecard line!
Timestamp is made up of a series of integer values separated by spaces, in the following order:
Hour (0-23) (24-hour clock, where 0 is 12am and 23 is 11pm)
Day of week (0-6) where 0=Sunday, 1=Monday, etc.
Occurrence of this weekday within month (1-5)
For any of these values, you can use an asterisk (*) to indicate a wild card. Any values not included at the end are assumed to be asterisks. This lets you be very flexible in scheduling.
T|9 50 3 (9:50am on Wednesday, can be written as T|9 50 3 * * *)
T|13 50 4 1 (1:30pm on the 1st Thurs of the month, can be written as T|13 50 4 1 * *)
T|17 20 (5:20pm on every weekday, can be written as T|17 20 * * * *)
T|15 00 * * 11 12 (3:00pm on November 12)
T|8 00 * * * 25 (8:00am on the 25th of each month)
This tells the sender whether you are sending this as a notice, as a group IM, or both.
For group IM’s, the subject will be combined with the message body, along with a SLURL (as described below).
If you want to send a notice, include the letter “n” (case insensitive). You can also spell out the word “notice” if you wish to make it more readable.
If you want to send a group IM, include either a full SLURL or coordinates in the form “xxx/yyy/zzzz” for the home region. This will be added to the end of the IM.
If you want to do both, include both separated by a space.
X|notice (Sending just a notice with no group IM)
X|38/141/22 (Sending just an IM with no group notice)
X|N 75/38/701 (Sending both a group notice and group IM)
Corrade restricts the subject line to 63 characters or less. To allow for cross-group messages, it must be less than 56 characters (so that “(x-grp)” can be added in front of the subject).
If you have set XGRP=N in your config file (meaning that you never want to add a prefix to cross-group messages), then you can use the full 63 characters for your subject.
Multiple “M” lines may be used. They will be concatenated to form the final message, with spaces between them. If you want to insert a new line at any point during the message, use the expression “\n” (backslash n).
According to the SL wiki, a group notice can be no longer than 512 characters. This includes the subject line and possibly more, so keep this in mind.
An attachment can be either a landmark found in the “Landmarks” folder of the Corrade bot, a notecard found in the “Notecards” folder, a texture found in the “Textures” folder, or an object found in the “Objects” folder of the bot. The name given must match EXACTLY with the item name, including capitalization. (The notice sender will check this before sending.)
Anyone added to the whitelist (step 6 of the Corrade setup) can start an IM chat with the bot and then drop an item onto it, and it will be accepted automatically.
Either use just the landmark name, or preface it with LM>
Preface the notecard name with NC>
Preface the texture name with TX>
Preface the object name with OB>
A|WBH Grove of Wisdom — landmark named “WBH Grove of Wisdom”
A|LM>WBH Grove of Wisdom — landmark named “WBH Grove of Wisdom” (alternative way of specifying landmarks, prefix is not required)
A|NC>Programs today — notecard named “Programs today” (NC> prefix is required)