diff --git a/src/HttpServer/logic/constdef.go b/src/HttpServer/logic/constdef.go index 4ceb6d9..23d9ea7 100644 --- a/src/HttpServer/logic/constdef.go +++ b/src/HttpServer/logic/constdef.go @@ -20,3 +20,22 @@ const ( FRIEND_RECOMMAND_NUM = 3 //推荐好友数量 TEAM_MAXNUM = 4 //队伍最大人数 ) + +var RandChatList = []string{ + "点点猫咖怎么升级呀", + "你们都是哪里的呀", + "你们都多大呀", + "你们的故事都解锁了吗", + "小猫好可爱啊", + "有没有人理我呀", + "客服在吗?", + "有人在吗?都是机器人吗", + "你们都是真人吗?", + "怎么私聊你们都不说话呀", + "加好友呀", + "你们都什么星座啊!我能帮你们占卜哦", + "这些猫咪怎么都这么像啊", + "你们还有什么好游戏推荐吗", + "你们都玩了多久了?猫咪都几只了", + "有没有什么推荐的电视剧和动漫呀", +} diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index 5422afc..db99b40 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -8,6 +8,7 @@ import ( "encoding/hex" "encoding/json" "errors" + "math/rand" "mysql" "net/http" "sort" @@ -1305,7 +1306,8 @@ func PrivateChat(message string, uuid int, taruid int) (int, string) { } func GetRandChatMessage() string { - return "小赤佬" + index := rand.Int() % len(RandChatList) + return RandChatList[index] } func HandleRandWorldChat() { -- libgit2 0.21.0