UltimateIRCd - An advanced IRCd hybrid

UltimateIRCd Support => UltimateIRCd 2.8 Support => Topic started by: dynconf on June 13, 2004, 03:50:30 am

Title: help me about Oper change nick
Post by: dynconf on June 13, 2004, 03:50:30 am
i need a code in s_user.c  to prevent Oper can change nick if they not deoper before ! thx
Title: help me about Oper change nick
Post by: IceDragon on June 14, 2004, 04:09:32 pm
If I've got you right and you want to prevent IRC operators from changing their nicknames, you can put the following in your src/s_user.c file - function m_nick() (Line 1247, if unmodified):

Code: [Select]
 /*
   ** Prevent IRC Operators from changing their nickname -- IceDragon
   */
  if (MyOper(cptr))
  {
      sendto_one (sptr, ":%s NOTICE %s :Nickname change denied - deoper first!",
                  me.name, parv[1]);
      return 0;
  }


In :badword:ure, don't waste your time asking the people here for modifications. As the saying goes - "Give a man a fish, and he eats for a day. Teach him to fish, and he eats for a lifetime".
I did it out of pure lack of anything else to do. Sorry for being selfish ;)
Title: help me about Oper change nick
Post by: dynconf on June 14, 2004, 11:57:39 pm
thx so much ! IceDragon  :)
I have a another question . how to change command /chghost nick newnick to another commands , what must i modify ?
Title: Re: help me about Oper change nick
Post by: TheKing on March 12, 2010, 11:53:16 am
IceDragon! bro Can you help me fix this code to it work for UltimateIRCd(Tsunami)-3.0(02)

thank alot bro !

Title: Re: help me about Oper change nick
Post by: IceDragon on March 13, 2010, 03:37:44 am
Well, the same code should work with a few modifications:

You will have to insert the modified code after these lines:
Code: [Select]
  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:
Code: [Select]
  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.
Title: Re: help me about Oper change nick
Post by: TheKing on March 13, 2010, 04:21:31 am
oh Thank alot bro, it worked :)
SimplePortal 2.3.7 © 2008-2021, SimplePortal