Page 1 of 1
Nickserv registration via PHP
Posted: Fri Mar 19, 2004 3:47 pm
by ChevronNine
Here's the deal... Got a portal website for the new Stargate Atlantis show at
http://www.chevronnine.com. Part of the site upgrade (when we reach around 500 members) will be to add chat via our own IRC network. Cool, great, everything is in place.
What I would like to do is have it set up so that when you reegister to the site, it also registers your nickname to my NickServ by dropping that info into a text file (or MySQL database). This would allow me to use JIRC and have it auto-identify when you open it up (assuming the user is logged into the site). This would also allow users to use their own IRC Client and already know what their username/passowrd will be. It would be a slick solution for the community.
So far I have two problems:
1 - I have yet to find IRC Services that work with Unreal *and* run on Windows or Mac OS X which has a file that I can write to (text or MySQL).
2 - I don't know what sort of performance hit, if any, I will take should I use a flat-file services database. Maybe they are all flat-file, and I just never bothered to look.
Anyone have any idea on what services package would be able to do this? The PHP coding I can have taken care of, but I need the services to be able to read the users file that the site creates.
Thanks all,
Benjamin
http://www.chevronnine.com
Windows
Posted: Fri Mar 19, 2004 6:49 pm
by jewles
1 - I have yet to find IRC Services that work with Unreal *and* run on Windows or Mac OS X which has a file that I can write to (text or MySQL).
I'm not sure you'll find any windows services that will work will with mysql... I'm pretty sure Auspice and anope (which both work on windows and link to Unreal) have modules out that use mysql.
Posted: Sat Mar 20, 2004 3:43 pm
by aquanight
If you want to be able to register through a portal, then why not just have the registration open a socket to connect to the IRC? Then it can execute:
Code: Select all
USER <username> www.youserver.com irc.yourserver.com :NickServ Registration Form
NICK <username>
NICKSERV :REGISTER <pwd> <email>
Then when JIRC connects:
Code: Select all
PASS :<nspwd>
USER <username> <userhost> irc.yourserver.com :Java IRC Chat User
NICK <username>
You don't need to share DBs unless you are going to provide a WWW frontend to NickServ's options.
Posted: Sat Mar 20, 2004 4:11 pm
by Certus
we're working on a new extsocket system to allow websites to communicate with anope so you will be able to reg nicks via PHP. this feature will be in anope 1.7
greetings,
Certus
Mistake??
Posted: Sun Mar 28, 2004 7:42 am
by w00t
"NICKSERV :REGISTER <pwd> <email>"
^--- Wouldnt that be PRIVMSG NICKSERV :REGISTER .. etc?

Posted: Sun Mar 28, 2004 10:37 am
by AngryWolf
To w00t: If the proper command aliases for Services are configured in UnrealIRCd (Unreal3.2/aliases/*.conf), then aquanight's code will work. By the way I agree with you a bit, since the PRIVMSG command always works.
Posted: Sun Mar 28, 2004 6:47 pm
by aquanight
With the aliases, you could go so far as just "REGISTER :<pwd> <email>". I don't know if the colon is necessary, though.
Plus the aliases are more secure than PRIVMSG, because of the check against the services server.
Posted: Mon Mar 29, 2004 12:15 am
by w00t
Err... its secure?! News to me...
I thought
[email protected] would be fine...
The colon is needed, I believe as a seperator. Check the RFC.
http://www.rfc-editor.org
Posted: Sat Apr 10, 2004 4:50 pm
by ChevronNine
The only problem with this solution is the password. The passwords are all encrypted in MD5 I believe... So if I tell the login script to send the password, it would send a really long string that would fail.
I'm not sure that moving to a MySQL system would help either. I think that would have the same problem.
So how in the world do I get around the password issue? I was thinking of adding another field to my database, but that would be pretty insecure, and I'm not sure I like that. Ideas?
Thanks for you help everyone!
BJH
Posted: Sun Apr 11, 2004 3:26 am
by DeMiNe0
it wouldnt fail, you would just need to check it agenst another md5 string and see if they match. Thats how most php scripts do it.
WIRCDs have a windows ported anope out that runs mysql.
Otherwise though you could make a php script that connects to the network (or connects a bot to the network) and does this command. I have yet to find a script to do that and i am having some problems doing that as well.
Posted: Sun Apr 18, 2004 5:59 am
by upinsmoke
this is a script ive used for sometime on my site the nickserv register function works great it will connect to your irc network and register the nick to your services database using a simple form with 3 fields nick,email and password. its written in php
The Awesome Christians User Page is set of PHP scripts that allow you to access IRC services such as nickserv, memoserv, chanserv, and statserv through a Web interface.
http://sourceforge.net/projects/awesome/
hopefully this will help you
smoke
http://paradise-chat.com