IRCRehberi.Net- Türkiyenin En iyi IRC ve Genel Forum Sitesi

IRCRehberi.Net- Türkiyenin En iyi IRC ve Genel Forum Sitesi (https://www.ircrehberi.net/)
-   Unreal IRCd (https://www.ircrehberi.net/unreal-ircd/)
-   -   Don't allow users with umode +B to join (channel mode +B) (https://www.ircrehberi.net/unreal-ircd/119494-dont-allow-users-umode-b-join-channel-mode-b.html)

Wollks 27 Temmuz 2022 23:01

Don't allow users with umode +B to join (channel mode +B)
 
u_int is_invited(aClient *sptr, aChannel *chptr) {
for (lp = sptr->user->invited; lp; lp = lp->next)
if (lp->value.chptr == chptr)
return 1;

return 0;
}

static int m_myjoin(aClient *sptr, aChannel *chptr, char *parv[]) {
if (chptr != NULL && is_invited(sptr, chptr) && MyClient(sptr) && !IsAnOper(sptr) && !IsULine(sptr)) {
if (chptr->mode.extmode & EXTCMODE_NOBOTS && sptr->umodes & UMODE_BOT) {
sendnotice(sptr, "*** Cannot join channel %s: Bots are not permitted.", chptr->chname);
return HOOK_DENY;
}
}
return HOOK_CONTINUE;
}

where am i making a mistake, the codes i use are not working i am playing in a ready module can you help me

help me

OmerAti 27 Temmuz 2022 23:06

hello, what exactly are you trying to do?

Wollks 27 Temmuz 2022 23:07

where is the error in these codes?

OmerAti 27 Temmuz 2022 23:10

you want us to fix the problem

Wollks 27 Temmuz 2022 23:13

yes I couldn't find where I made a mistake, it doesn't work when compiling

OmerAti 27 Temmuz 2022 23:19

this module is an existing module as a result of my review, I see incompleteness in your code

Kod:

u_int is_invited(aClient *sptr, aChannel *chptr) {
just below

Kod:

Link    *lp;
add and

Kod:

if (chptr != NULL && is_invited(sptr, chptr) && MyClient(sptr) && !IsAnOper(sptr) && !IsULine(sptr)) {
Can you try replacing this line with the following line?

Kod:

if (chptr != NULL && !is_invited(sptr, chptr) && MyClient(sptr) && !IsAnOper(sptr) && !IsULine(sptr)) {
shouldn't be a problem

Wollks 27 Temmuz 2022 23:26

thank you very much ircrehberi


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 03:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.

Copyright ©2019 - 2025 | IRCRehberi.Net