View Issue Details

IDProjectCategoryView StatusLast Update
0002337unrealircdpublic2018-05-01 16:52
ReporterTroco Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
Platformwin32OSXP ProfessionalOS Version5.1 - 2600
Summary0002337: Add HOOKTYPE_PRE_NICK
DescriptionSince NICK command is modulized, I would suggest a tool por 3rd-coders.
As m_message does, it hooks all modules and if one returns NULL, message isn't delivered. My idea is the same but for m_nick.
The schema would be:
- Check for collisions, nicks in use, etc.
- Hook all modules like
for (tmphook = Hooks[HOOKTYPE_NICK]; tmphook; tmphook = tmphook->next) {
    val = (*(tmphook->func.intfunc))(cptr, sptr, parv, parc);
        if (!val)
            return 0;
- Set the new nick and continues.

So, as you can see, if one module return 0, the new nick does not set.
Any opinions?
TagsNo tags attached.
3rd party modules

Relationships

has duplicate 0002682 resolvedsyzop HOOKTYPE_LOCAL_NICKCHANGE (etc) and HOOK_DENY 

Activities

syzop

2005-02-12 16:29

administrator   ~0009107

Last edited: 2005-02-12 18:35

There's a fundemental problem with this aproach which is that a module then doesn't know if the message/kick/nick/whatever actually got canceled or not (I admit, I didn't think of that when creating the msg hook ;p), therefore we use PRE_* hooks now for that (so 1 HOOKTYPE_PRE_* which can stop the request, and another one after it succeeded).
Incidently, codemastr talked recently with me about a PRE one for NICK so I guess it's on TODO ;).

stskeeps

2007-04-27 06:07

reporter   ~0013854

Bump. Still an issue?

syzop

2007-05-07 12:39

administrator   ~0014019

yea.
not too urgent feature though, but probably easy for someone to make a patch for ;p

syzop

2018-05-01 16:52

administrator   ~0020117

I've never required this myself with all my modules, so I guess it's not really needed. Not worth putting time into this anyway.

Issue History

Date Modified Username Field Change
2005-02-12 16:24 Troco New Issue
2005-02-12 16:29 syzop Note Added: 0009107
2005-02-12 16:51 syzop Note Edited: 0009107
2005-02-12 16:52 syzop Note Edited: 0009107
2005-02-12 18:35 syzop Note Edited: 0009107
2007-04-27 06:07 stskeeps Note Added: 0013854
2007-04-27 06:07 stskeeps Status new => feedback
2007-05-07 12:39 syzop Note Added: 0014019
2007-05-07 12:39 syzop Status feedback => acknowledged
2007-05-08 08:37 syzop Summary nick suggest => Add HOOKTYPE_PRE_NICK
2007-05-08 08:37 syzop Steps to Reproduce Updated
2015-08-08 17:58 syzop Relationship added has duplicate 0002682
2018-05-01 16:52 syzop Assigned To => syzop
2018-05-01 16:52 syzop Status acknowledged => closed
2018-05-01 16:52 syzop Resolution open => no change required
2018-05-01 16:52 syzop Note Added: 0020117