1
This commit is contained in:
parent
d896f9c5b0
commit
64606f42da
@ -85,7 +85,7 @@ type GuildMgr interface {
|
||||
AsyncApplyJoin(string, string, func(int32, string))
|
||||
AsyncAcceptApply(string, string, func(int32, string))
|
||||
AsyncRejectApply(string, string, func(int32, string))
|
||||
AsyncLeave(string, string, func(int32, string))
|
||||
AsyncLeave(string, func(int32, string))
|
||||
AsyncKickout(string, string, func(int32, string))
|
||||
AsyncDisband(string, string, func(int32, string))
|
||||
AsyncSetNotice(string, string, func(int32, string))
|
||||
|
@ -1,4 +1,4 @@
|
||||
module imserver
|
||||
module imserver_new
|
||||
|
||||
go 1.20
|
||||
|
||||
|
@ -42,7 +42,7 @@ func (this *guildMgr) loadGuild() {
|
||||
f5.GetSysLog().Info("loadGuild begin")
|
||||
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
||||
constant.FRIEND_DB,
|
||||
"SELECT * FROM t_guild idx > %d AND deleted = 0",
|
||||
"SELECT * FROM t_guild WHERE idx > %d AND deleted = 0",
|
||||
func (ds *f5.DataSet) {
|
||||
p := newGuild()
|
||||
this.idHash[p.guildId] = p
|
||||
@ -61,7 +61,7 @@ func (this *guildMgr) loadGuildMember() {
|
||||
f5.GetSysLog().Info("loadGuildMember begin")
|
||||
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
||||
constant.FRIEND_DB,
|
||||
"SELECT * FROM t_guild_member idx > %d AND deleted = 0",
|
||||
"SELECT * FROM t_guild_member WHERE idx > %d AND deleted = 0",
|
||||
func (ds *f5.DataSet) {
|
||||
guildId := ds.GetByName("guild_id")
|
||||
memberId := ds.GetByName("member_id")
|
||||
@ -397,12 +397,24 @@ func (this *guildMgr) AsyncRejectApply(accountId string, targetId string,
|
||||
})
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncLeave(string, string, func(int32, string)) {
|
||||
|
||||
func (this *guildMgr) AsyncLeave(accountId string, cb func(int32, string)) {
|
||||
guild := this.internalGetGuildByAccountId(accountId)
|
||||
if guild == nil {
|
||||
cb(0, "")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncKickout(string, string, func(int32, string)) {
|
||||
|
||||
func (this *guildMgr) AsyncKickout(accountId string, targetId string, cb func(int32, string)) {
|
||||
guild := this.internalGetGuildByAccountId(accountId)
|
||||
if guild == nil {
|
||||
cb(0, "")
|
||||
return;
|
||||
}
|
||||
if !guild.isOwner(accountId) {
|
||||
cb(0, "")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
func (this *guildMgr) AsyncDisband(string, string, func(int32, string)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user