Well, the same code should work with a few modifications:
- Instead of src/s_user.c you will change the contents of src/m_nick.c
- You'll change the following function: int m_nick (aClient * client_p, aClient * source_p, int parc, char *parv[])
You will have to insert the modified code after these lines:
if (parc < 2)
{
sendto_one (source_p, err_str (ERR_NONICKNAMEGIVEN), me.name, parv[0]);
return 0;
}And the code itself that you should insert would be this:
if (MyOper(client_p))
{
sendto_one (source_p, ":%s NOTICE %s :Nickname change denied - deoper first!",
me.name, parv[1]);
return 0;
}I haven't compiled or tested this myself (it's been several years since I last modded Ultimate and last time I was here was back in 2004), but it should work in theory...
P.S. Please
don't ask me to make modifications for your IRCds. I'm not really interested in this nowadays, nor am I as oriented as I used to be.