ltworf / ltdata

IRC bot in python
2 stars 2 forks source link

Authenticate owner through NickServ #7

Open salto-edit opened 9 years ago

salto-edit commented 9 years ago

The whois on a nick says if and using which account that person is authenticated. Using this information we could proper owner authentication in LtData without implementing our own pwdb, passwd and login commands.

Caveat: A running NickServ is not guaranteed by the IRC protocol and the WHOIS reply is not the easiest to parse.

salto-edit commented 9 years ago

WHOIS information rendered in my IRC client:

14:65 pm -!- salto-edit [~salto@ed.it] 14:65 pm -!- ircname : Drichsal Mietzscheto 14:65 pm -!- channels : ##botwar 14:65 pm -!- server : sendak.freenode.net [Vilnius, Lithuania, EU] 14:65 pm -!- : is using a secure connection 14:65 pm -!- account : salto-edit 14:65 pm -!- End of WHOIS

salto-edit commented 9 years ago

Raw reply:

:sendak.freenode.net 0 salto-edit salto-edit ~salto ed.it * :Drichsal Mietzscheto :sendak.freenode.net 0 salto-edit salto-edit sendak.freenode.net :Vilnius, Lithuania, EU :sendak.freenode.net 0 salto-edit salto-edit :is using a secure connection :sendak.freenode.net 0 salto-edit salto-edit salto-edit :is logged in as :sendak.freenode.net 0 salto-edit salto-edit :End of /WHOIS list.

The information we're looking for is on line 4.

salto-edit commented 9 years ago

Any takers?

salto-edit commented 9 years ago

Took it. Is there any better candidate than me for LtData in GSoC 2016?

ltworf commented 9 years ago

Nop, you are (so far) the best candidate :-P