1function canJoin(player)
2 return player:getAccountType() >= ACCOUNT_TYPE_TUTOR
3end
4
5function onSpeak(player, type, message)
6 local playerAccountType = player:getAccountType()
7 if type == TALKTYPE_CHANNEL_Y then
8 if playerAccountType >= ACCOUNT_TYPE_SENIORTUTOR then
9 type = TALKTYPE_CHANNEL_O
10 end
11 elseif type == TALKTYPE_CHANNEL_O then
12 if playerAccountType < ACCOUNT_TYPE_SENIORTUTOR then
13 type = TALKTYPE_CHANNEL_Y
14 end
15 elseif type == TALKTYPE_CHANNEL_R1 then
16 if playerAccountType < ACCOUNT_TYPE_GAMEMASTER and not player:hasFlag(PlayerFlag_CanTalkRedChannel) then
17 type = TALKTYPE_CHANNEL_Y
18 end
19 end
20 return type
21end
22