I need a quick fix on the module i'm developing
Posted: Wed Jun 20, 2007 10:25 am
I've decided to dedicate myself to module coding/learning the ins and outs of unrealircd. I'm slightly new, so forgive me if i've overlooked something. I'm developing a module that will stop people from joining any channel that isn't listed as an official channel if they've been 'chlined'
The problem is on the override function, i'm assuming i've made an error in the check against the official_channels block.
I also need to point out that the reason I haven't checked to see if official_channels is defined is because it checks for it during the beginning stages and fails to load if it isn't. There are no compile errors, but there's a servercrash when the join command is used. Forgive me if i've made a stupid mistake,
I don't need a really huge handout, just point me in the direction of what i'm doing wrong
The problem is on the override function, i'm assuming i've made an error in the check against the official_channels block.
Code: Select all
int chline_join_override(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, char *parv[])
{
aChannel *chptr;
chptr = find_channel(parv[1], NULL);
ConfigItem_offchans *walker;
for (walker = conf_offchans; walker; walker = (ConfigItem_offchans *)walker->next)
{
if (strcmp(walker->chname, chptr->chname) == 0 && HasUmodeCh(sptr))
sendto_one(sptr, "You have been banned from joining non-official channels.");
else
CallCmdoverride(overide, cptr, sptr, parc, parv); /* let the original command have it */
}
}
I also need to point out that the reason I haven't checked to see if official_channels is defined is because it checks for it during the beginning stages and fails to load if it isn't. There are no compile errors, but there's a servercrash when the join command is used. Forgive me if i've made a stupid mistake,
I don't need a really huge handout, just point me in the direction of what i'm doing wrong