charybdis-ircd / charybdis

Scalable IRCv3.2 server for large, community-oriented networks
GNU General Public License v2.0
231 stars 102 forks source link

modularize regonlymsg #341

Closed kaniini closed 4 years ago

kaniini commented 4 years ago

This MR modularizes usermode +R as modules/um_regonlymsg.c. This is part of a redesign downstream of the message forwarding logic.

aaronmdjones commented 4 years ago

My last concern is that you're returning error messages directly from the new module, but an hdata.error field already exists for a message to be returned in that manner; which will play nicer with the new hook priority system should another hook decide to override what the error message is going to be.

kaniini commented 4 years ago

hdata.error is not useful here, we need to return actual numerics for client compatibility reasons.

aaronmdjones commented 4 years ago

Right, but you can set what numeric you want with hdata.approved; hdata.error is the textual portion.

kaniini commented 4 years ago

oh, i see. i thought this was some sort of sendto_one_notice() thing.