View Issue Details

IDProjectCategoryView StatusLast Update
0003739unrealircdpublic2008-12-28 10:07
Reportertabrisnet Assigned Tosyzop  
Status resolvedResolutionfixed 
PlatformLinux/x86OSDebian LinuxOS Versiontesting
Product Version3.2.7 
Fixed in Version3.2.8 
Summary0003739: move HOOKTYPE_LOCAL_PASS
DescriptionAt present HOOKTYPE_LOCAL_PASS is called from m_pass.c, but this seems to be somewhat sub-optimal. It would be much more useful for it to be called from m_nick.c, where the password is sent to NickServ.

Alternately, I'd like to see a new hook, like HOOKTYPE_LOCAL_PASS, but called from m_nick. The idea here is that we can do something _other than_ sending to NickServ IDENTIFY. What I want to do is send a NICKSERV SIDENTIFY instead, but I don't want to have to provide patches to UnrealIRCd to do so. I don't expect it's hard to do, and I may even be able to whip up the necessary patches if there is enough interest. But I do want the new hook to go into mainline.
TagsNo tags attached.
3rd party modules



2008-12-21 12:26

administrator   ~0015452

I saw your note, but because this is - indeed - not a serious bug or something I don't have time for this. Feel free to create a patch though, but don't move HOOKTYPE_LOCAL_PASS (sorry, paranoid to break things), just add a new one.


2008-12-25 02:53

reporter   ~0015527

One possibility goes like this:

- if (sptr->passwd && (nsptr = find_person(NickServ, NULL)))
+ if (sptr->passwd && (nsptr = find_person(NickServ, NULL))) {
                        sendto_one(nsptr, ":%s %s %s@%s :IDENTIFY %s",
                            (IsToken(nsptr->from) ? TOK_PRIVATE : MSG_PRIVATE),
                            NickServ, SERVICES_NAME, sptr->passwd);
+ RunHook2(HOOKTYPE_LOCAL_NICKPASS, sptr, nsptr);
+ }

Another, takes that concept, but if the hook function returns HOOK_CONTINUE, it doesn't do the sendto_one(). Unfortunately, I can't find a way to do this, as your RunHook stuff are macros and not functions.

2008-12-25 02:54


nickpass.diff (1,477 bytes)


2008-12-25 02:54

reporter   ~0015530

if this isn't clear from the previous comment, I chose HOOKTYPE_LOCAL_NICKPASS


2008-12-28 10:07

administrator   ~0015554

Ok then ;).

Added in .732:
- New HOOKTYPE_LOCAL_NICKPASS: the 2 parameters are: sptr (client) and nsptr
  (NickServ client, NULL if not present). You can return 1 (HOOK_DENY) to
  make the IRCd not send IDENTIFY to NickServ. Suggested by tabrisnet

(note: I chose HOOK_DENY to skip nickserv, instead of HOOK_CONTINUE)

If something is wrong, let me know.

I hope to release RC1 today...

Issue History

Date Modified Username Field Change
2008-11-10 00:03 tabrisnet New Issue
2008-12-21 12:26 syzop Note Added: 0015452
2008-12-25 02:53 tabrisnet Note Added: 0015527
2008-12-25 02:54 tabrisnet File Added: nickpass.diff
2008-12-25 02:54 tabrisnet Note Added: 0015530
2008-12-28 10:07 syzop QA => Not touched yet by developer
2008-12-28 10:07 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2008-12-28 10:07 syzop Status new => resolved
2008-12-28 10:07 syzop Fixed in Version => 3.2.8
2008-12-28 10:07 syzop Resolution open => fixed
2008-12-28 10:07 syzop Assigned To => syzop
2008-12-28 10:07 syzop Note Added: 0015554