注册好友模块
This commit is contained in:
parent
a65a61604f
commit
d74fdd9f6f
@ -14,10 +14,11 @@ func NewModule() core.IModule {
|
||||
|
||||
type Friend struct {
|
||||
modules.ModuleBase
|
||||
friend_comp *FriendComp
|
||||
}
|
||||
|
||||
func (this *Friend) GetType() core.M_Modules {
|
||||
return comm.SM_UserModule
|
||||
return comm.SM_FriendModule
|
||||
}
|
||||
|
||||
func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
@ -28,5 +29,5 @@ func (this *Friend) Init(service core.IService, module core.IModule, options cor
|
||||
|
||||
func (this *Friend) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
|
||||
this.friend_comp = this.RegisterComp(new(FriendComp)).(*FriendComp)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ func (this *SComp_GateRouteComp) RegisterRoute(methodName string, comp reflect.V
|
||||
}
|
||||
|
||||
func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentMessage, reply *pb.RPCMessageReply) error {
|
||||
log.Debugf("SComp_GateRouteComp ReceiveMsg agent:%s uId:%d MessageDistribution msg:%s", args.UserSessionId, args.UserId, args.Method)
|
||||
log.Debugf("SComp_GateRouteComp ReceiveMsg agent:%s uId:%s MessageDistribution msg:%s", args.UserSessionId, args.UserId, args.Method)
|
||||
this.mrlock.RLock()
|
||||
msghandle, ok := this.msghandles[args.Method]
|
||||
this.mrlock.RUnlock()
|
||||
|
@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"go_dreamfactory/modules/friend"
|
||||
"go_dreamfactory/modules/mail"
|
||||
"go_dreamfactory/modules/pack"
|
||||
"go_dreamfactory/modules/user"
|
||||
@ -34,6 +35,7 @@ func main() {
|
||||
user.NewModule(),
|
||||
pack.NewModule(),
|
||||
mail.NewModule(),
|
||||
friend.NewModule(),
|
||||
)
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user