Commit 9729f4f01b9fe86c1b9c05e96816576db7a37888
1 parent
e66080dd
修改邮件默认长度,私聊禁言
Showing
4 changed files
with
13 additions
and
7 deletions
Show diff stats
src/actions/GmAction.lua
src/actions/RoleAction.lua
... | ... | @@ -1282,10 +1282,13 @@ function _M.chatRpc(agent, data) |
1282 | 1282 | red:rpush(CHAT_OFFLINE:format(objectId), bin) |
1283 | 1283 | red:ltrim(CHAT_OFFLINE:format(objectId), -200, -1) |
1284 | 1284 | end) |
1285 | - -- 若在线,实时发送聊天信息 | |
1286 | - local agent = datacenter.get("agent", objectId) | |
1287 | - if agent then | |
1288 | - SendPacket(actionCodes.Role_chat, bin, agent.fd) | |
1285 | + | |
1286 | + if role:getProperty("silent") < now then --禁言 | |
1287 | + -- 若在线,实时发送聊天信息 | |
1288 | + local agent = datacenter.get("agent", objectId) | |
1289 | + if agent then | |
1290 | + SendPacket(actionCodes.Role_chat, bin, agent.fd) | |
1291 | + end | |
1289 | 1292 | end |
1290 | 1293 | end |
1291 | 1294 | SendPacket(actionCodes.Role_chat, bin) | ... | ... |
src/models/Email.lua
... | ... | @@ -10,7 +10,7 @@ Email.schema = { |
10 | 10 | emailId = {"number", 0}, -- 邮件csv ID |
11 | 11 | title = {"string", ""}, -- 邮件标题 |
12 | 12 | stitle = {"string", ""}, -- 小标题 |
13 | - content = {"string", ""}, -- 邮件正文 | |
13 | + content = {"string", "", 2048}, -- 邮件正文 | |
14 | 14 | attachments = {"string", "", 512}, |
15 | 15 | status = {"number", 0}, -- 邮件状态: 未读, 已读, 已领取 |
16 | 16 | createtime = {"number", skynet.timex()}, | ... | ... |
src/services/dbseed.lua
... | ... | @@ -266,7 +266,10 @@ local function doUpdateSql() |
266 | 266 | }, |
267 | 267 | [2] = { |
268 | 268 | "ALTER TABLE `Rune` MODIFY COLUMN `refer` bigint;" |
269 | - } | |
269 | + }, | |
270 | + [3] = { | |
271 | + "ALTER TABLE `Email` MODIFY COLUMN `refer` VARCHAR(2048);" | |
272 | + }, | |
270 | 273 | } |
271 | 274 | -- 更新记录表 |
272 | 275 | local res = mysqlproxy:query("SELECT `value` FROM `autoincrement_set` WHERE `key` = 'db_ver';") | ... | ... |