forked from brycole/gemstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfavs.lic
More file actions
26 lines (22 loc) · 1 KB
/
favs.lic
File metadata and controls
26 lines (22 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#quiet
=begin
This script is meant to ease the transition from the old ;favs command to the new ;autostart command
author: Tillmen (tillmen@lichproject.org)
game: any
tags: core
version: 0.1
required: Lich >= 4.6.0
=end
if (script.vars[1].downcase == 'add') and (script.vars[2] =~ /^all$|^(?:\-\-)?global$/i) and not script.vars[3].nil?
Script.start('autostart', "add --global #{script.vars[3..-1].join(' ')}")
elsif (script.vars[1].downcase == 'add') and not script.vars[2].nil?
Script.start('autostart', "add #{script.vars[2..-1].join(' ')}")
elsif (script.vars[1] =~ /^rem(?:ove)$|^del(?:ete)?$/i) and (script.vars[2] =~ /^all$|^(?:\-\-)?global$/i) and not script.vars[3].nil?
Script.start('autostart', "remove --global #{script.vars[3]}")
elsif (script.vars[1] =~ /^rem(?:ove)$|^del(?:ete)?$/i) and not script.vars[2].nil?
Script.start('autostart', "remove #{script.vars[2]}")
elsif script.vars[1].downcase == 'list'
Script.start('autostart', 'list')
else
Script.start('autostart', 'help')
end