X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/7af1b8d223ae97cfafc60499655c636d55fbca8b..refs/tags/shadowircd-6.2.0-beta1:/modules/core/m_join.c diff --git a/modules/core/m_join.c b/modules/core/m_join.c index ad1b872..82d5d70 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -46,8 +46,6 @@ static int me_svsjoin(struct Client *, struct Client *, int, const char **); static int ms_join(struct Client *, struct Client *, int, const char **); static int ms_sjoin(struct Client *, struct Client *, int, const char **); -struct module_modes ModuleModes; - struct Message join_msgtab = { "JOIN", 0, 0, 0, MFLG_SLOW, {mg_unreg, {m_join, 2}, {ms_join, 2}, mg_ignore, mg_ignore, {m_join, 2}} @@ -113,6 +111,9 @@ me_svsjoin(struct Client *client_p, struct Client *source_p, int parc, const cha if((target_p = find_person(parv[1])) == NULL) return 0; + if(!MyClient(target_p)) + return 0; + user_join(&me, target_p, parv[2], NULL); return 0; } @@ -229,6 +230,9 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char * source_p->servptr->name, chptr->chname, modebuf, parabuf); *omodebuf = *modebuf = *parabuf = '\0'; + + /* since we're dropping our modes, we want to clear the mlock as well. --nenolod */ + set_channel_mlock(client_p, source_p, chptr, NULL, FALSE); } if(!IsMember(source_p, chptr)) @@ -490,6 +494,9 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char /* Update capitalization in channel name, this makes the * capitalization timestamped like modes are -- jilles */ strcpy(chptr->chname, parv[2]); + + /* since we're dropping our modes, we want to clear the mlock as well. --nenolod */ + set_channel_mlock(client_p, source_p, chptr, NULL, FALSE); } if(*modebuf != '\0') @@ -821,7 +828,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char CheckEmpty(para[2]), CheckEmpty(para[3])); } - if(!joins && !(chptr->mode.mode & ModuleModes.MODE_PERMANENT) && isnew) + if(!joins && !(chptr->mode.mode & MODE_PERMANENT) && isnew) { destroy_channel(chptr); @@ -972,7 +979,7 @@ set_final_mode(struct Mode *mode, struct Mode *oldmode) len = rb_sprintf(pbuf, "%d:%d ", mode->join_num, mode->join_time); pbuf += len; } - if(mode->forward[0] && strcmp(oldmode->forward, mode->forward) && ModuleModes.MODE_FORWARD) + if(mode->forward[0] && strcmp(oldmode->forward, mode->forward) && ConfigChannel.use_forward) { if(dir != MODE_ADD) {