View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005023 | unreal | module api | public | 2017-10-21 13:09 | 2017-10-23 10:09 |
Reporter | Gottem | Assigned To | syzop | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Debian | OS Version | 7 (wheezy) |
Product Version | 4.0.15 | ||||
Fixed in Version | 4.0.16 | ||||
Summary | 0005023: Denying HOOKTYPE_PRE_INVITE results in incorrect error string | ||||
Description | When you return HOOK_DENY from a hook function for HOOKTYPE_PRE_INVITE, you get the following message after an invite attempt: Message(518): Cannot invite (+V) at channel #test Even though the channel is not actually +V. :D | ||||
Steps To Reproduce | Use a hook function like this: int hook_preinvite(aClient *sptr, aChannel *chptr) return HOOK_DENY; Join a channel, set +i and invite someone else. Then check the server console/tab. | ||||
Additional Information | I noticed src/modules/m_invite.c returns ERR_NOINVITE always when HOOK_DENY is returned (and OperOverride is not applicable). I guess the noinvite module should return the error itself and let m_invite return -1 silently? | ||||
Tags | No tags attached. | ||||
3rd party modules | N/A | ||||
|
Ah, indeed. And /KNOCK with a +V channel resulted in two confusing messages because the same hook was used :D Thanks for the report. Had to change the API though to fix this, see below. commit 77234b2b8df225f8cf1defa5fc5406e4fdd8f92f Author: Bram Matthys <[email protected]> Date: Mon Oct 23 10:07:33 2017 +0200 API change for HOOKTYPE_PRE_INVITE and fix 0005023: * API change for HOOKTYPE_PRE_INVITE: (aClient *sptr, aClient *target, aChannel *chptr, int *override) Modules must now send the error message instead of only returning HOOK_DENY. Also check for operoverride and set *override=1. This so modules can send their own error messages instead of the default message being sent ("channel is +V" - which is not true). Reported by Gottem (0005023). |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-21 13:09 | Gottem | New Issue | |
2017-10-23 10:09 | syzop | Assigned To | => syzop |
2017-10-23 10:09 | syzop | Status | new => resolved |
2017-10-23 10:09 | syzop | Resolution | open => fixed |
2017-10-23 10:09 | syzop | Fixed in Version | => 4.0.16 |
2017-10-23 10:09 | syzop | Note Added: 0019930 |