Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: ns_identify_chgident - identify successful run /chgident %nick %nick  (Read 7145 times)

0 Members and 1 Guest are viewing this topic.

Mec08

  • Anope User
  • Offline Offline
  • Posts: 6

Hello,

 I'm french with "google translator" to write on the forum Anope.org,

 I would appreciate any information or tip for this system to quickly chat irc

 In the file ===> anope-1.8.3/src/nickserv.c I would like to add an execution of

 Identified ok = run /chgident %nick .%nick <=== Pseudo01!.Pseudo01@hostname
 Identified null = no /chgident

 Does someone could tell me how to do this?

 Thank you in advance, it is very important for a chat!
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #1 on: January 07, 2011, 07:22:04 PM »

write a module or a bot, we do not support modifying the core..
when using a module, you can use the identify command anyways.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Mec08

  • Anope User
  • Offline Offline
  • Posts: 6
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #2 on: January 07, 2011, 07:47:12 PM »

ok, it was to make a system with the "." and the system unrealircd: /mode #chan +I *!.*@*
 Ns_identify_chgident with a "true" it would be: Pseudo02!.Pseudo02@host, and people can join the channel with mode #chan +i

I thought it was probably the easiest to modify the nickserv.c because I am not a writer nor as a module .c
« Last Edit: January 07, 2011, 07:50:22 PM by Mec08 »
Logged

Mec08

  • Anope User
  • Offline Offline
  • Posts: 6
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #3 on: January 08, 2011, 01:23:31 PM »

hello, i'am débutant



nickserv.c :
Code: [Select]
void nsStartNickTracking(User * u)
{
    NickCore *nc;

    char buf[BUFSIZE];
    *buf = '\0';

    /* We only track identified users */
    if (nick_identified(u)) {
        nc = u->na->nc;


        /* Release memory if needed */
        if (u->nickTrack)
            free(u->nickTrack);

        /* Copy the nick core displayed nick to
           the user structure for further checks */
        u->nickTrack = sstrdup(nc->display);

const char *nc;
#define testruc "PRIVMSG #testt test: %d %s %nc" /*(example for test , problem, the real script would be that the next line)*/
/*#define testruc "CHGIDENT %Variable_nick .%variable_nick"*/ /* the real line that executes the Ident can be joined in the chan in +iI *!.*@* --- */
send_cmd(s_NickServ, testruc, u, u); (for test , good line)
    }
}


I would love to learn how to return the "Char nick " in "string nick"


How he would do to "activate a chgident" as soon as someone on s'identify nickserv

Exemple:

Joins > Test (new user)
Test > he recorded his name on nickserv
Test > Nickserv identify Mot_de_passe
Test > Chgident turns directly .nick@... New code
Test > he can then join with the chan in +iI *!.*@*

System very well?

there is a problem with the "Char":

#define testruc "PRIVMSG #test test: %d %s %nc" /*(for test , problem)*/
I receive a nick returned Char:

 test is 458951154
 would have to "458951154" displays the username, is there anyone can learn to do that nickname?


Thank you in advance for your help

 I'm sorry if you do not understand my English (google translator)




« Last Edit: January 08, 2011, 01:26:33 PM by Mec08 »
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #4 on: January 08, 2011, 02:18:10 PM »

Do not modify nickserv.c you will get NO SUPPORT from us.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #5 on: January 08, 2011, 02:49:29 PM »

As I and chaz said: if you want to modify the core, we won't help you with that. Look into modules instead. there s plenty of example modules that perform actions on identify.

And without any knowledge of C you are not going to get anywhere.. for example: C does not have strings, it only has char.
Also, chgident is a client to server command, anope links to the ircd as a server so that command will not work. You need to use a server-to-server command instead. It s provided by anopes API as well.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Mec08

  • Anope User
  • Offline Offline
  • Posts: 6
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #6 on: January 09, 2011, 07:21:23 AM »

ok, I have another idea but I do not manage to find the solution

Currently:

1) nickname with "Test"
2) The person goes on a website with login and password request, with Anope_mysql (it works perfectly well) - then on the page there is a very big "Button" written with "validate my nick on the chat server "- as soon as the person clicking the button that executes a command in real time on a eggdrop admin and added a vhost with /HostServ SETALL (it works perfectly well what EggDrop)
3) Problem: The command does not work:  /HostServ SETALL Test .Test@ - I do not use a vhost with an ip

I would not put "host" but only an "ident" - does anyone know the command to put an "ident vhost" without putting a "host"?


works well, but not command interesting for me because I would just change the "ident" but keep the current hostname: /HostServ SETALL Test .Test@test.com
not work: /HostServ SETALL Test .Test@
not work: /HostServ SETALL Test .Test@*  <== No host !

how it should be done to put an "ident" with HostServ without changing the "ip"?

Thank You
« Last Edit: January 09, 2011, 07:27:58 AM by Mec08 »
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #7 on: January 09, 2011, 04:45:53 PM »

HostServ either does @host or ident@host, not just ident@ .. So says the src.

As you have been told, write a module that changes what you want changed. It's easy to get a module to change the vIdent of a user without touching their vHost .. So says the API.

If memory serves (Read: I'm too lazy to look it up.) ircd_catserv.c has most everything you need.
« Last Edit: January 09, 2011, 04:50:48 PM by katsklaw »
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: ns_identify_chgident - identify successful run /chgident %nick %nick
« Reply #8 on: January 09, 2011, 04:48:13 PM »

while it doesn't do exactly as you ask, have you considered whether hs_nethost is an option?
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)
Pages: [1]   Go Up