zD12 / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

PircbotX.register() #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is a PircbotX.identify(String) but there is not a 
PircbotX.register(String,String) or PircbotX.register(String). Can you 
implement those methods, because you have also made identify. The overload is 
when a email must be provided.

Original issue reported on code.google.com by paulde...@gmail.com on 14 Jan 2014 at 8:59

GoogleCodeExporter commented 9 years ago
I'm new to code.google.com, it has to be a Enhancement, sorry about that.

Original comment by paulde...@gmail.com on 14 Jan 2014 at 9:01

GoogleCodeExporter commented 9 years ago
Are you talking about registering to NickServ?

Original comment by Lord.Qua...@gmail.com on 14 Jan 2014 at 11:26

GoogleCodeExporter commented 9 years ago
Yeah i'm trying to registering to NickServ indeed. Code that I used for a 
server, what worked for that one, didn't test more of them.

bot.sendRawLine("NICKSERV REGISTER " + password + " " + email);

Note that this code is from 1.9. Currently changing code to use the newest 
version. Guess in the 2.0 code that the register should be something like this:

pircBotX.sendIRC().register(password, email);
Looked at the source and it should be something like this in OutputIRC

    public void register(final String password, String email) {
    checkArgument(StringUtils.isNotBlank(password), "Password '%s' is blank", password);
    bot.sendRaw().rawLine("NICKSERV REGISTER " + password + " " + email);
    }

I did not test this code yet.

Original comment by paulde...@gmail.com on 15 Jan 2014 at 12:54

GoogleCodeExporter commented 9 years ago
NickServ implementations differ though on how to register. I've seen "NICKSERV 
REGISTER password email email", "NICKSERV REGISTER password emailedToken", etc. 
"NICKSERV IDENTIFY" is about the only standardized command. 

Original comment by Lord.Qua...@gmail.com on 18 Jan 2014 at 10:16