-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmcp-negotiate.tf
30 lines (23 loc) · 954 Bytes
/
mcp-negotiate.tf
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
27
28
29
; /mcp21_add_package packagename
;
; Add a new package. It should define variables mcp21_packagename_min_version
; and _max_version
/def mcp21_add_package = \
/set mcp21_packages=$(/unique %{mcp21_packages} %1)
/def mcp21_send_packages = \
/while (shift(), {#}) \
/let vname=$[replace('-','_',{1})]%;\
/eval /mcp21_send mcp-negotiate-can package: \%1 min-version: \%{mcp21_%{vname}_min_version} max-version: \%{mcp21_%{vname}_max_version}%;\
/done
/def mcp21_send_negotiation = \
/eval /mcp21_set_world ${world_name}%;\
/mcp21_send_packages x %{mcp21_packages}%;\
/mcp21_send mcp-negotiate-end%;\
/def mcp21_begin_negotiation =
/def mcp21_mcp-negotiate-can = \
/test nothing
; /eval /echo -e \% ${world_name} CAN \%{mcp_tag_package} from \%{mcp_tag_min_version} to \%{mcp_tag_max_version}
/def mcp21_mcp-negotiate-end =
/set mcp21_mcp_negotiate_min_version=1.0
/set mcp21_mcp_negotiate_max_version=2.0
/mcp21_add_package mcp-negotiate