Moving tabs should be implemented with the following:
Each tab has a number that is subject to change, and each number follows the previous: there is no “gap” (e.g. tab 9 then tab 15), the number is computed rather than attributed and fixed.
Only the tab numbered 0 (the Roster) is a fixed tab and cannot be closed or moved.
A move_tab command will be added to allow easy reordering, it works as follows:
/move_tab called without an arg will move the current tab at the end,
/move_tab called with only an arg will move the current tab to the specified position
/move_tab called with two args will move the tab specified by the first argument to the position of the tab given as the second argument. If one of them doesn’t exist, nothing will happen.
A tab can be referenced by its number, or by its JID nodepart (as in firstname.lastname@example.org) (same behaviour as /win).